Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Description
Hello,
I am facing some issues while trying, in a larger project, to accomplish the following:
- Try to connect to the internet via WiFi
- If connection fails, open Access Point (AP) and let user insert WiFi credentials (through captive portal)
- Go back to point 1
Every time I close a connection, I callWiFi.disconnect() andWiFi.end(); Moreover, when AP operations are completed, I callWiFiClient::stop(). MyWiFiClient object is global and obtained throughWiFiServer::available().
After closing AP connection, I could connect to the WiFi but any connection (e.g., towww.google.com) failed by a time-out. I kind of solved the problem through the following code I invoke every time I switch between point 1 and 2 of the algorithm.WiFi = WiFiClass(WiFiInterface::get_default_instance());
However I do not understand such a behaviour.
Now, if WiFi connection fails after AP was accomplished once, AP is opened again, but this timeWiFiServer::available() fails, in the sense that no data are ever available. However, I controlled network traffic through Wireshark and I see that DNS management throughWiFiUDP succeded, while an http requestGET /wpad.dat HTTP/1.1 was sent by the client, but never received by the server.
It seems to me that there are library issues then, or at least poor documentation for me to be able to understand whether I am doing anything wrong