[SOLVED] GPRS SIM900 MultiValues

I’m trying to create an Android application that will be using a Arduino Uno, the Ada Breakout GPS, and the GPRS. I went an downloaded the zip files from [Github][1]. I ran the UbidotsSaveValue with no problem (it updates Ubidots). Trouble comes when I try to run UbidotsSaveMultiValues.

#include <Ubidots_Arduino_GPRS.h>
#include <SoftwareSerial.h> 
//Serial Relay - Arduino will patch a 
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART 
#define APN "att.mvno" 
#define USER ""  // If your apn doesnt have username just put ""
#define PASS ""  // If your apn doesnt have password just put ""
#define TOKEN "HKM7SOBdxgPaW9hVNgquUU0IWYP7sv"  // Replace it with your Ubidots token
#define ID "56d5d69d7625424120f93ca2" // Replace it with your Ubidots' variable ID
// You can send 1 to 10 variable at the same time
//#define ID1 "" // Replace it with your variable ID
//#define ID2 "Your_id_here" // Replace it with your variable ID
//#define ID3 "Your_id_here" // Replace it with your variable ID


Ubidots client(TOKEN);  
  
void setup() {
  Serial.begin(19200);             // the Serial port of Arduino baud rate.  
 client.powerUpOrDown();
  client.setApn(APN,USER,PASS);
}

void loop() {
  float value_1 = 22;
 // float value_2 = analogRead(A1);
//  float value_3 = analogRead(A2);

  // To send a value with a context is like: (ID,value,"NAME_CONTEXT:VALUE_CONTEXT","")
  // If you don't want to send any context only put "" like this (ID,value,"","")
  // Example with context:
  // client.add(ID1, value_1, "Lat:9.786589", "Long:1.8688797");

  client.add(ID, value_1,"Lat:9.786589", "Long:1.8688797");//"", "");
 // client.add(ID1,value_2, "", "");
 // client.add(ID3,value_3, "", "");

  client.sendAll();
}

The serial monitor displays:

Response of GPRS:

Response of GPRS:
AT+CSQ

+CSQ: 13,0

OK

Response of GPRS:
AT+CGATT?

+CGATT: 1

OK

Response of GPRS:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK

Response of GPRS:
AT+SAPBR=3,1,"APN","att.mvno"

OK

Response of GPRS:
AT+SAPBR=3,1,"USER",""

OK

Response of GPRS:
AT+SAPBR=3,1,"PWD",""

OK

Response of GPRS:
AT+SAPBR=1,1

OK

Response of GPRS:
AT+SAPBR=2,1

+SAPBR: 1,1,"10.135.197.49"

OK

Response of GPRS:
AT+HTTPTERM

ERROR

No HTTP to close
Response of GPRS:
AT+HTTPINIT

OK

Response of GPRS:
AT+HTTPPARA="CID",1

OK

Response of GPRS:
AT+HTTPPARA="UA",Ubidots/v1 ArduinoGPRS/1.0"

OK

Response of GPRS:
AT+HTTPPARA="URL","translate.ubidots.com:9080/arduino/gprs/?token=HKM7SOBdxgPaW9hVNgquUU0IWYP7sv"

OK

Response of GPRS:
AT+HTTPDATA=64,120000

DOWNLOAD

Response of GPRS:
OK

Response of GPRS:
AT+HTTPACTION=1

OK

+HTTPACTION:1,201,2

Response of GPRS:
AT+HTTPREAD

+HTTPREAD:2
OK
OK

Response of GPRS:
AT+HTTPTERM

OK

Response of GPRS:
AT+HTTPTERM

ERROR

No HTTP to close
Response of GPRS:
AT+HTTPINIT

OK

Response of GPRS:
AT+HTTPPARA="CID",1

OK

Response of GPRS:
AT+HTTPPARA="UA",Ubidots/v1 ArduinoGPRS/1.0"

OK

Response of GPRS:
AT+HTTPPARA="URL","translate.ubidots.com:9080/arduino/gprs/?token=HKM7SOBdxgPaW9hVNgquUU0IWYP7sv"

OK

Response of GPRS:
AT+HTTPDATA=64,120000

DOWNLOAD

Response of GPRS:
OK

Response of GPRS:
AT+HTTPACTION=1

OK

Response of GPRS:
AT+HTTPTERM

ERROR

No HTTP to close

But Ubidots isn’t showing any updates.
Anybody know whats happening? Right now I’m just sending values to see if they will update online. Eventually I will connect the GPS and have the context include real-time lat and long values, which will then be requested from an Android app.
Any insight or advice is appreciated :slight_smile:
[1]: https://github.com/ubidots/ubidots-arduino-gprs

I’m having the same issue. Works fine with uploading one variable but I don’t get a response when I upload multivalues.
Lets see if anyone knows the answer…

I got it to work by downloading again the library. I contacted the library administrator and he said there was an internal Ubidots error and should work now

1 Like

Awesome. It’s working now. I thought it was an error in the code I had written. Thanks for letting the admins know about the problem :smile:

1 Like