0

I have a SIMCom SIM900 GPRS Shield that works with an Arduino UNO R3. I am finding problems when I try to perform an HTTP POST request. I started guessing it was a problem with the GPRS because the first ERROR that I get happens when I try to execute the following AT command:

AT+SAPBR=3,1,\"Contype\",\"GPRS\"

Then, when I try

AT+CGATT?

, the answer is

+CGATT: 0

which means GPRS isn't attached. Then, I tried to attach it. The result:

AT+CGATT=1 ERROR

I've already checked the shield firmware version, and it is numbered as 1137B04SIM900M64_ST.

That's the function I use to connect:

void connectGPRS(){
  SIM900Serial.println("AT+SAPBR=3,1,\"Contype\",\"GPRS\"");
  delay(1000);
  updateSerial();

  SIM900Serial.println("AT+SAPBR=3,1,\"APN\",\"www\"");//APN
  delay(1000);
  updateSerial();

  SIM900Serial.println("AT+SAPBR=1,1");
  delay(1000);
  updateSerial();

  SIM900Serial.println("AT+SAPBR=2,1");
  delay(1000);
  updateSerial();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.