From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

gsm can't send unless i open hyperterminl first

hello

i have  program to send sms

but the problem is that the program doesn't send the sms unless i open the hypertirminal first and try the modem there then close the hyperterminal and use labview. so how can i solve this problem ?

0 Kudos
Message 1 of 20
(2,949 Views)

It is impossible to answer the question because you have not provided the necessary details. What do you do to "try" the modem in HyperTerminal? Clearly you need to do the same thing in LabVIEW. What code are you using to send the SMS in LabVIEW?

 

Please be aware that we are not mind readers, nor can we magically see the code that your eyes see.

0 Kudos
Message 2 of 20
(2,943 Views)

sorry for that .

i have this program, it send an sms when certain thresahold is true. this program run and every thing is fine but there is small problem. the program doesnt work at the begining .first i should open the hyperterminal and send sms from there after that open the labview program and it will send sms.i dont understand why doesnt the labview send sms without the need to send trial sms from the hyperterminal first !
and the same AT commands are available in both the hyperterminal and the labview program !

0 Kudos
Message 3 of 20
(2,938 Views)

@duaa wrote:

sorry for that .

i have this program, it send an sms when certain thresahold is true. this program run and every thing is fine but there is small problem. the program doesnt work at the begining .first i should open the hyperterminal and send sms from there after that open the labview program and it will send sms.i dont understand why doesnt the labview send sms without the need to send trial sms from the hyperterminal first !
and the same AT commands are available in both the hyperterminal and the labview program !



You still have not explained exactly what you are doing when you send SMS from the Hyperterminal. You must be doing something that you are not doing with the LabVIEW VI.

 

 

 

 

0 Kudos
Message 4 of 20
(2,929 Views)

i have tried to troubleshoot the prblem. first i operned hyperterminal and i typed AT and the modem respond with OK, I close it  and i opened labview program and run it to send sms but it didnt send. so i went back to hyperterminal ant type two commands, first command at and second command at+cmgf=1 and it responds ok ,so again i closed it and opened labview to send sms from there and it sends sms. so i think the problem in at+cmgf=1 command that labview is not doing it in the correct way.

what i do in labview is same as what i do in hyperterminal. first i check the connectivity to the modem by sending at after that i configure the modem to text mode by sending at+cmgf=1 and then i send the sms using these at commands

at+cmgs="  phone number "

> sms to send i write it here     ctrl+z  

and it sends fine

and when i run the labview and highlight the flow of data to see the responce from the modem in visa block it goes fine and vise returns OK when at+cmgf=1 is sent, so i cant know where is the problem ?

0 Kudos
Message 5 of 20
(2,914 Views)

@duaa wrote:

i have tried to troubleshoot the prblem. first i operned hyperterminal and i typed AT and the modem respond with OK, I close it  and i opened labview program and run it to send sms but it didnt send. so i went back to hyperterminal ant type two commands, first command at and second command at+cmgf=1 and it responds ok ,so again i closed it and opened labview to send sms from there and it sends sms. so i think the problem in at+cmgf=1 command that labview is not doing it in the correct way.

what i do in labview is same as what i do in hyperterminal. first i check the connectivity to the modem by sending at after that i configure the modem to text mode by sending at+cmgf=1 and then i send the sms using these at commands

at+cmgs="  phone number "

> sms to send i write it here     ctrl+z  

and it sends fine

and when i run the labview and highlight the flow of data to see the responce from the modem in visa block it goes fine and vise returns OK when at+cmgf=1 is sent, so i cant know where is the problem ?


Are you sure you terminate all commands properly in LabVIEW? Hyperterminal translates the enter key that you press to cause it to send the data string into a carriage return and/or linefeed character and appends that to the string. In LabVIEW you have to explicitedly append this data to your string as LabVIEW does not try to counterguess what you want to send out through a serial port. Enable "\ - codes" in your string control or string constant and check that you have an "\r\n" at the end of your strings.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 20
(2,911 Views)
Yes i have Them at the end of each string. The main problem that my labview program doesnt send sms unless i open hyperterminal first. Then labview works fine and send sms
0 Kudos
Message 7 of 20
(2,905 Views)

You are probably not giving the modem enough time to process the command. When you do it in Hyperterminal you are waiting for the response. You are not doing that in LabVIEW. You immediately send the next command. The modem may not even be ready to do so. In Hyperterminal you, a human, is handling the handshaking. LabVIEW is not a human.

 

0 Kudos
Message 8 of 20
(2,891 Views)
But the labview works fine after i use the modem with hyperterminal first
So how is this related to time ?
0 Kudos
Message 9 of 20
(2,888 Views)

@duaa wrote:
But the labview works fine after i use the modem with hyperterminal first
So how is this related to time ?

Why don't you try the solution first instead of questioning it???

 

 

0 Kudos
Message 10 of 20
(2,885 Views)