Skip to content

Commit

Permalink
Merge pull request opendata-stuttgart#1004 from modem-man-gmx/beta
Browse files Browse the repository at this point in the history
patch to re-enable the ability to use WiFi with no password, like freifunk routers use to use.
  • Loading branch information
ricki-z authored Mar 29, 2024
2 parents 1416826 + 1083a42 commit 06d0e80
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include <pgmspace.h>

// increment on change
#define SOFTWARE_VERSION_STR "NRZ-2021-134-B4"
#define SOFTWARE_VERSION_STR "NRZ-2023-134-B5"
String SOFTWARE_VERSION(SOFTWARE_VERSION_STR);

/*****************************************************************
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 06d0e80

Please sign in to comment.