Serial can not write to device on mac

Hello,
I can read incoming data on “DataAvailable” event from device using below code

C = me.LookAhead(encodings.ASCII)
What I need to send data to device and I used below code

if instr(C, chr(29)) > 0 then me.Write( "ANS=INI"+chr(13)+chr(10)+"STATUS=0"+chr(13)+chr(10)) else TextArea.text = TextArea.text + C

Device starts data transfer and shows “communication error 71” immediately.

Please let me know if any MBS plugins available for serial communication

Need more information???

The information you provide is limit,is no easy to understand what you need.
What device you use?
You use drivers to connect to device?
Post the code you have for connection to device?
Generic answer is,maybe your device when you send data is “Busy”,or “disconnected” etc…
With above information i am sure someone will help your problem!!

It is eye lens frame tracing device. I have used drivers and able to show list of devices to serial.
I can read incoming data.
I need to process on incoming data “REQ=INI…”.
Then app should write below data

me.Write( "ANS=INI"+chr(13)+chr(10)+"STATUS=0"+chr(13)+chr(10))

when I try to write/before try to write(not exactly know where and why “error 71”) immediately shows “Communication error 71”

There is ACK+FS that I missed.
Need to send first ACK that is chr(6) to device then remaining data That is
“ANS=INI”+chr(13)+chr(10)+“STATUS=0”+chr(13)+chr(10) that what I missed.

The whole write statement is like

me.Write( chr(6)+chr(28)+"ANS=INI"+chr(13)+chr(10)+"STATUS=0"+chr(13)+chr(10))