SoftAP remove dead station

Posts: 29
Joined: Wed Jan 06, 2016 2:59 am

SoftAP remove dead station

Postby sharkx » Thu Apr 26, 2018 3:08 pm

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.

Her Majesty
Posts: 383
Joined: Mon Oct 27, 2014 11:09 am

Re: SoftAP remove dead station

Postby Her Majesty » Sat Apr 28, 2018 2:08 pm

Maybe you should update to the latest version. There is an EVENT_SOFTAPMODE_STADISCONNECTED may help.

Posts: 29
Joined: Wed Jan 06, 2016 2:59 am

Re: SoftAP remove dead station

Postby sharkx » Wed May 02, 2018 4:04 am

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   

Who is online

Users browsing this forum: No registered users and 5 guests