Updating wifi conf while running

lchazall
Posts: 5
Joined: Tue Nov 22, 2016 7:26 pm

Updating wifi conf while running

Postby lchazall » 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) ;)
Best regards,
lchazall

lchazall
Posts: 5
Joined: Tue Nov 22, 2016 7:26 pm

Re: Updating wifi conf while running

Postby lchazall » Fri Feb 17, 2017 10:50 am

I solved this by myself.

I Just have to set config and then connect ... As simple as that.
Best regards,
lchazall

Who is online

Users browsing this forum: MalteJ and 3 guests