View previous topic :: View next topic |
Author |
Message |
wynn
Joined: 25 Aug 2012 Posts: 5
|
AT commands CMGS return ERROR |
Posted: Sat Aug 25, 2012 8:34 am |
|
|
I am using Prolink PSH300 HSUPA GSM Modem connect to my laptop and using tera term to test the connect.
First I entered AT it will response me OK
AT
OK
AT+CMGF=1
OK
AT+CMGS="+6581XXXXXX" (then I pressed enter error was returned)
ERROR
Sometime it won't return me error but just hang there no > return.
Could anybody advise me what to do? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sat Aug 25, 2012 10:59 am |
|
|
for starters I'd cut some CCS C code,post it and then ask for help...
generally speaking you should ask the manufacturers of the products you're using for help...
your question has nothing to do with the CCS C compilers as posted and will be ** locked ** soon |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Sun Aug 26, 2012 1:46 am |
|
|
It should hang.....
Once you have sent the CMGF command, the phone is waiting for a message. The syntax is:
Code: |
AT+CMGS="+6581XXXXXX"<ENTER>
The message to be sent<CTRL-Z>
|
You will get ERROR, if the number you are trying to call, does not accept such messages.
When it hangs, it is sitting waiting for the message....
As temtronic says, this is not a CCS question, but a basic GSM question.
Best Wishes |
|
|
wynn
Joined: 25 Aug 2012 Posts: 5
|
|
Posted: Sun Aug 26, 2012 2:49 am |
|
|
I am sorry about that, I not sure where to post it, as I saw the similar question posted. But I didn't see the > to indicate enter message? |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Aug 26, 2012 8:42 am |
|
|
Do you know that you can enable extended error messages with cause? By the way, I rather expect a trivial reason like not registered to the network. |
|
|
wynn
Joined: 25 Aug 2012 Posts: 5
|
|
Posted: Sun Aug 26, 2012 8:52 am |
|
|
Do you mean AT+CMEE=1? if yes yes I did it already, still either return me error or hang there without any response.
Is it possible my modem problem? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Sun Aug 26, 2012 11:36 am |
|
|
You have tested that your modem supports this?.
AT+CMGF=?<ENTER>
You must get back:
+CMGF: (0,1)
The one must appear.
Also have you set the number to be used to send the messages:
the +CSCA command allows this to be read and set.
You do need to send the CTRL-Z, before the full error message will be returned from the 'hung' state.
Most modems do not send a '>', till you have finished sending the message. So just sitting there is correct.
Best Wishes |
|
|
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
|
Posted: Mon Aug 27, 2012 6:58 am |
|
|
That command is to send an SMS. First of all, are you sure it can accept a '+' in the data string? I built an SMS communicator using a SIM900 GSM module but to be honest I've never tried to send using the '+' sign. Try without the '+' in the string if you haven't tried it.
In my SIM900 modem manual, it says that 'ERROR' while sending the +CMGS message is related to mobile equipment functionality. This could mean that the device might not be registered to the network and whatnot.
Also, there are a bunch of 'unsollicited' messages that you should see as soon as you power-up your device. And there are also a bunch of commands you should send to your device to ensure it is online, registered, if there's a PIN to enter etc.
So my recommendation is before you try to send an SMS, go through the device's manual and figure-out what needs to be done to somewhat "prepare" the device to communicate.
And lastly, if you're confident that your code/circuit and program are functional and that your setup displays the unsollicited messages I am referring to above, technically, you should be able to use a standard cell phone and send an SMS to your device and the SMS should pop-up on your screen (as an unsollicited message). |
|
|
wynn
Joined: 25 Aug 2012 Posts: 5
|
|
Posted: Mon Aug 27, 2012 8:30 am |
|
|
Yes it able to send and received SMS through the Prolink PC Manager, I did try without + sign too. I using tera term to test on the AT command. I somehow manage to send out using cmgs but only able to do one time and now forever error or hang there. Thanks for the suggestion, it might due to the device doesn't support AT command, I will try using another GSM modem. |
|
|
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
|
Posted: Mon Aug 27, 2012 8:51 am |
|
|
After you send your message, you MUST send the CTRL+Z character code to actually "send". In a printf function, you would send out character "\x1A" - that's CTRL+Z in the ASCII table.
Other than that, there's not much more I can do to help unfortunately.
Good luck. |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon Aug 27, 2012 11:52 am |
|
|
Hi wynn,
Which PIC are you using, and what is your compiler version??
Thanks,
John |
|
|
wynn
Joined: 25 Aug 2012 Posts: 5
|
|
Posted: Mon Aug 27, 2012 7:06 pm |
|
|
I am using Tera Term to try the AT command |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
|
|