Page 1 of 1

WiFiEvent SYSTEM_EVENT_STA_DISCONNECTED not fired

Posted: Thu Aug 09, 2018 10:00 am
by Ankit Siddhapura
Hello,

I am using espnow protocol for packet transfer in my application, two rtos tasks are continuously running with minimum delay of 100ms to send and receive packets. One timer callback function for scan AP record on 5 sec interval on given channel with SSID and Password.

Once all task are running, during if AP is power off STA did not generate SYSTEM_EVENT_STA_DISCONNECTED event.

if I stop scan timer call back and remove AP, connected station generates SYSTEM_EVENT_STA_DISCONNECTED event. In another scenario if scan function is running on 5 sec interval and AP is powered off for some time and again on power on STA generates SYSTEM_EVENT_STA_DISCONNECTED event and then re connect to AP.

Seems event is not triggered on correct time, is it possible to change priority of event task?
I am looking for solution to get system events trigger in event handler in my application code.

Regards,
Ankit Siddhapura

Re: WiFiEvent SYSTEM_EVENT_STA_DISCONNECTED not fired

Posted: Thu Aug 09, 2018 2:09 pm
by Ankit Siddhapura
I got solution by adding minimum delay of 100ms in RTOS task and scan interval to 1 minute in timer callback function.

Thank You! :)