Hi all,
I have been working with Sim800L module for a while (I am still a beginner). I have problem with sending a post request. It seems like i can't register to network. At first i can post data to server. I changed nothing (Still same location, same hardware, same code), but it stopped working. This is our code:
Serial1.println("AT+SAPBR=3,1,\"Contype\",\"GPRS\"");
runsl();
delay(100);
Serial1.println("AT+SAPBR=3,1,\"APN\"," + apn);
runsl();
delay(100);
Serial1.println("AT+SAPBR=3,1,USER," + apn_u); //Comment out, if you need username
runsl();
delay(100);
Serial1.println("AT+SAPBR=3,1,PWD," + apn_p); //Comment out, if you need password
runsl();
delay(5000);
Serial1.println("AT");
runsl();//Print GSM Status an the Serial Output;
delay(4000);
Serial1.println("AT+SAPBR =1,1");
runsl();
delay(100);
Serial1.println("AT+SAPBR=2,1");
runsl();
delay(2000);
Serial1.println("AT+HTTPINIT");
runsl();
delay(100);
Serial1.println("AT+HTTPPARA=CID,1");
runsl();
delay(100);
Serial1.println("AT+HTTPPARA=URL," + url); //+"&data1="+data1+"&data2="+data2
runsl();
delay(100);
Serial1.println("AT+HTTPPARA=CONTENT,application/x-www-form-urlencoded");
runsl();
delay(100);
Serial1.println("AT+HTTPDATA=900,10000");
runsl();
delay(100);
Serial1.println(data1);
runsl();
delay(10000);
Serial1.println("AT+HTTPACTION=1");
runsl();
delay(5000);
Serial1.println("AT+HTTPREAD");
runsl_data();
delay(100);
It Started giving error at at+sapbr=1,1. Also, we try to send direct at commands to sim module. It returns "0" from at+creg and at+cgreg which means it not registered to network (sometimes it returns 2 which means it is searching). Also we are taking error from at+cgatt and its response to at+csq is not stable. Sometimes it changes between 0 and 19. (We didn't have this problem on the same location before)
Note: We are using gprs antenna, 12 v AC-DC adapter as power supply and regulating it to 4v with Lm2596.