From 319ab430d10bd999f050442eb54cf8b4bcb96498 Mon Sep 17 00:00:00 2001 From: maik Date: Wed, 27 Sep 2023 19:55:24 +0200 Subject: [PATCH] patch for WiFi with no password, like freifunk routers use to use. --- airrohr-firmware/airrohr-firmware.ino | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/airrohr-firmware/airrohr-firmware.ino b/airrohr-firmware/airrohr-firmware.ino index 0b915bff..91be931d 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -57,7 +57,7 @@ #include // increment on change -#define SOFTWARE_VERSION_STR "NRZ-2021-134-B4" +#define SOFTWARE_VERSION_STR "NRZ-2021-134-B5" String SOFTWARE_VERSION(SOFTWARE_VERSION_STR); /***************************************************************** @@ -2851,7 +2851,14 @@ static void wifiConfig() debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); - WiFi.begin(cfg::wlanssid, cfg::wlanpwd); + if( *cfg::wlanpwd ) // non-empty password + { + WiFi.begin(cfg::wlanssid, cfg::wlanpwd); + } + else // empty password: WiFi AP without a password, e.g. "freifunk" or the like + { + WiFi.begin(cfg::wlanssid); // since somewhen, the espressif API changed semantics: no password need the 1 args call since. + } debug_outln_info(F("---- Result Webconfig ----")); debug_outln_info(F("WLANSSID: "), cfg::wlanssid);