-->
Page 1 of 1

ESP do not send last packet to server

PostPosted: Tue Jun 16, 2015 11:12 pm
by aegiacometti
Hi, i'm try make this works for more than an month, any help or guidance would be greatly appreciated... i'am really really missing here... dont know what else to do...

I'm trying arduino uno (ide1.6.4) with softserial to esp at 9600. I do have a voltage divisor. All AT commands responds ok. This is my esp firmware:

AT+GMR
0020000903
compiled @ Dec 15 2014 19:43:31
AITHINKER-20141206

I'am trying to send http traffic to plot.ly. Since it works fine with ethShield, now i'am trying with ESP wifi because i need wifi, and a shield is not an option because of size, pins, and cost.

Also i'am using wireshark in order to sniff the traffic to what is going in and out the wifi network.

Here is the issue:

1.- AT+CIPSTART=0,"TCP","plot.ly",80 -> work fine, since i see SYN/ACK going arround. Check ok.

2.- AT+CIPSEND=0,334
POST /clientresp HTTP/1.1
Host: plot.ly:80
User-Agent: Arduino/0.6.0
Content-Length: 244

version=2.3&origin=plot&platform=arduino&un=xxxxxxxxxxxx&key=xxxxxxxxxx&args=[{"y": [], "x": [], "type": "scatter", "stream": {"token": "xxxxxxxxxx", "maxpoints": 30}}]&kwargs={"fileopt": "overwrite", "filename": "xxxx", "world_readable": true}

Send OK.

But if check the sniffer i have a missing HTTP post.

The first picture is a workinf capture of posting to plotly via ethernet. I crop a cople of lines and dont check size. Take a look at the line the says HTTP post.

WorkEth.png



and the second is a picture from a NON working post using ESP. If you take a look, before the syn/ack, the info is beeing sent, but the last packet with the HTTP post does not. Later i get a request time out from server.

nonWorkESP.png


In the detailed packet capture i'am seeng that all the information is beeing sent from arduino to ESP and the to wifi AP.

plotly.png


But the last packet of HTTP post.... i'am not seen it...

I don't know if i should try to change the firmware... to switch one?
I could try with an arduino mega just to keep all serial in hardware, but i don't think that would solve this particular issue.

Thanks in advance... cheers

Re: ESP do not send last packet to server

PostPosted: Mon Jun 22, 2015 12:24 am
by ricg
Perhaps you could post your code ? Difficult to say without it.

Re: ESP do not send last packet to server

PostPosted: Sat Jun 27, 2015 10:24 am
by aegiacometti
problema solved, it seems to be an firmware issue/bug or something that i donĀ“t fully understand, anyway, this is how i solved the problema...

i bought an USB-TTL for use with "esp8266 User Program" (excelent one)
https://hackaday.io/project/3568-esp8266-test-program

and then to the task of upgrading firmware, lucky me i've found this page
https://developer.mbed.org/users/sschocke/code/WiFiLamp/wiki/Updating-ESP8266-Firmware
wich is really great for a begginer like me, expaining step by step the upgrade procedure, and also including the file downloads to do it. (also it allows me to recover a broken ESP8266 module after the exceution of cloud upgrade...

So... i recover the broken ESP and upgraded both firmware with 002000904

I didn't need to do anything else... it starts working right away... :)

thanks for you interest