Hello!
I am using SIM800L with Arduino Uno. I send data to server over GPRS, TCP port. I have correct power supply with enough current. My problem is that SIM800L sends data a few times successfully. After that something weird happens. Response to AT commands is OK. Module also connects with server but it doesn’t send data. Sometimes does not send anything, sometimes it sends AT commands as text. In CIPSEND I only send raw data of measurements. If I reset module (remove power supply and connect back) it starts to work properly again.
Here is my code I use in function to send data to server:
myGsm.println(“AT+CIPSHUT”);
delay(1000);
printSerialData();
myGsm.println(“AT+CIPMUX=0”);
delay(2000);
printSerialData();
myGsm.println(“AT+CGATT=1”);
delay(1000);
printSerialData();
myGsm.println(“AT+CSTT=“internet”,“mobitel”,“internet””);//setting the APN,2nd parameter empty works for all networks
delay(5000);_
printSerialData();
myGsm.println();
myGsm.println(“AT+CIICR”);
delay(6000);
printSerialData();
myGsm.println(“AT+CIFSR”); //init the HTTP request
delay(2000);
printSerialData();
myGsm.println("AT+CIPSTART=“TCP”,“xxx.xxx.xxx.xxx”,“9999"”);
delay(5000);
printSerialData();
delay(5000);
myGsm.println(“AT+CIPSEND”);
delay(2000);
printSerialData();
readSD();
myGsm.write(0x1A);
delay(3000);
myGsm.println(“AT+CIPCLOSE”);
printSerialData();
myGsm.println(“AT+CIPSHUT”);
delay(1000);
printSerialData();
Does anyone know what could be the problem? I already tried CFUN = 0 and then CFUN = 1, or CFUN = 1,1. But no result. Please help.
Thanks in advance!