Go Down

Topic: GPRS working with AT commands but not with GSM library (Read 1 time) previous topic - next topic

chall3ng3r

Jan 07, 2014, 04:26 pm Last Edit: Jan 08, 2014, 01:41 pm by chall3ng3r Reason: 1
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: [Select]
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 //
skype/twitter: chall3ng3r
http://chall3ng3r.com/

MathiasVDA

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

chall3ng3r

#2
Jan 08, 2014, 10:48 am Last Edit: Jan 08, 2014, 11:02 am by chall3ng3r Reason: 1
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 //
skype/twitter: chall3ng3r
http://chall3ng3r.com/

chall3ng3r

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 //
skype/twitter: chall3ng3r
http://chall3ng3r.com/

Go Up