BUG in WiFiMulti.ino
Posted: Tue Jun 19, 2018 1:13 am
Hi, I found wifi errors when I use the WiFiMulti.ino to run the original demo. It noticed that the wifi is wrong and it cannot be connected to wifi.
And I tracked to the function run(uint32_t) in WiFiMulti.cpp and added if(status != WL_CONNECTED){
WiFi.disconnect();
} in the end of uint8_t status = WiFi.status();
Well, this time, through it would not indicate Wi-Fi errors, but it still cannot be connected to Wi-Fi.
Then, I added log_d("0123456789012345678012345678901\n"); to if(bestNetwork.ssid) and selected “Debug” in editing Core Debug Level. The program runs ok when uploaded to esp32. However, when I tried decreasing strings in the log_d();, it failed to connect to Wi-Fi again. I tried to add delay functions, but it did not work.
I am so confused about this kind of question. Could you please help me to figure it out? Thanks very much!
And I tracked to the function run(uint32_t) in WiFiMulti.cpp and added if(status != WL_CONNECTED){
WiFi.disconnect();
} in the end of uint8_t status = WiFi.status();
Well, this time, through it would not indicate Wi-Fi errors, but it still cannot be connected to Wi-Fi.
Then, I added log_d("0123456789012345678012345678901\n"); to if(bestNetwork.ssid) and selected “Debug” in editing Core Debug Level. The program runs ok when uploaded to esp32. However, when I tried decreasing strings in the log_d();, it failed to connect to Wi-Fi again. I tried to add delay functions, but it did not work.
I am so confused about this kind of question. Could you please help me to figure it out? Thanks very much!