04-01-2011 06:47 AM - edited 04-01-2011 06:48 AM
Good Day,
I'm using a gsm for the first time. Connecting to a wavecom m1306b via a NI USB-232. I am also using the serial communication through Max to communicate.
I've setup my parameters as such
baud:115200
Parity: None
Stop bits:1
Databits: 8
Flow control: Hardware - RTS/CTS
One arb point is that it only communicates if I leave the termination char as \n, I assumed I would require \r.
If I powerup and I can send 'AT' and receive 'OK', when I try to send an sms here's what happens
Send: AT+CMGS="xxxxxxxxxxx" //where xxxxxxxxxxx is my mobile number to send to
Response: < //as expected
Send: My first sms^z //I have used ^z to replace <crtl-z>... is this correct?
I then get no response and the modem seems to hang. Could anyone offer some advice?
Thanks.
04-01-2011 07:18 AM
No, you cannot use ^. Ctrl-z is hex 1A so you could use \1A.
04-05-2011 02:51 AM
Hi Dennis,
Thanks for the response. I tried \1A, but I still have the same issue. No sms is sent and after that, any command sent, all I get is the echo but no other response. I have to reboot the device to start getting responses again.
Regards
04-06-2011 02:58 PM
Regarding using the termination char as \n or \r, this is specific to your particular device. What serial commands is your device looking for? I would recommend referring to your manual. This should also clear up your issue with "Ctrl" "Z". It sounds like this has to do with your device, rather than LV or MAX.
Jordan
04-21-2011 05:33 AM
Hi,
Apologies for my delay, I'm back onto this now. I have managed to send an sms via the serial communicator in Max.
I have sent...
at+cmgf=1\r (set to text mode)
at+cmgs="0123456789"\r (set recipient number)
This\sto\sbe\sent\1A (message - "This to be sent")
This works fine in Max
I am trying to duplicate this in my LabView code but am having problems communicating. I imagined this to be the simple process of a few VIs to send these commands.
For writing I Have set up the VISA Configue Serial Port and simply used VISA Serial Write to send each command
VISA Configure Serial Port
- Inputs - Disabled Char Termination (I'm sending it myself)
Resource - Comm4
baud rate - 115200
Flow Control - RTS/CTS
To Read I have set it up like below...
VISA Configure Serial Port
- Inputs - Enable Char Termination
Char Term - 13 (carriage return)
Resource - Comm4
baud rate - 115200
Flow Control - RTS/CTS
I am getting no response from the modem through labview. Have I missed something obvious?
Regards,
Jevon
04-21-2011 07:49 AM
I have reverted to using the basic serial write and read.vi in the examples until I start seeing responses via labview. Just to clarify, I do have my write string set to \ codes display. I am appending the termination character to the end of the string myself.
Thanks
04-21-2011 08:03 AM
Ok, found a problem, When I use MAX, I'm using Com4, so I assumed I'd be using Com4 in LabView. As a lost hope resort, I flipped to Com3 while LabView and I started getting responses. Thats a little arb and I'm a little concerned about that. But gladly, I'm getting responses and can test my full code.
05-10-2011 03:33 PM
I am experiencing an interesting issue, in fact I'm hitting a brick wall with this wavecom modem.
I've built the VIs, communicating using VISA with the modem goes fine, I can send an SMS which is received by the correct mobile, however the message is empty!
I'm following the right syntax terminating the message string with a 0x1A, the modem sends it out and loops back through the serial port the text string I provided, which indicates that it got it, however the message is empty.
I have tried all sorts of things, like adding a CR before the 1A, putting the string within " " but no difference.
Anyone experienced this before?
05-13-2011 08:32 AM
Hi MartyNZ,
Are you seeing this same empty message if you try to send it in MAX also? Is it an option to use HyperTerminal to see a bit more closely what's going on?
Regards,
Deborah Y.