wifi state change will reset my tcp server
Posted: Wed Dec 16, 2020 2:33 am
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
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