Recent

Author Topic: How to read AT Command response using Synaser  (Read 5721 times)

lqman

  • Newbie
  • Posts: 1
How to read AT Command response using Synaser
« on: February 06, 2012, 07:27:15 am »
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: [Select]
TBlockSerial.ATCommand("AT command text");3. Wait for the respond with timer, try to read the recvString.
Code: [Select]
serialPort.Recvstring(0)
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

  • Sr. Member
  • ****
  • Posts: 447
Re: How to read AT Command response using Synaser
« Reply #1 on: March 10, 2012, 03:51:28 am »
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

  • Jr. Member
  • **
  • Posts: 73
Re: How to read AT Command response using Synaser
« Reply #2 on: March 10, 2012, 07:41:25 am »
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.

 

TinyPortal © 2005-2018