Forum > Packages and Libraries

How to read AT Command response using Synaser

(1/1)

lqman:
Hi All.

I try to create application similar function with hyperterminal using synaser library.
Main purpose is user can send (AT Command) to serial port and get the answer.

My program already run with this concept :
1. Open Serial port with synaser.
2. Send AT command using synaser function :

--- Code: ---TBlockSerial.ATCommand("AT command text");
--- End code ---
3. Wait for the respond with timer, try to read the recvString.

--- Code: ---serialPort.Recvstring(0)
--- End code ---

The program run successfully, but I want to change the 3rd point, not use timer, but use like event handler (in C) or raise event (in vb).

Any help will be appreciated....
Thx.

eldonfsr:
Well i don't sure but the problem is pc to pc,is not possible such command only when you are using modem...

i try the same in my project.
i using a control it receive the command but i dont get jet to receive information from the control.

just confiure your port and open or active if the computer can ope it is all your need,

i hope thats help you.

best regards.
fernando Sandoval

irfanbagus:
instead using timer, better to use thread. increase reading timeout on synaser to about 500ms - 1000ms. do reading and data processing inside thread loop and use callback to communicate with your main thread (your gui for ex.). don't forget use synchronize when call your callback.

Navigation

[0] Message Index

Go to full version