{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/arduino-esp32/issues/653","repository_url":"https://api.github.com/repos/espressif/arduino-esp32","labels_url":"https://api.github.com/repos/espressif/arduino-esp32/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/espressif/arduino-esp32/issues/653/comments","events_url":"https://api.github.com/repos/espressif/arduino-esp32/issues/653/events","html_url":"https://github.com/espressif/arduino-esp32/issues/653","id":259474912,"number":653,"title":"WiFi Auto Reconnect Still Not Working - Is there a best practice to guarantee connection?","user":{"login":"vseven","id":999179,"avatar_url":"https://avatars0.githubusercontent.com/u/999179?v=4","gravatar_id":"","url":"https://api.github.com/users/vseven","html_url":"https://github.com/vseven","followers_url":"https://api.github.com/users/vseven/followers","following_url":"https://api.github.com/users/vseven/following{/other_user}","gists_url":"https://api.github.com/users/vseven/gists{/gist_id}","starred_url":"https://api.github.com/users/vseven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vseven/subscriptions","organizations_url":"https://api.github.com/users/vseven/orgs","repos_url":"https://api.github.com/users/vseven/repos","events_url":"https://api.github.com/users/vseven/events{/privacy}","received_events_url":"https://api.github.com/users/vseven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":36,"created_at":"2017-09-21T12:13:54Z","updated_at":"2017-11-28T03:12:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Board:\t\t\t\t\t\t\tModeMCU ESP32 Dev Module\r\nCore Installation/update date:\t\t\t15/Sep/2017\r\nIDE name:\t\t\t\t\t\t\tArduino IDE\r\n\r\nIt seems there is no auto reconnect logic allowing the ESP32 to reconnect when the connection drops or if there is its not working properly.  I have had completely random results with my ESP32 board, sometimes its up for as little as 30 minutes and at most 18 - 20 hours.  WiFi is dropping and doesn't want to reconnect.  \r\n\r\nThe library I am using for WiFi is watching the WiFi event and on a disconnect its trying to reconnect which helps but sometimes it fails the reconnect and then that's it...I have to reboot.  There is no sleep/low power mode at all involved and the device is constantly powered by 3.3v in.   There was a case opened regarding this, https://github.com/espressif/arduino-esp32/issues/353, but its closed without any real answer (says auto connect is kind of implemented...not sure what that means).\r\n\r\nI guess the question comes down to is auto reconnect implemented in the code itself, reliably, and if not what is the best Arduino code way of making sure it is connected?\r\n\r\n-Allan"},"comment":{"url":"https://api.github.com/repos/espressif/arduino-esp32/issues/comments/347400595","html_url":"https://github.com/espressif/arduino-esp32/issues/653#issuecomment-347400595","issue_url":"https://api.github.com/repos/espressif/arduino-esp32/issues/653","id":347400595,"user":{"login":"Markusenz","id":28322343,"avatar_url":"https://avatars1.githubusercontent.com/u/28322343?v=4","gravatar_id":"","url":"https://api.github.com/users/Markusenz","html_url":"https://github.com/Markusenz","followers_url":"https://api.github.com/users/Markusenz/followers","following_url":"https://api.github.com/users/Markusenz/following{/other_user}","gists_url":"https://api.github.com/users/Markusenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Markusenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Markusenz/subscriptions","organizations_url":"https://api.github.com/users/Markusenz/orgs","repos_url":"https://api.github.com/users/Markusenz/repos","events_url":"https://api.github.com/users/Markusenz/events{/privacy}","received_events_url":"https://api.github.com/users/Markusenz/received_events","type":"User","site_admin":false},"created_at":"2017-11-28T03:12:29Z","updated_at":"2017-11-28T03:12:29Z","author_association":"NONE","body":"currently, all reconnects fail with my WROOM32s with following debug output:\r\n\r\n[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 2 - STA_START\r\n....[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 4 - STA_CONNECTED\r\n..[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 7 - STA_GOT_IP\r\nWiFi connected\r\n... then I block antenna reception or press RESET at my AP, to force a disconnect ...\r\n[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED\r\n[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 200 - NO_AP_FOUND\r\n... when reception should be ok again, it takes about 2 minutes until it says:\r\n\r\n[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 8 - STA_WPS_ER_SUCCESS\r\n\r\nHowever it remains disconnected from network forever in that state. \r\nWPS is turned off at my AP. Do not know what  the debug message means.\r\nSame behaviour with two different APs and two different WROOM32 modules, using the wificlient example sketch. No matter if WPA2 used or open network.\r\nCan send Wireshark log in monitor mode if needed."}}
{"actor":{"display_login":"Markusenz"}}