I'm trying to adapt the esphttpd html example to the RTOS SDK and I've come across a problem with the connection status messages cgi. On successful connection it does not send the ip address, it puts the data into the send buffer and flushes but the browser does not receive it.
It seems to get stuck on select() function in platHttpServerTask after connecting to the access point. After a while it moves to the recovery function but can't recover the connection and closes the socket, I get an errno 104 when this happen and sometimes 103.
I have also tested this when the device is connected to the access point and reconnect back to itself, it works just fine. My guess that what is happening is that after it connects to the new network it starts a new connection and the old socket is no longer available but this seems strange since the nonos sdk works fine.
Anyone got any ideas on this?
Adapting esphttpd HTML example to RTOS SDK
- iot-bits.com
- Posts: 23
- Joined: Tue Dec 05, 2017 2:53 pm
- Location: Pune, India
- Contact:
Re: Adapting esphttpd HTML example to RTOS SDK
Postby iot-bits.com » Thu Feb 01, 2018 4:07 pm
Are you using the right routines? The esphttpd has implementations for both nonOS and RTOS SDK, so you need to specify which setup you are using otherwise things don't go too well.
Re: Adapting esphttpd HTML example to RTOS SDK
Postby htwtsang » Fri Feb 02, 2018 3:03 pm
I'm using the RTOS version, i managed to find a janky workaround to it which is switching back from stationAP to SoftAP mode. The socket is able to write again and it sends the message back to the web browser. The socket was definitely still alive since it still had a valid file descriptor but it never become able to write again unless switched back to SoftAP, which is strange since it sends the information to the webpage after switching to stationAP and before connected.
Who is online
Users browsing this forum: No registered users and 3 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
-
- All times are UTC+08:00
- Top
- Delete all board cookies
- 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.