I run a TCP server on esp32, esp32 connect to a AP as a station. But the wifi state always change from run to init, and it will reset my Tcp server. System log shows:
I (270506) wifi:state: run -> init (ce00)
I (270506) wifi:pm stop, total sleep time: 63165857 us / 205445718 us
I (270506) wifi<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
E (270516) TCP_SRV: Error occurred during receiving: errno 113
I (270526) TCP_SRV: Socket listening
I (271866) wifi<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
I (271866) wifi:state: init -> auth (b0)
I (271866) wifi:state: auth -> assoc (0)
I (271876) wifi:state: assoc -> run (10)
Is there any way to prevent wifi state change impact my tcp server
wifi state change will reset my tcp server
-
- Posts: 22
- Joined: Wed Dec 19, 2018 2:10 am
Re: wifi state change will reset my tcp server
The disconnect reason code (0xce00) is: WIFI_REASON_AP_TSF_RESET.aureoleday wrote: ↑Wed Dec 16, 2020 2:33 amI run a TCP server on esp32, esp32 connect to a AP as a station. But the wifi state always change from run to init, and it will reset my Tcp server. System log shows:
I (270506) wifi:state: run -> init (ce00)
What is your esp-idf version?
Maybe you need to update your esp-idf since it's fixed.
https://github.com/espressif/esp-idf/issues/5915
-
- Posts: 22
- Joined: Wed Dec 19, 2018 2:10 am
Re: wifi state change will reset my tcp server
thank you for ur reply.
I will update to v4.2 to see how it goes
I will update to v4.2 to see how it goes
Who is online
Users browsing this forum: Majestic-12 [Bot] and 125 guests