Home:ALL Converter>Arduino ESP8266 does not receive all data from HTTP server

Arduino ESP8266 does not receive all data from HTTP server

Ask Time:2015-11-20T16:34:53         Author:Pringles

Json Formatter

I am using arduino and esp8266 to interact with my HTTP server(Nginx+flask). I have already successful sent the request to server, however, while I checked the message esp8266 received, the esp8266 did not get all data from server.

The supposed result should be:

+IPD,179:HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Sat, 02 Jan 2010 00:11:02 GMT
Content-Type: application/json
Content-Length: 25
Connection: keep-alive

{
  "status": "SUCCESS"
}

and currently the result I got is:

+IPD,179:HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Sat,

The stream I sent to the ESP8266 module:

AT+CWMODE=1  
AT+CWJAP="Telstra1357_2.4G","adelaide12345"  
AT+CIPMUX=0  
AT+CIPSTART="TCP","192.168.0.6",80  
AT+CIPSEND=217 POST /data/push/ HTTP/1.1  
Host: 192.168.0.6  
User-Agent: Sensor Station  
Content-Type: application/json  
Content-Length: 89  

{"device_id":0,"data":[{"label":"Light","reading":606},  {"label":"Motion","reading":497}]}  `

I have tried to use timeout/delay to wait for more data, but it didnt work. Anyone has same problem?

Author:Pringles,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/33822172/arduino-esp8266-does-not-receive-all-data-from-http-server
yy