Fix AP not opening
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#define NUKI_HUB_VERSION "9.02"
|
#define NUKI_HUB_VERSION "9.02"
|
||||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||||
#define NUKI_HUB_DATE "2024-11-18"
|
#define NUKI_HUB_DATE "2024-11-22"
|
||||||
|
|
||||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||||
|
|||||||
@@ -63,16 +63,7 @@ void WifiDevice::initialize()
|
|||||||
String(F(" and channel: ")) + String(WiFi.channel(i)));
|
String(F(" and channel: ")) + String(WiFi.channel(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((_connectOnScanDone && _foundNetworks > 0) || _preferences->getBool(preference_find_best_rssi, false))
|
if (_openAP)
|
||||||
{
|
|
||||||
connect();
|
|
||||||
}
|
|
||||||
else if (_connectOnScanDone)
|
|
||||||
{
|
|
||||||
Log->println("No networks found, restarting scan");
|
|
||||||
scan(false, true);
|
|
||||||
}
|
|
||||||
else if (_openAP)
|
|
||||||
{
|
{
|
||||||
openAP();
|
openAP();
|
||||||
}
|
}
|
||||||
@@ -127,6 +118,15 @@ void WifiDevice::initialize()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((_connectOnScanDone && _foundNetworks > 0) || _preferences->getBool(preference_find_best_rssi, false))
|
||||||
|
{
|
||||||
|
connect();
|
||||||
|
}
|
||||||
|
else if (_connectOnScanDone)
|
||||||
|
{
|
||||||
|
Log->println("No networks found, restarting scan");
|
||||||
|
scan(false, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -190,14 +190,16 @@ void WifiDevice::openAP()
|
|||||||
{
|
{
|
||||||
if(_startAP)
|
if(_startAP)
|
||||||
{
|
{
|
||||||
WiFi.mode(WIFI_AP_STA);
|
|
||||||
WiFi.softAPsetHostname(_hostname.c_str());
|
|
||||||
WiFi.softAP("NukiHub", "NukiHubESP32");
|
|
||||||
_startAP = false;
|
_startAP = false;
|
||||||
|
WiFi.mode(WIFI_AP);
|
||||||
|
delay(500);
|
||||||
|
WiFi.softAPsetHostname(_hostname.c_str());
|
||||||
|
delay(500);
|
||||||
|
WiFi.softAP("NukiHub", "NukiHubESP32");
|
||||||
|
|
||||||
if(MDNS.begin(_hostname.c_str())){
|
//if(MDNS.begin(_hostname.c_str())){
|
||||||
MDNS.addService("http", "tcp", 80);
|
// MDNS.addService("http", "tcp", 80);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user