I’ve followed the tutorials and am trying to send 3 variables to Ubidots through the SIM800L. It’s all correctly wired and the code compiles with no issues, but I just can’t work around the AT+CIPSHUT error I get when testing. I’ve tested with two SIM cards from different companies (Telcel and Movistar from Mexico) and got the same results. Any pointers on how to solve this will be greatly appreciated. Thanks
Here’s the code:
#include <UbidotsArduinoGPRS.h>
#include <SoftwareSerial.h>
#define APN “internet.itelcel.com”
#define USER “webgprs” // If your apn doesnt have username just put “”
#define PASS “webgprs2002” // If your apn doesnt have password just put “”
#define TOKEN “BBFF-XHWrX0x909bVFN7qzHqDZQqeeiMglV” // Replace it with your Ubidots token
#define VARIABLE_LABEL_ONE “latitud” // Assign the variable label
#define VARIABLE_LABEL_TWO “longitud” // Assign the variable label
#define VARIABLE_LABEL_THREE “temperatura” // Assign the variable label
Ubidots client (TOKEN);
SoftwareSerial gprs = SoftwareSerial(8, 9);
SoftwareSerial *GPRSSerial = &gprs;
void setup() {
Serial.begin(115200);
GPRSSerial->begin(19200);
if (! client.init(*GPRSSerial)) {
Serial.println(F(“Couldn’t find FONA”));
while (1);
}
client.setApn(APN,USER,PASS);
}
void loop() {
const float value_1 = 10;
const float value_2 = 20;
const float value_3 = 30;
// To send geolocation of the variable put it like this:
client.add(VARIABLE_LABEL_ONE, value_1, “lat=9.92323$lng=1.12323”);
// lng is longitude, and lat is latitude, split it with “$”
client.add(VARIABLE_LABEL_TWO, value_2);
client.add(VARIABLE_LABEL_THREE, value_3);
client.sendAll();
delay(1000);
}
Here’s the error log
Response o.0000,temperatura:30.0000|end
OST|BBFF-XHWrX0x909bVFN7qzHqDZQqeeiMglV|GPRS=>latitud:10.0000$lat=9.92323$lng=1.12323,longitud:20.0000,temperatura:30.0000|end
Response of GPRS:
Response of GPRS:
Error with AT
GPRS/3.0.0|POST|BBFF-XHWrX0x909bVFN7qzHqDZQqeeiMglV|GPRS=>latitud:10.0000$lat=9.92323$lng=1.12323,longitud:20.0000,temperatura:30.0000|end
Response of GPRS:
Error with AT+CIPSHUT
Response of GPRS:
GPRS/3.0.0|POST|BBFF-XHWrX0x909bVFN7qzHqDZQqeeiMglV|GPRS=>latitud:10.0000$lat=9.92323$lng=1.12323,longitud:20.0000,temperatura:30.0000|end
Error sending variables
<