softAP mode will never timeout client
Posted: Sun Apr 22, 2018 1:37 am
I have setup a ESP32 in softAP mode to allow just 1 client connection.
1 client connects and then establishes a tcp connection (esp32 AP is the tcp server).
Then I cut power to the wifi client (doesn't matter if the client is a computer or another esp32).
The SoftAP ESP32 will never realize the client is gone (I never get a SYSTEM_EVENT_AP_STADISCONNECTED), and the ESP32 will keep returning success on the send() call to the tcp soscket.
Is this a bug? Is there a way to setup a timeout other than handling it myself in the tcp connection?
I just updated my esp-idf to today's latest (4e982d4b185460da4499bfe6e6530e4852eb6b9e). I'm running also in single core mode at 80Mhz.
PS: As I was writing this I finnaly got a SYSTEM_EVENT_AP_STADISCONNECTED, but that was after several minutes, is there are way to make that faster? Also despise the client being gone calls on the tcp socket keep succeeding (send(socket, buf, 1, 0) returns 1).
1 client connects and then establishes a tcp connection (esp32 AP is the tcp server).
Then I cut power to the wifi client (doesn't matter if the client is a computer or another esp32).
The SoftAP ESP32 will never realize the client is gone (I never get a SYSTEM_EVENT_AP_STADISCONNECTED), and the ESP32 will keep returning success on the send() call to the tcp soscket.
Is this a bug? Is there a way to setup a timeout other than handling it myself in the tcp connection?
I just updated my esp-idf to today's latest (4e982d4b185460da4499bfe6e6530e4852eb6b9e). I'm running also in single core mode at 80Mhz.
PS: As I was writing this I finnaly got a SYSTEM_EVENT_AP_STADISCONNECTED, but that was after several minutes, is there are way to make that faster? Also despise the client being gone calls on the tcp socket keep succeeding (send(socket, buf, 1, 0) returns 1).