Skip to content
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

Need to reassign wifi credentials on reset #16

Open
mourraille opened this issue May 22, 2022 · 13 comments
Open

Need to reassign wifi credentials on reset #16

mourraille opened this issue May 22, 2022 · 13 comments

Comments

@mourraille
Copy link

Anyway I can make the esp32 automatically reconnect to my preferred SSID on reboot? Whenever theres a power cut or something like that it requests me to select a wifi network every time. Cant it reconnect on its own ?

@tomcat-xx
Copy link

For me even after re-flashing (without erasing flash) the wifi settings are still there.

As I now after longer break finally made it to add users with keyble installed my Raspberry Zero W I also flashed the esp32 again. Did not remember which version was on and wanted to be sure. This time I did it without erasing the flash (requested in the step by step instruction). All settings were still there (wifi and also mqtt),

@mourraille
Copy link
Author

I made it work by hardcoding credentials under Portal.begin(SSID,PASS) 🤷🏻‍♂️

@marcelk1101
Copy link

I made it work by hardcoding credentials under Portal.begin(SSID,PASS) 🤷🏻‍♂️

Can you please exactly what to do, in which lines!? My ESP32 also lost the connection after some time? What changes you made in code? Thank you.

@DaHype
Copy link

DaHype commented Feb 28, 2023

I made it work by hardcoding credentials under Portal.begin(SSID,PASS) 🤷🏻‍♂️

Can you please exactly what to do, in which lines!? My ESP32 also lost the connection after some time? What changes you made in code? Thank you.

Did you found an solution? Same Problem... Thanks

@marcelk1101
Copy link

I made it work by hardcoding credentials under Portal.begin(SSID,PASS) 🤷🏻‍♂️

Can you please exactly what to do, in which lines!? My ESP32 also lost the connection after some time? What changes you made in code? Thank you.

Did you found an solution? Same Problem... Thanks

No, need some help from @mourraille

@DaHype
Copy link

DaHype commented Mar 20, 2023

I hope @mourraille can explain it. :-(
It workls nearly perfect, but each day i have to reconnect again manual to my network :-( :-(

@DaHype
Copy link

DaHype commented Mar 26, 2023

I contaced @mourraille with email and Insta but he don´t write back.
I really hope someone can help here with that.
It's so awkward having to dial in every day. Thank you!

@DaHype
Copy link

DaHype commented Mar 26, 2023

// ---[SetupWiFi]---------------------------------------------------------------
void SetupWifi()
{
digitalWrite(LED_GPIO,LOW);

if (Portal.begin())
{
if (WiFi.status() == WL_CONNECTED)
{
Serial.println("# WIFI: connected to SSiD: " + WiFi.SSID());
digitalWrite(LED_GPIO,HIGH);
}
int maxWait=100;
while (WiFi.status() != WL_CONNECTED) {
Serial.println("# WIFI: checking SSiD: " + WiFi.SSID());
delay(500);

if (maxWait <= 0)
    ESP.restart();
  maxWait--;

}
Serial.println("# WIFI: connected!");
Serial.println("# WIFI: signalquality: " + String(GetWifiSignalQuality()) + "%");
Serial.println("# WiFi connected to IP: " + WiFi.localIP().toString());
digitalWrite(LED_GPIO,HIGH);
}

So it means i have to insert here SSID and PW from my Wifi?

if (Portal.begin(MY SSID) MY PASSWORD)

??

@DaHype
Copy link

DaHype commented Apr 7, 2023

It seems no one will or can help with that :-(

@DaHype
Copy link

DaHype commented May 7, 2023

Please need help for Hardcoding the Wifi, each day i have the Problem that the ESP32 lose the connection to the Wifi and than shown the Wifi keyble and i have to set up again. Than it works some hours only!

HELP!

@marcelk1101
Did you found an solution?

@tomcat-xx
Copy link

What I did is:
if (Portal.begin("SSID","key"))

For me that helps when ESP32 lost power or I restart it.

But ... I'm still having issues when WIFI was off (AP restart, AP without power but not ESP32). Then connection get lost and I have to manually restart keyble.

@DaHype
Copy link

DaHype commented May 14, 2023

@tomcat-xx

Thanks, but where i have to insert this?
In main config? And on which place?

Would be great if you can send me the Code or explain on which place i have to insert the Creditionals.

THANK you so much.

Yes the issues from AP OFF and so on, i have also, but it would help me already a lot when i can solve the first Problem with that Portal.begin......

@tomcat-xx
Copy link

Ah, sorry, I thought it is about how, now where. Because the line is in your comment from March 26 already. So in main.cpp (in my case renamed to main.ino as I used Arduino IDE to flash).

For me it is in line 531, but I'm using corgan2222/esp32-keyble. Here it seems to be line 474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants