-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
event_handler SYSTEM_EVENT_AP_STADISCONNECTED sometimes not received (IDFGH-15) #2375
Comments
Hello can somebody tell us when this thing is going to get fixed? |
I would like to know if it is a problem that can be solved, even using a workaround. |
@francescofcf In my project I have had to use several different checks to see if the WiFi connection is still active. I ping a number of servers and after a certain number of pings I try to reconnect. In addition, when starting a connection I set a timer and if I don't get either a CONNECTED or DISCONNECTED message within several seconds I abort and try again. This works, but it's certainly not ideal. |
Unfortunately, I can't do anything like that. I open only a communication and do not do traffic. |
@francescofcf hi, can you offer your reproduce step, because I can always receive AP_STADISCONNECTED event after connected event, maybe there is unknow gap between us |
only simple_wifi example, connect and diaconnect repeataly and loose the disconnect event. |
As i have understood throughout reading the problem over and over again , i don't think this event can happen at exact time as we wanted because this is how all the wifi works, for continuous checking that the station is available or not there should be some ping a like (AP pings every station connected to it to check it is still there) method in wifi standards , there is one but it is slow , it will took roughly 2-10 minutes to get to know that station is disconnected in every router ( when station just stopped working without notifying ap ) so if anyone who wants to check whether station is disconnected or not (fast) should have to implement a ping a like mechanism on your own in the code from AP side and if you handle the station code as well you can send message to AP in regular interval and if it didn't get received in AP side in some time (using some timer mechanism) you can get to know that station is disconnected! |
@akshar001 @francescofcf
|
Maybe Wifi power savings is involved. Try this |
SO: Windows 10
IDE: Eclipse IDE for C/C++ Developers Version: Photon Release (4.8.0) Build id: 20180619-1200
environment: esp32_win32_msys2_environment_and_toolchain-20180110
ESP-IDF version: v3.2-dev-362-g1c7a8b3b
EspTools : esptool.py v2.5.0
Source code : "Simple WiFi Example" in "esp-idf \ examples \ wifi \ simple_wifi \ main"
Source Code config : AP mode
Client : Iphone 6s
Power : external 3.3V
DevBoard1 : ESP32 DEVKITV1
Chip is ESP32D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core
MAC: 24:0a:c4:80:32:e8
DevBoard2: my board with
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse
MAC: 80:7d:3a:82:1c:50
Hi, I have an problem about event_handler(void *ctx, system_event_t *event)
I have chek the problem also in "Simple WiFi Example" in "esp-idf \ examples \ wifi \ simple_wifi \ main" whitout modify.
The simple project "Simple WiFi Example" has the same problem!
Below there is the output about "Simple WiFi Example", see output on UART at “57148 “ and “127508”
I have add as first row the below in event_handler:
ESP_LOGI(TAG, "EVENT: %d",event->event_id);
The problem is:
At startup the event_handler receive:
Event 13 : SYSTEM_EVENT_AP_START
after connected
Event 15 : SYSTEM_EVENT_AP_STACONNECTED
Event 17 : SYSTEM_EVENT_AP_STAIPASSIGNED
but after disconnected sometimes (often the first time) the
Event 16 : SYSTEM_EVENT_AP_STADISCONNECTED
it is not received.
After If I add a task and print this information:
the old station now disconnected is given as connected
The procedure that I use to disconnect the station (Apple smartphone) is to turn off the your wifi.
Output on UART
The text was updated successfully, but these errors were encountered: