AT+CIPSEND= Not returning > | ESP Wi-Fi | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
AT+CIPSEND= Not returning >
No permission to create posts
April 20, 2018
8:48 pm
Avatar
dennis55
New Member
Members
Forum Posts: 2
Member Since:
April 20, 2018
sp_UserOfflineSmall Offline

I am attempting to send data to thingspeak using a ESP8266 and a arduino mini pro 16. I am using the example Arduino code for the "ESP8266 WIFI TEMPERATURE LOGGER" instructables. This project is listed as an example on the Thingspeak Support page, linked as "WiFi ESP8266 Wifi Temperature Logger [External]".

I have set up the hardware and have established serial communication between the Arduino and the 8266 WiFi module. I believe the serial connection is good. I get the expected appropriate messages on the Serial monitor when the setup and connectWiFi functions run on the arduino. There is no error reported when the AT+CIPSTART command is sent to the web page. However! the > is never returned after the AT+CIPSEND= command is sent to thingsspeek. The AT+CIPCLOSE is sent to the serial monitor and the ESP8266. the RECEIVED Error message is sent to the serial monitor. The GET command is never sent to thingspeak because the > is never returned after the AT+CIPSEND= command is sent.

I have tried everything I can think of to determine where the issue may be. I am completely out of ideas.

