allow to access mobile internet connection while connected to sonde

This commit is contained in:
cixio 2020-07-28 21:04:28 +02:00 committed by Hansi, dl9rdz
parent 8a05698f44
commit 51902df994
1 changed files with 5 additions and 0 deletions

View File

@ -2024,6 +2024,11 @@ void startAP() {
Serial.println("Activating access point mode");
wifi_state = WIFI_APMODE;
WiFi.softAP(networks[0].id.c_str(), networks[0].pw.c_str());
Serial.println("Wait 100 ms for AP_START...");
delay(100);
Serial.println(WiFi.softAPConfig(IPAddress (192,168,4,1), IPAddress (0,0,0,0), IPAddress (255,255,255,0)) ? "Ready" : "Failed!");
IPAddress myIP = WiFi.softAPIP();
String myIPstr = myIP.toString();
sonde.setIP(myIPstr.c_str(), true);