ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By pvvx
#6737
mharizanov wrote:I am experiencing resets after a 'malloc assert!' error, @pvvx has tracked the issue down to to LWIP releasing connections upon timer expiration in 60 seconds and not upon espconn_disconnect()

see here for his demo of the issue: https://www.youtube.com/watch?v=fAYhE389BbM

He suggests calling a "patch" function to force cleanup, but that doesn't seem to help much in my case.

Any suggestions to handle this in a more elegant way?

http://www.serverframework.com/asynchro ... rvers.html
The server does not have to use disconnect. The client proxy -> have to do disconnect. Proxies do not comply with the standards ... :)
espconn.h SDK 0.9.4:
enum espconn_option{
ESPCONN_REUSEADDR = 1, // delete TIME_WAIT State pcb
ESPCONN_END
};
But all this does not help do the job properly through espconn. Use Lwip! :)
transfer files of unknown size -> Chunked transfer encoding http://en.wikipedia.org/wiki/Chunked_transfer_encoding
If(client HTTP/1.1) -> Chunked, data end -> timeout (Waiting for sending disconnect from the client), disconnect -> does not remain TIME_WAIT state pcb. Else (client HTTP/1.0), data end transfer, disconnect... have to remove TIME_WAIT pcb - remove pcb -> errors may occur in the TCP/IP stack ...
User avatar
By banitama
#6781
Sprite_tm wrote:Banitama, dtns: If you compile the AT code with the SDK and flash that, then use AT commands to connect to the access point, does the ESP connect to / remember the access point data then?

dnts: The timer thing is a nice observation: I perhaps should code that a bit differently to account for slower DHCP servers like yours.


Thanks sprite,
I flashed official firmware v00170901, managed to connect to my secure AP, got IP address, and replied ping from another device.
And then I flashed esphttpd via make flash and make htmlflash. After flashing, I power-cycled the module. It joined my AP and I can connect and browse my ESP module with IP address displayed after "DHCP client start" line.
After that, I played around on /wifi page, tried to join another secure AP, and it failed to join....

Btw, does previously flashed official firmware version affect operation of flashed firmware in the future?
User avatar
By Sprite_tm
#6794
banitama wrote:Btw, does previously flashed official firmware version affect operation of flashed firmware in the future?


Hmm, now you ask... I seem to remember something about needing to zero out the config space in the ESP flash when upgrading to a certain SDK version from an older one... Could you try flashing the (provided in the SDK) file blank.bin to address 0x7e000 and see if the http example does what you expect it to do?