Discussion:
read GSM modem
(too old to reply)
gdah
2008-08-14 01:40:05 UTC
Permalink
Hi.
I need some help here..I have a program that use to read all the inbox message in the GSM simcard. GSM modem is connected to the pc serial com port. I used AT command AT+CMGL="REC UNREAD" to read the unread messages in the inbox. Between VISA write and VISA read, I put some delay which is 450ms. So far this is the suitable delay to get a complete data from the serial. Before this is used less that 450ms, and the number of incomplete data that I read from the serial port is high. But even though I used 450ms, sometimes I still cannot read a complete data. When i try read the serial port using the hyperterminal, I never get incomplete data. All the data are completed data. I wondering, is there any delay used in the hyperterminal? Why when I access the serial port using VISA write/read and hyperterminal I will get a different result?How can I make my program read the complete data as a hyperterminal? Is it about the delay? Please assist me..I may need an advice from you...thanks
gdah
2008-08-14 01:40:05 UTC
Permalink
test gsm.vi:
http://forums.ni.com/ni/attachments/ni/170/349179/1/test gsm.vi
Pnt
2008-08-14 07:40:22 UTC
Permalink
You use a time delay. When that time has expired, you read the data even if not all data have been received from modem.Hyperterminal uses no delay. When a character comes , it is been displayed. Solution : Do not use time delay, use termination character, line feed.
gdah
2008-08-15 04:10:07 UTC
Permalink
sorry..can you give me an example to use the termination character, line feed?..I do not know how to use it in my program. I am worried that if I didn't use time delay, I might cannot process the data.
gdah
2008-08-15 04:10:07 UTC
Permalink
ModemInit.llb:
http://forums.ni.com/ni/attachments/ni/170/349509/1/ModemInit.llb
Pnt
2008-08-15 06:10:05 UTC
Permalink
If i don't forget something, this will work.


Example_VI_BD.png:
Loading Image...
Loading...