AT+CIPSTART does not end with OK or ERROR
AT+CIPSTART does not end with OK or ERROR
Postby hhc » Tue Jun 02, 2015 4:43 pm
Hi,
As seen in the log below, sometimes AT+CIPSTART returns "busy s..." without ending with ERROR and OK. Does "busy s..." indicate the end of AT+CIPSTART processing by ESP8266? (so that we dont wait for OK or ERROR as mentioned in documentation). Should there be any delay between AT+CIPSENDBUF and AT+CIPSTART ?
In the log we see that "Recv 242 bytes" is send out by ESP8266 after AT+CIPSTART, but we already send 242 bytes before we send AT+CIPSTART.
SDK is v1.1.0.
IP address has been commented out in log.
Regards,
Hew
AT+CIPSTART=0,"TCP","XXX.XX.XXX.XX",8184
0,CONNECT
OK
AT+CIPSENDBUF=0,242
20,19
OK
> AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183
busy s...
Recv 242 bytes
0,20,SEND OK
+IPD,0,322:HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-H: GYrPC2fr/gGPSdjTYN9HMxbA31I=
Content-Type: text/plain
Content-Length: 138
Date: Tue, 02 Jun 2015 08:10:44 GMT
Connection: close
a83d563f|1BD3|b24e4|28eeca39|/fw/5c8e60949772614a2f776bddf2b2f721cd71dcd0.4295004598|c4qIr3LpTDLpJ1Ur09bZyy0dshA=|k4qT0YKG4ZVzeMZVtnZi8Q==0,CLOSED
As seen in the log below, sometimes AT+CIPSTART returns "busy s..." without ending with ERROR and OK. Does "busy s..." indicate the end of AT+CIPSTART processing by ESP8266? (so that we dont wait for OK or ERROR as mentioned in documentation). Should there be any delay between AT+CIPSENDBUF and AT+CIPSTART ?
In the log we see that "Recv 242 bytes" is send out by ESP8266 after AT+CIPSTART, but we already send 242 bytes before we send AT+CIPSTART.
SDK is v1.1.0.
IP address has been commented out in log.
Regards,
Hew
AT+CIPSTART=0,"TCP","XXX.XX.XXX.XX",8184
0,CONNECT
OK
AT+CIPSENDBUF=0,242
20,19
OK
> AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183
busy s...
Recv 242 bytes
0,20,SEND OK
+IPD,0,322:HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-H: GYrPC2fr/gGPSdjTYN9HMxbA31I=
Content-Type: text/plain
Content-Length: 138
Date: Tue, 02 Jun 2015 08:10:44 GMT
Connection: close
a83d563f|1BD3|b24e4|28eeca39|/fw/5c8e60949772614a2f776bddf2b2f721cd71dcd0.4295004598|c4qIr3LpTDLpJ1Ur09bZyy0dshA=|k4qT0YKG4ZVzeMZVtnZi8Q==0,CLOSED
Re: AT+CIPSTART does not end with OK or ERROR
Postby ESP_Faye » Wed Jun 03, 2015 10:31 am
Hi,
It seems that “AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183” is considered as a part of data “AT+CIPSENDBUF=0,242” sent.
This might happen if you are not using UART flow control, UART may lose data, so there are not enough 242 bytes, then the next AT command may be considered as a part of the 242 bytes, the data waiting to send.
Code: Select all
AT+CIPSENDBUF=0,242
20,19
OK
> AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183
busy s...
Recv 242 bytes
0,20,SEND OK
It seems that “AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183” is considered as a part of data “AT+CIPSENDBUF=0,242” sent.
This might happen if you are not using UART flow control, UART may lose data, so there are not enough 242 bytes, then the next AT command may be considered as a part of the 242 bytes, the data waiting to send.
Re: AT+CIPSTART does not end with OK or ERROR
Postby hhc » Wed Jun 03, 2015 8:35 pm
Hi Faye,
We dont think AT+CIPSTART=1 is part of the 242 bytes. Our MCU send out the 242 bytes of data first before sending AT+CIPSTART=1. Since SDK 1.1.0 removed the echo of the 242 bytes, we can't tell what is being received. If the AT+CIPSTART=1.... is not valid, we should not see a "busy s..." right? It should be ERROR since if AT+CIPSTART is part of the 242 bytes, then the remaining data will not form a valid command.
We are guessing also why SDK 1.1.0 removed the echo for data to be transmitted (the 242 bytes) since SDK 1.0.1 echo those data. Our guess is that other messages can be injected (which is not suppose to) during the echo as seen in some of our logs with SDK 1.0.1. We have stop using SDK 1.0.1 because of this.
e.g. we want to send "ABCDEFG"
AT+CIPSENDBUF=0,7
20,19
OK
>ABCD
1,CLOSED <---- mesages inserted into echo, making it difficult to skip echo data
EFG
As for AT+CIPSTART does not end with OK or ERROR, we are ok with it since we treat "busy s..." as the end.
Thanks and best regards,
Hew
We dont think AT+CIPSTART=1 is part of the 242 bytes. Our MCU send out the 242 bytes of data first before sending AT+CIPSTART=1. Since SDK 1.1.0 removed the echo of the 242 bytes, we can't tell what is being received. If the AT+CIPSTART=1.... is not valid, we should not see a "busy s..." right? It should be ERROR since if AT+CIPSTART is part of the 242 bytes, then the remaining data will not form a valid command.
We are guessing also why SDK 1.1.0 removed the echo for data to be transmitted (the 242 bytes) since SDK 1.0.1 echo those data. Our guess is that other messages can be injected (which is not suppose to) during the echo as seen in some of our logs with SDK 1.0.1. We have stop using SDK 1.0.1 because of this.
e.g. we want to send "ABCDEFG"
AT+CIPSENDBUF=0,7
20,19
OK
>ABCD
1,CLOSED <---- mesages inserted into echo, making it difficult to skip echo data
EFG
As for AT+CIPSTART does not end with OK or ERROR, we are ok with it since we treat "busy s..." as the end.
Thanks and best regards,
Hew
Re: AT+CIPSTART does not end with OK or ERROR
Postby ESP_Faye » Mon Jun 08, 2015 8:04 pm
Hi,
In your case, you could send command "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183" after got response "Recv 242 bytes"
Or you could just check what is received on the TCP server, to find out if "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX" to be a part of TCP data.
"busy s.." here may because that with "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX" data length is longer than 242 bytes, then the longer part will be considered as a new command.
Thanks for your interest in ESP8266 !
In your case, you could send command "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX",8183" after got response "Recv 242 bytes"
Or you could just check what is received on the TCP server, to find out if "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX" to be a part of TCP data.
"busy s.." here may because that with "AT+CIPSTART=1,"TCP","XXX.XX.XXX.XX" data length is longer than 242 bytes, then the longer part will be considered as a new command.
Thanks for your interest in ESP8266 !
Who is online
Users browsing this forum: No registered users and 188 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.