-
Notifications
You must be signed in to change notification settings - Fork 191
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
ESP wont connect back to stored WiFi #307
Comments
Also, [E][WiFiUdp.cpp:219] parsePacket(): could not receive data: 9 How can I get rid of these messages? it makes my serial port impossible to read. thank you |
@plusmartin Hello,
Hmm, that's strange behavior. You are probably using the ESP32 as a platform. So, would you start by dumping the raw credentials stored with AutoConnect?
|
@Hieromon hi!
[E][WiFiSTA.cpp:219] begin(): connect failed! No matter how many times I reboot the ESP it will always give the same error and the only way to connect it to the wifi is by searching for "esp32ap", and selecting the wifi manually in Open "SSIDs". This is the problem that I have. I only want that the ESP connects to the wifi automatically always. |
Hi @Hieromon , |
The library writer asked you to load some code and reply with the result.
Have you done that yet? We can't see the result, so it is hard to decode.
Bear in mind, tens of thousands of people use this library, so we are
trying to help with your configuration.
I notice you pass your SSID and password by reference, but we don't know
your string allocation size.
…On Wed, 3 Mar 2021, 12:32 pm Martin Garcia W., ***@***.***> wrote:
Hi @Hieromon <https://github.com/Hieromon> ,
I hope you can give some guidance on the issue that I presented in my past
post. I tried rebooting and now it wont reconnect (so task 2 of my previous
post is now: ERROR). thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#307 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ7LPAZ3PAU3SR4GRVV5MGLTBWNUDANCNFSM4XN636FA>
.
|
Unfortunately, your reporting phenomenon does not help problem diagnostics for me. The next thing I want you to do is to enable AC_DEBUG and trace the logs. P.S. |
Closed once due to no activity. It will reopen with a new post. |
Hello Hieromon,
Im sorry to insist on this but I still cannot make the ESP autoconnect to a saved credential automatically.
The credential is there but I must select it manually every time I reset the ESP.
The only wifi that the ESP always connects to is that which I declare in the code:
const char *WIFI_SSID = "wifi1";
const char *WIFI_PASSWORD = "12345678";
But If this wifi is not there, the portal shows up (this is ok) but it does NOT connect to the saved wifis.
Please help me fix this insignificant issue.
If I cannot connect to the hard coded wifi I run this:
void APmode()
{
//disableCore0WDT();
Serial.println("AP mode");
Serial.println("Creating portal and trying to connect...");
//Config.immediateStart = true;
Config.autoReconnect = true;
Config.hostName = "mydevice";
Config.portalTimeout = 60000;
Config.apid = "mydevice";
//Config.apip = 192.168.0.1;
Config.retainPortal = false;
Portal.config(Config);
//esp_task_wdt_reset();
// Establish a connection with an autoReconnect option.
bool acEnable;
acEnable = Portal.begin();
if (acEnable)
{
Serial.println("WiFi connected: " + WiFi.localIP().toString());
Portal.handleClient();
}
if (!acEnable)
{
Serial.println("portal end");
}
} // end AP mode
The text was updated successfully, but these errors were encountered: