Updating wifi conf while running
Posted: Thu Feb 16, 2017 5:52 pm
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)
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)