CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

AT commands CMGS return ERROR

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wynn



Joined: 25 Aug 2012
Posts: 5

View user's profile Send private message

AT commands CMGS return ERROR
PostPosted: Sat Aug 25, 2012 8:34 am     Reply with quote

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: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Aug 25, 2012 10:59 am     Reply with quote

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: 19513

View user's profile Send private message

PostPosted: Sun Aug 26, 2012 1:46 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 26, 2012 2:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 26, 2012 8:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 26, 2012 8:52 am     Reply with quote

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: 19513

View user's profile Send private message

PostPosted: Sun Aug 26, 2012 11:36 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 27, 2012 6:58 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 27, 2012 8:30 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 27, 2012 8:51 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 27, 2012 11:52 am     Reply with quote

Hi wynn,

Which PIC are you using, and what is your compiler version??

Thanks,

John
wynn



Joined: 25 Aug 2012
Posts: 5

View user's profile Send private message

PostPosted: Mon Aug 27, 2012 7:06 pm     Reply with quote

I am using Tera Term to try the AT command
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue Aug 28, 2012 2:11 pm     Reply with quote

Quote:
Which PIC are you using, and what is your compiler version??


Quote:
I am using Tera Term to try the AT command



...... Genius
http://weknowmemes.com/wp-content/uploads/2012/08/genius-meme.jpg

had to be done....
_________________
CCS PCM 5.078 & CCS PCH 5.093
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group