J Jpiti Member Licensed User Longtime User Sep 10, 2020 #1 Hello, I have no idea why the ip address from the esp32 is not changed. here is a code snippet: B4X: Private Sub AppStart Serial1.Initialize(115200) Log("AppStart Version 1.0") WiFi.StartAccessPoint2("ssid","password") RunNative( "SetIP" , Null ) SDcard.Initialize(5) server.Initialize(80, "server_NewConnection") server.Listen Log(WiFi.AccessPointIp) End Sub #if C void SetIP(B4R::Object* o) { IPAddress ip(192, 168, 123, 1); IPAddress gateway(192, 168, 123, 1); IPAddress subnet(255, 255, 255, 0); WiFi.config(ip, gateway, subnet); } #end if Log(Wifi.AccessPointIp) returns 192.168.4.1 wich is it the standart IP for ESP32.
Hello, I have no idea why the ip address from the esp32 is not changed. here is a code snippet: B4X: Private Sub AppStart Serial1.Initialize(115200) Log("AppStart Version 1.0") WiFi.StartAccessPoint2("ssid","password") RunNative( "SetIP" , Null ) SDcard.Initialize(5) server.Initialize(80, "server_NewConnection") server.Listen Log(WiFi.AccessPointIp) End Sub #if C void SetIP(B4R::Object* o) { IPAddress ip(192, 168, 123, 1); IPAddress gateway(192, 168, 123, 1); IPAddress subnet(255, 255, 255, 0); WiFi.config(ip, gateway, subnet); } #end if Log(Wifi.AccessPointIp) returns 192.168.4.1 wich is it the standart IP for ESP32.
Erel B4X founder Staff member Licensed User Longtime User Sep 10, 2020 #2 You need to use softAPConfig: https://www.b4x.com/android/forum/threads/captive-portal-with-esp8266.111855/#post-697713 Upvote 0
You need to use softAPConfig: https://www.b4x.com/android/forum/threads/captive-portal-with-esp8266.111855/#post-697713
J Jpiti Member Licensed User Longtime User Sep 11, 2020 #3 SoftAPConfig works. Thank you Erel Upvote 0