File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1273,12 +1273,24 @@ void setup_wifimanager(bool reset_settings) {
1273
1273
InfoIndicatorON ();
1274
1274
ErrorIndicatorON ();
1275
1275
Log.notice (F (" Connect your phone to WIFI AP: %s with PWD: %s" CR), WifiManager_ssid, WifiManager_password);
1276
+
1276
1277
// fetches ssid and pass and tries to connect
1277
1278
// if it does not connect it starts an access point with the specified name
1278
1279
// and goes into a blocking loop awaiting configuration
1279
1280
if (!wifiManager.autoConnect (WifiManager_ssid, WifiManager_password)) {
1280
1281
Log.warning (F (" failed to connect and hit timeout" CR));
1281
1282
delay (3000 );
1283
+
1284
+ # ifdef ESP32
1285
+ /* Workaround for bug in arduino core that causes the AP to become unsecure on reboot */
1286
+ esp_wifi_set_mode (WIFI_MODE_AP);
1287
+ esp_wifi_start ();
1288
+ wifi_config_t conf;
1289
+ esp_wifi_get_config (WIFI_IF_AP, &conf);
1290
+ conf.ap .ssid_hidden = 1 ;
1291
+ esp_wifi_set_config (WIFI_IF_AP, &conf);
1292
+ # endif
1293
+
1282
1294
// reset and try again
1283
1295
watchdogReboot (3 );
1284
1296
delay (5000 );
You can’t perform that action at this time.
0 commit comments