Pages: [1]   Go Down
Author Topic: GPRS working with AT commands but not with GSM library  (Read 1620 times)
0 Members and 1 Guest are viewing this topic.
PK
Offline Offline
Newbie
*
Karma: 1
Posts: 4
Desktop / Web / Mobile Developer and Researcher
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am trying to get my Arduino work with the GPRS modem (SIM900A). Its working for SMS, and I also got it to fetch data from websites by sending AT commands, i.e. The code at this link works perfectly http://www.seeedstudio.com/wiki/GPRS_Shield_V1.0

When I use the GSM library, I get the "Not connected." message on serial monitor, and when debug is enabled, I get the following output:

Code:
Starting Arduino web client.
AT%13%
0 9>AT%13%%13%%10%OK%13%%10%
AT+CGREG?%13%
9 40>AT+CGREG?%13%%13%%10%+CGREG: 0,1%13%%10%%13%%10%OK%13%%10%
AT+IFC=1,1%13%
40 57>AT+IFC=1,1%13%%13%%10%OK%13%%10%
AT+CMGF=1%13%
57 73>AT+CMGF=1%13%%13%%10%OK%13%%10%
AT+CLIP=1%13%
73 89>AT+CLIP=1%13%%13%%10%OK%13%%10%
ATE0%13%
89 100>ATE0%13%%13%%10%OK%13%%10%
AT+COLP=1%13%
100 106>%13%%10%OK%13%%10%
AT+CGATT=1%13%
106 112>%13%%10%OK%13%%10%
AT+QIFGCNT=0%13%
112 121>%13%%10%ERROR%13%%10%
Not connected

I have tried with different SIMs from different operators. They work for sending SMS, and with AT commands to get a page from web. But when used with GSM library, it gives the same error.

Any help or pointers will be highly appreciated.

Best,

// chall3ng3r //
« Last Edit: January 08, 2014, 07:41:01 am by chall3ng3r » Logged

skype/twitter: chall3ng3r
http://chall3ng3r.com/

Offline Offline
Full Member
***
Karma: 1
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that the gsm library for the Arduino gsm shield that you are trying to use for another gsm modem? Are you sure they are compatible? It seems like there is a problem with the at command AT+QIFGCNT
Logged

PK
Offline Offline
Newbie
*
Karma: 1
Posts: 4
Desktop / Web / Mobile Developer and Researcher
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply,

Yes, its the default GSM library which comes with Arduino IDE. The modem is suppose to be compatible with this library.

Yes, on this "AT+QIFGCNT" command, modem gives the error in reply. I have tried to delay between begin and attachGPRS functions, but after that, it goes on in a loop, sending this same AT command, and error on reply.

Do I need to change this command in GSM library? Or is there any library compatible with SIM900A modem?

Edit: I found this site http://www.gsmlib.org/index.html which have library for SIM900 modem. Gonna give it a try, and will post if it worked.

Thanks,

// chall3ng3r //
« Last Edit: January 08, 2014, 05:02:13 am by chall3ng3r » Logged

skype/twitter: chall3ng3r
http://chall3ng3r.com/

PK
Offline Offline
Newbie
*
Karma: 1
Posts: 4
Desktop / Web / Mobile Developer and Researcher
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, it worked with the SIM900 library I posted in previous post. But the TX/RX pins were reversed (TX=3, RX=2), and the library does not turn on the modem before. So I added my own code to turn the modem on.

For my current project, I only have to post simple HTTP data to my application server, and I might just go on with the manual AT commands with this modem.

For my next project, I'm gonna make sure to order M10 modem by QUECTEL which is used on standard Arduino GSM shield for maximum compatibility.

Best regards,

// chall3ng3r //
Logged

skype/twitter: chall3ng3r
http://chall3ng3r.com/

Pages: [1]   Go Up
Jump to: