I'm trying to use the SIM5320 to send sensor data to a database. I have been successful in connecting my SIM to the network and sending some random data to my database. Now I'm trying to froward sensor data.
When I follow the exact same code I did before to establish the connection using the Adafruit FONA library in the new sketch, the AT command does not return a response for some reason (No OK, no ERROR... just nothing). This is the function I'm using to send the data:
Code: Select all
void fonaSendHTTP() {
int i=0;
GETStr.toCharArray(GETStrArr,sizeof(GETStrArr));
for(i=0;i<3 && !fona.sendCheckReply(F("AT+CHTTPSSTART"), F("OK"), 10000);i++);
for(i=0;i<3 && !fona.sendCheckReply(F("AT+CHTTPSOPSE=\"api.thingspeak.com\",443,2"), F("OK") ,10000);i++);
for(i=0;i<3 && !fona.sendCheckReply(F("AT+CHTTPSSEND=87"),F(">"), 10000);i++);
for(i=0;i<3 && !fona.sendCheckReply(GETStrArr, F("OK"), 10000);i++);
for(i=0;i<3 && !fona.sendCheckReply(F("AT+CHTTPSCLSE"),F("OK"),10000);i++);
}