1

I recently bought a GPRS shield from Seeed Studio but was having issues running the programs described in their documentation. Here is everything you need to know about my shield:

Documentation for GPRS Shield V2.0

Website to purchase GPRS Shield V2.0

I assumed that there was a connection problem. I used the following code to try to debug my SIM900 and its connections to the sim card and the cellular network:

#include <SoftwareSerial.h>
SoftwareSerial gprsSerial(7,8);
void setup(){
 gprsSerial.begin(19200); // GPRS shield baud rate 
 Serial.begin(19200); 
 delay(500);
}
void loop(){
 if(Serial.available()) {
 switch(Serial.read()) {
 case '0': testSIM900(); break;
 // AT OK
 case '1': testSIMCARD(); break;
 // +CPIN: READY
 // +CREG: 0,1
 case '2': testNETWORK(); break;
 // +CGATT: 1
 }
 } 
 if(gprsSerial.available()) Serial.write(gprsSerial.read());
}
void testSIM900() {
 gprsSerial.println("AT");
 // AT OK
 delay(100);
}
void testSIMCARD() {
 gprsSerial.println("AT+CPIN?");
 // +CPIN: READY
 delay(100);
 gprsSerial.println("AT+CREG?");
 // +CREG: 0,1
 delay(100);
}
void testNETWORK() {
 gprsSerial.println("AT+CGATT?");
 // +CGATT: 1
 delay(100);
}

When I entered 0, 1, and 2 into the serial monitor, I got the following response:

AT
OK
AT+CPIN?
+CPIN: READY
OK
AT+CREG?
+CREG: 1,2
OK
+CREG: 0
+CGREG: 0
AT+CGATT?
+CGATT: 0
OK

What does this tell me about the current state of my shield, sim card, and network connection? Is there anything else I can do to isolate issues?

asked Feb 13, 2018 at 19:17

1 Answer 1

1

It seems it can't register on the network, GSM modems are power hungry, are you sure you're powering it up with the external power source (through Vin)? Pretty sure the Arduino isn't enough, but I could be wrong, that's a shield that has those issues in mind.

Also try to see the signal strength using AT+CSQ.

answered Mar 10, 2018 at 16:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.