I could post the code here but is available here [ http://www.instructables.com/id/ESP8266-Wifi-Temperature-Logger/ ] with a considerable amount of detail about the system I am attempting to replicate.

PS The system is reading temperatures correctly. I can modify the code and send the temperature reading to the serial monitor.
Also I have bean successful in sending test data to my thingspeak channel by using a web browser address bar and modifying this https://api.thingspeak.com/update?api_key=YOUR WRITE API KEY&field7=0.0000672.

Update;
I have now completely removed the arduino and connected a serial to USB adapter directly to the ESP8266 module. I have serial com with the module. The AT, AT+RST, AT+CWMODE, AT+CIPMUX, & AT+CWLAP commands all work as expected. I am getting a full listing of the available WiFi access points with the CWLAP comand.

however when I attempt to connect to the thingsreak server I get an error.

AT+CIPSTART="TCP","184.106.153.149",80

no ip

ERROR

I would greatly appreciate any suggestions or help if anyone can point the problem.
thanks.

April 21, 2018
1:13 am
Avatar
piajola

Gold
Members
Forum Posts: 113
Member Since:
October 12, 2015
sp_UserOfflineSmall Offline

Hi dennis55,

Please read this post (click link)

https://community.thingspeak.com/forum/esp8266-wi-fi/updating-data-in-thingspeak/#p5544

if that is no help, please ask again and I can explain in more detail.

The idea is to test manually first to send with your ESP some data to Thingspeak. When it is working you put the arduino in charge.

This works, I have now more than 1000000 points in my channel with my ESP01-arduino couple Smile

April 21, 2018
12:33 pm
Avatar
dennis55
New Member
Members
Forum Posts: 2
Member Since:
April 20, 2018
sp_UserOfflineSmall Offline

Hi piajola
thanks for the reply, unfortunately I am still not getting any data posted onto my thingspeak channel.

I have read the forum post that you linked. I am getting the same "busy s..." message that is mentioned there.
I have set up the serial com using both PUTTY and the Arduino ide serial monitor. The results are the same every time. when I send the GET... command after the AT+CIPSEND command I always receive the busy s... .

I have tried sending the serial using all the possible line end arrangements. NL & CR, newline only, carnage return only and no line ending. I have adjusted the value of the AT+CIPSEND = ? command, in an attempt to discover if I was not counting the line end charterers as required. I have tried sending one set and two sets of carnage returns and line ends to the end of the get command statement.

I did not see or perhaps never understood what other step I might attempt to resolve this issue from the forum link.

I see /n on the serial monitor after the > symbol that is returned after the AT+CIPSEND command in sent. This leads me to think the issue in related to the end character sent in ether the AT+CIPsend command or the GET... command that where sent. I have attempted to try every combination of line end characters I think may help but nothing works.

AT

OK
AT+RST

OK
c_⸮R#⸮fJ[:fJ[⸮fJ⸮⸮O⸮G⸮G⸮⸮O⸮X
⸮X
ready
WIFI CONNECTED
WIFI GOT IP
AT+CIPMUX=0

OK
AT+CWMODE=1

OK
AT+CIPSTART="TCP","184.106.153.149",80

CONNECT

OK
AT+CIPSEND=46

OK
>\ n

busy s...

Recv 46 bytes

SEND OK
CLOSED

April 21, 2018
3:31 pm
Avatar
piajola

Gold
Members
Forum Posts: 113
Member Since:
October 12, 2015
sp_UserOfflineSmall Offline

Hi dennis55,

Have you read this other link mentioned ?
( https://community.thingspeak.com/forum/esp8266-wi-fi/dns-fail-error/#p5426 )
at the end it is mentioned the effective send (cipstart-cipsend)

It seems your troubles are in character count ... and must be ended with CR-LF (ascii 13-10 or 0x0D-0x0A)
your
-- AT+CIPSEND=46
--
-- OK
-- >\ n
--
-- busy s...
--
-- Recv 46 bytes
--
-- SEND OK
-- CLOSED

has the busy s... or Failed - try another way

See my comments (post #p5426) about PUTTY how to end the strings to send

As you like to try a lot (good thing!Wink ) you have something to do.

Please tell your finds (remember .. this works very well)

April 26, 2018
5:12 pm
Avatar
SailSenseTech
New Member
Members
Forum Posts: 4
Member Since:
November 3, 2017
sp_UserOfflineSmall Offline

Hi Dennis

You do not need to worry about counting the length of the update string. You can just issue the command AT+CIPSEND with no "=". Terminate the GET request with
SIMSerial.println(updateStr1);
SIMSerial.println();
SIMSerial.print("\u001A");

SIMSerial.println("at+cipstart=\"TCP\",\"184.106.153.149\",\"80\"");//connect to the thingspeak update URL this is https://api.thingspeak.com
char searchStr[] = "CONNECT OK";
if (SIMSerial.find(searchStr)) {
Serial.println("Start OK");
SIMSerial.println("at+cipsend");
char searchStr[] = "ERROR";
if (SIMSerial.find(searchStr)) {
Serial.println("CIPSEND failed");
}
else {
SIMSerial.print("GET /update?key=");
SIMSerial.print(myAPI);
SIMSerial.println(updateStr1);
SIMSerial.println();
SIMSerial.print("\u001A");// cntl+Z to terminate the SEND from the GSM since we did not define the request length
char searchStr[] = "OK";
if (SIMSerial.find(searchStr)) {
Serial.println();
Serial.println("GET sent okay");
passFlag = true;
feedback();
}
}

I hope this helps.
David

December 7, 2020
2:08 am
Avatar
sam101
New Member
Members
Forum Posts: 3
Member Since:
December 7, 2020
sp_UserOfflineSmall Offline

piajola said

Hi dennis55,

Have you read this other link mentioned ?
( https://community.thingspeak.com/forum/esp8266-wi-fi/dns-fail-error/#p5426 )
at the end it is mentioned the effective send (cipstart-cipsend)

It seems your troubles are in character count ... and must be ended with CR-LF (ascii 13-10 or 0x0D-0x0A)
your
-- AT+CIPSEND=46
--
-- OK
-- >\ n
--
-- busy s...
--
-- Recv 46 bytes
--
-- SEND OK
-- CLOSED

has the busy s... or Failed - try another way

See my comments (post #p5426) about PUTTY how to end the strings to send

As you like to try a lot (good thing!Wink ) you have something to do.

Please tell your finds (remember .. this works very well)  

I have a ESP-01s and have connected it to my PC with a serial to USB adapter. I am now using Putty and At commands and here is what I get:
I use AT+CIPMODE=1 & AT+CWMODE=1 and have connected to my wifi using AT+CWJAP= ___, ___
Then I set AT+CIPMUX=0
I then am able to connect to thingspeak using: AT+CIPSTART="TCP","api.thingspeak.com",80 (I have also tested AT+CIPSTART="TCP","184.106.153.149",80)
Now here is where I run into trouble: AT+CIPSEND=51

I then enter
GET /update?api_key=U500NH0PAMAF927A&field1=255
I then get
busy s...

Recv 51 bytes

SEND OK
This does not update my thingspeak so I have tried to resolve the busy s... by increasing the byte length but whenever I use any number besides 51 it returns No tail Error
I have tried doing ctrl M and then ctrl J and have tested using every variation of code aswell as looking at data sheets and do not know what to do.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
29 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:

Advantagetreeexperts, laundrydaddyuk, techhhelp5, ken, tran, huldacormier

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457