However, if the event is raised because esp_wifi_disconnect() is called, the application should not call esp_wifi_connect() to reconnect. The most common event handle code for this event in application is to call esp_wifi_connect() to reconnect the Wi-Fi. For socket-based applications, the application callback can choose to close all sockets and re-create them, if necessary, upon receiving this event. Notifies the LwIP task to clear the UDP/TCP connections which cause the wrong status to all sockets. Upon receiving this event, the default behavior of the event task is: When the Wi-Fi connection is disrupted because of specific reasons, e.g., the station continuously loses N beacons, the AP kicks off the station, the AP’s authentication mode is changed, etc. If there are more than one AP with the same SSID, the disconnected event is raised after the station fails to connect all of the found APs. the scan fails to find the target AP, authentication times out, etc. When esp_wifi_connect() is called, but the Wi-Fi driver fails to set up a connection with the AP due to certain reasons, e.g. When esp_wifi_disconnect(), or esp_wifi_stop(), or esp_wifi_deinit() is called and the station is already connected to the AP.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |