12:56 pm

November 3, 2017

Does anyone know what is wrong when I am able to complete a send with SEND OK but the channel is not updated? My Arduino code is using TCP and is it very simple. I think I am suppose to get the update number from as feedback but i never get it. The channelcan be updated using the GET command using POSTMAN and via a browser. I have run out of ideas. Do you have any suggestions?
David
#include <SoftwareSerial.h>
#define SIM_800_TX 7
#define SIM_800_RX 6
int midZ=2000;//time delays
int minZ=500;
int maxZ=5000;
SoftwareSerial MySerial(SIM_800_RX, SIM_800_TX); // RX, TX
void setup() {
Serial.begin(9600);
while (!Serial);
MySerial.begin(9600);
delay(midZ);
MySerial.println("at+csq");
delay(minZ);
feedback();
MySerial.println("at+cipshut");
delay(minZ);
feedback();
MySerial.println("at+cstt=\"giffgaff.com\",\"giffgaff\",\"\"");
feedback();
MySerial.println("at+ciicr");//start wireless connection cellular network
feedback();
MySerial.println("at+cifsr");//enquire regarding the IP address allocated
feedback();
MySerial.println("at+cipstart=\"TCP\",\"184.106.153.149\",\"80\"");//connect to the ThingSpeak update URL (https://api.thingspeak.com)
feedback();
MySerial.println("at+cipsend=71");//declare the number of bytes (characters) I want to send
feedback();
MySerial.print("GET https://api.thingspeak.com/update?");//this is a constant beginning for the GET command and is as provided by ThingSpeak
feedback();
MySerial.print("api_key=IVEJWZMAPDSP2AXB");//the channel API key provided by ThingSpeak
feedback();
MySerial.print("&field1=");
feedback();
MySerial.println("5");//the value that I want to post to field 1
feedback();
MySerial.println("at+cipack");//ask for acknowledge details
feedback();
MySerial.println("at+cipclose");//close the IP connection
feedback();
}
void loop() {
if (MySerial.available()) {
Serial.write(MySerial.read());
}
if (Serial.available()) {
MySerial.write(Serial.read());
}
}
void feedback() {
delay(midZ);
while (MySerial.available()) {
Serial.write(MySerial.read());
}
}
6:49 am

November 3, 2017

4:22 pm

April 23, 2018

Hi SailSense,
I have been struggling with exactly the same problem the past 3 weeks. I receive validation "SEND OK", but the field does not update. USING Postman or browser result in a successful update. Have you managed to sort the coding and update successfully? Would you mind sending me the coding please?
Most Users Ever Online: 166
Currently Online:
34 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
rw950431: 272
Vinod: 240
piajola: 95
turgo: 70
vespapierre: 63
Adarsh_Murthy: 62
Member Stats:
Guest Posters: 1
Members: 8665
Moderators: 1
Admins: 2
Forum Stats:
Groups: 3
Forums: 14
Topics: 1600
Posts: 5760
Newest Members:
huldacormier, bogart, estebanmateo93, mikewrite, onlinebusiness, winzy99Moderators: cstapels: 460
Administrators: Hans: 405, lee: 457