Error sending from second SIM900 module

Hi, Ubidots community.

I have successfully send data to Ubidots using the first SIM900 device. I tried to use the same code to send data from the second SIM900 device but it gives error in the POST code. I am using an arduino that communicates with SIM900.

Am I using the correct postcode and User Agent? Please kindly help. Thank you.
The error message is as follows:-

Content-TypeAAT+CSTT=“my3g.com

OK
AT+CIICR

OK
AT+CIFSR

21.226.218.83
AT+CIPSPRT=0

OK
AT+CIPSTART=“TCP”,“industrial.api.ubidots.com”,“80”

OK
AT+CIPSEND

ERROR
POST /api/v1.6/devices/sim901 HTTP/1.1
Host:industrial.api.ubidots.com

STATE: IP STATUS

CONNECT X


The send code that I used in arduino is:

void send_value()
{
mySerial.println(“AT+CIPSEND”); //begin send data to remote server
delay(1000);//if send error means data plan not updated
mySerial.println(“POST /api/v1.6/devices/sim901 HTTP/1.1”);
delay(1000);
ShowSerialData();
mySerial.println(“Host:industrial.api.ubidots.com”);
delay(1000);
mySerial.println(“User-Agent:arduino65437823/1.0”);
//mySerial.println(“User-Agent:arduino/1.0”);
delay(1000);
ShowSerialData();
mySerial.print("X-Auth-Token: “);
delay(1000);
mySerial.println(token);
delay(1000);
mySerial.println(“Content-Type:application/json”);
delay(1000);
mySerial.println(“Content-Length: " + le);
delay(1000);
mySerial.println(””);
mySerial.println(var); // Begin send payload to remote servr
delay(2000);
mySerial.println((char)26);
delay(5000);
mySerial.println(“AT+CIPCLOSE”); //close the communication
delay(1000);

}

Hi @fionasoon,

Please find the answer in the following post.

All the best,
-Isabel