SIM900 http request not allowed

Hi all,

i'm trying to run a code on my arduino uno with a sim900 module attached to in the end post some data to my webserver.

Whenever i run the code for the first time after i've just powered the arduino and module i get no errors but neither do i get an ip address returned and neither is my post request registered on server side.

When i connect for the 2nd time (or after that), i do get an ip but an error on the AT+SAPBR=1,1
command that says: operation not allowed. And the IP then is 0.0.0.0

Using:
Arduino uno
this specific sim900 module: GSM/GPRS Shield Quad band SIMCOM SIM900 - vanallesenmeer
KPN prepaid simcard (dutch)

Here is my arduino code

#include <SoftwareSerial.h>


//http://www.raviyp.com/embedded/194-sim900-gprs-http-at-commands

// Configure software serial port
SoftwareSerial SIM900(7, 8); 

String reading = "{ \" : 1, \"latitude\" : 5, \"longtitude\" : 6}";


void setup() {
  Serial.begin(19200);
  SIM900.begin(19200);
  delay(5000);
  
  connectGPRS();
  postData();
  
  delay(1000);
}

void loop() {
}

void ShowSerialData() {
  while(SIM900.available()!=0)
    Serial.write(SIM900.read());
}


void connectGPRS() {
  SIM900.println("AT+CMEE=2\r");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+CSQ");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+CGATT?");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+SAPBR=3,1,\"APN\",\"prepaidinternet\"");
    delay(1000);
  ShowSerialData();

  SIM900.println("AT+SAPBR=1,1");
  delay(1000);
  ShowSerialData();

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

void postData() {
  SIM900.println("AT+HTTPINIT");
  delay(1000);
  ShowSerialData();

  SIM900.println("AT+HTTPPARA=\"CID\",1");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+HTTPPARA=\"URL\",\"https://www.mysite.nl/index.php\"");
  delay(1000);
  ShowSerialData();

  SIM900.println("AT+HTTPPARA=\"CONTENT\",\"application/json\"");
  delay(1000);
  ShowSerialData();

  SIM900.println("AT+HTTPDATA=99,10000");
  delay(1000);
  ShowSerialData();

  SIM900.println(reading);
  delay(1000);
  ShowSerialData();

  SIM900.println("AT+HTTPACTION=0");
  delay(10000);
  ShowSerialData();

  SIM900.println("AT+HTTPREAD");
  delay(10000);
  ShowSerialData();
}

And this is the serial monitor output:

Call Ready
AT+CMEE=2


OK
AT+CSQ

+CSQ: 0,0

OK
AT+CGATT?

+CGATT: 0

OK
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","prepaidinternet"

OK
AT+SAPBR=1,1

+CME ERROR: operation not allowed
AT+SAPBR=2,1

+SAPBR: 1,3,"0.0.0.0"

OK
AT+HTTPINIT

OK
AT+HTTPPARA="CID",1

OK
AT+HTTPPARA="URL","https://www.mysite.nl/index.php"

OK
AT+HTTPPARA="CONTENT","application/json"

OK
AT+HTTPDATA=99,10000

DOWNLOAD

ERROR
AT+HTTPREAD

OK

AT+CSQ give you network range. Here you get 0 means your gsm not connected to the network.
AT+SAPBR=2,1
Give you in address. Means your gprs is working. here you get zero.
1st check this problem
I worked on same project like you. All work properly.

AshwiniGunjal:
AT+CSQ give you network range. Here you get 0 means your gsm not connected to the network.
AT+SAPBR=2,1
Give you in address. Means your gprs is working. here you get zero.
1st check this problem
I worked on same project like you. All work properly.

Thanks, this explains a lot to me already! but what am i doing wrong so that it won't connect to the network? is it physical or here in the code? any suggestions?