AP IP configurable

This commit is contained in:
proddy
2020-07-07 23:33:34 +02:00
parent 6b9e5bba7d
commit a4cfa75b49
5 changed files with 88 additions and 19 deletions

View File

@@ -45,10 +45,7 @@ void APSettingsService::manageAP() {
void APSettingsService::startAP() {
// Serial.println(F("Starting software access point"));
IPAddress localIP(192, 168, 4, 1);
IPAddress gateway(192, 168, 4, 1);
IPAddress subnet(255, 255, 255, 0);
WiFi.softAPConfig(localIP, gateway, subnet);
WiFi.softAPConfig(_state.localIP, _state.gatewayIP, _state.subnetMask);
WiFi.softAP(_state.ssid.c_str(), _state.password.c_str());
if (!_dnsServer) {
IPAddress apIp = WiFi.softAPIP();