Chat freely about anything...

User avatar
By sfyffe
#7655 I am using "ThingSpeak" as one of my test targets as I get my application worked out. I am having a lot of trouble getting this module to work reliably. I have followed advice of other posts and added additional filtering on the power lines as well as higher current power supply to no avail. Here is the basic flow:

Temperature sensors begin.....Locating devices...
Found 1 devices.
Parasite power is: OFF
In function updateTemperatures
Updating ThingSpeak
AT+CIPSTART=4,"TCP","184.106.153.149",80



busy p...

OK
Linked
RECEIVED: Linked in updateThingSpeak CIPSTART command

AT+CIPSEND=4,46

>
GET /update?key=8C7E999NDBU5XPER&field1=73.8


busy s...

SEND OK
RECEIVED: SEND OK in updateThingSpeak in CIPSEND command


+IPD,4,5:23966
OK
AT+CIPCLOSE=4


OK
Unlink


This will work for some times 10 times, 20 times, or 2 times. Eventually, I wind up with following error with the module not able to send any further updates:




In function updateTemperatures
Updating ThingSpeak
AT+CIPSTART=4,"TCP","184.106.153.149",80



busy p...

OK
Linked
RECEIVED: Linked in updateThingSpeak CIPSTART command

AT+CIPSEND=4,46

>
GET /update?key=8C7E999NDBU5XPER&field1=73.8


wrong syntax

ERROR

SEND OK
RECEIVED: SEND OK in updateThingSpeak in CIPSEND command


+IPD,4,5:23968
OK
AT+CIPCLOSE=4


OK
Unlink


How is it possible to wind up with wrong syntax when the syntax worked in the past loop? What is busy p... and how do I handle this return in my code?


Thanks,

Stephen
User avatar
By Mustafa.Haleem
#10380 I'm glad someone else is having this problem. My commands work perfectly, but it keeps telling me the syntax is wrong. This is the only place on the web I could find talking about it. I'm running the board with an Arduino Uno and interfacing with it over the Serial Monitor. Here's my code I'm using to do so.
Code: Select all#include <SoftwareSerial.h>
 
SoftwareSerial esp8266(11,12);

void setup(){
  Serial.begin(9600);
  esp8266.begin(9600);
}

void loop (){
  if(esp8266.available()){
    while(esp8266.available())
    {
      // The esp has data so display its output to the serial window
      char c = esp8266.read(); // read the next character.
      Serial.write(c);
    } 
  }
 
  if (Serial.available()) {
    //read serial as a character
    /*char ser = Serial.read();
 
    //NOTE because the serial is read as "char" and not "int", the read value must be compared to character numbers
    //hence the quotes around the numbers in the case statement

    delay(1000);
   
    String command="";
   
    while(Serial.available()) // read the command character by character
    {
        // read one character
      command+=(char)Serial.read();
    }
    esp8266.println(command); // send the read character to the esp8266
  }
}

I found it along with a video tutorial here: http://allaboutee.com/2014/12/27/esp8266-arduino-code-and-circuit/. It worked perfectly in the video and in my previous use with the obard, this never happenned. Any help would be great!