AP+STA with static IP & WEB inretface

BARS2022
Posts: 6
Joined: Mon Nov 14, 2022 1:04 pm

AP+STA with static IP & WEB inretface

Postby BARS2022 » Fri Mar 03, 2023 9:46 am

Hi.
I want to connect ESP32 to Wi-Fi network (STA MODE). And I don't have any LCD, keyboard, etc in my device. Therefore I need set SSID and password with WEB UI (AT MODE). Also I need static IP for WEB UI and dynamic IP for Wi-Fi network. I want to make the next algorithm:
1) Enabling AP mode by long pressing the button;
1) Connect to ESP32 AP;
2) Go to ESP32 IP:Port TCP Server (Static IP) WEB UI;
3) Set SSID from list and write password;
4) Click "Connect" button;
5) ESP32 try to connect to Wi-Fi network;
6) If OK, run TCP Server with dynamic IP and disabling AP MODE;

I configuring TCP Server with WEB UI and I get http page with Wi-Fi network settings. But I don't now how change DHCP settings for dynamic IP after connect to network. How can I do this?

Who is online

Users browsing this forum: No registered users and 98 guests