Page 1 of 1

SoftAP remove dead station

Posted: Thu Apr 26, 2018 3:08 pm
by sharkx
Hello all,

I'm faced with the following problem with the ESP8266 : one module is configured as SoftAP; some more modules configured as stations; all works well, despite the fact that I'm stuck with the 1.3.0 version.

But sometimes a station module goes dead (the reason is not important); the problem is that the SoftAP seems not to figure this out, and the wifi_softap_get_station_info still returns info about it, and the SoftAP module still tries to send data to it.

Any idea or suggestion about how to handle this is welcome. Thanks in advance.

Re: SoftAP remove dead station

Posted: Sat Apr 28, 2018 2:08 pm
by Her Majesty
Maybe you should update to the latest version. There is an EVENT_SOFTAPMODE_STADISCONNECTED may help.

Re: SoftAP remove dead station

Posted: Wed May 02, 2018 4:04 am
by sharkx
Thanks for the info.
Unfortunately, upgrading is not an option for me; I already tried, but the core libraries along with my own code exceed the 236k limit for the 512k modules, and I'm still using some.

However, I don't think the event would solve my problem; let me explain the problem differently (it's not the exact scenario I have, but I think it's easier to follow).

There are two nodes :
node 1 is running as SoftAP
node 2 is running as station

Code: Select all

Time  Node 1                                                     Node 2
T0    wifi_set_opmode(SOFTAP_MODE)
T1                                                               wifi_set_opmode(STA_MODE)
T2                                                               connects to node 1
T3    wifi_softap_get_station_info returns count=1
T4                                                               power is cut to node 2
T5    wifi_softap_get_station_info returns count=1
T6                                                               power is still cut to node 2 (T6 = T5 + 1minute)
T7    wifi_softap_get_station_info returns count=1