Page 1 of 1

Updating wifi conf while running

Posted: Thu Feb 16, 2017 5:52 pm
by lchazall
Hello,

I am trying to configure the esp32 as a station remotely.
So I first set the ESP32 as an access point, in order to get the SSID and the key (of a router) from a user interface.

Then, I want to connect to this router but without restarting wifi (just starting station), in order to give a feedback (via ESP AP) to user who entered logins (like "ESP32 is now connected and its IP is XXX.XXX.XXX.XXX").

What I tried is :
- Recieving SSID + KEY from user interface
- Adding it to sta configuration from wifi_config
- esp_start_wifi
- In event handler : If "start STA" event => connect
But I only get the "start STA" event when starting AP.

(the mode I have set at the beginning is APSTA)
How do you think I can handle that ?

(hoping you understood my issue) ;)

Re: Updating wifi conf while running

Posted: Fri Feb 17, 2017 10:50 am
by lchazall
I solved this by myself.

I Just have to set config and then connect ... As simple as that.

Re: Updating wifi conf while running

Posted: Mon Nov 20, 2017 9:55 am
by Plachol1992
Hi @lchazall I am also facing similar problem that i want to set wifi ssid and password while running system then connect to it. I am searching everywere but i can't find any helpfull code to se how it works to implement it in my system. Do You have any codes that will show how you resolved this problem and how it works from software site ? Best Regards Adam

Re: Updating wifi conf while running

Posted: Mon Nov 20, 2017 1:45 pm
by kolban
I had a similar need and came up with this a while back:

https://github.com/nkolban/esp32-snippe ... g/bootwifi

there is also a new project from github user tonyp7:

https://github.com/tonyp7/esp32-wifi-manager

which looks pretty good too.