From 81dc34cc91ae8c42180dc69e80afb431f13a1dd3 Mon Sep 17 00:00:00 2001 From: Rajko Zschiegner Date: Wed, 10 Apr 2024 00:16:58 +0200 Subject: [PATCH 1/5] Update airrohr-firmware.ino --- airrohr-firmware/airrohr-firmware.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airrohr-firmware/airrohr-firmware.ino b/airrohr-firmware/airrohr-firmware.ino index 7150d4ad..1ee64d99 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -58,7 +58,7 @@ #include // increment on change -#define SOFTWARE_VERSION_STR "NRZ-2024-136-B1" +#define SOFTWARE_VERSION_STR "NRZ-2024-135" String SOFTWARE_VERSION(SOFTWARE_VERSION_STR); /***************************************************************** From 2b426da8f012daaccb5e164c3ce1b38165150872 Mon Sep 17 00:00:00 2001 From: Moritz 'Mo' Demman Date: Thu, 17 Oct 2024 23:40:28 +0200 Subject: [PATCH 2/5] connect WiFi was missing the same patch for Freifunk --- 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 1ee64d99..b703663d 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -2976,8 +2976,15 @@ static void connectWifi() WiFi.setHostname(cfg::fs_ssid); #endif - WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI - + if( *cfg::wlanpwd ) // non-empty password + { + WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI + } + 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 arg 2 to be nullptr (or omitted) since. + } + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); waitForWifiToConnect(40); From e922cf49c4943fc545170d991b54a639da337087 Mon Sep 17 00:00:00 2001 From: Moritz 'Mo' Demman Date: Fri, 18 Oct 2024 00:18:30 +0200 Subject: [PATCH 3/5] fix 3: reconfiguring from WiFi with to without password: checkbox to force empty WiFi password --- airrohr-firmware/airrohr-cfg.h | 3 +++ airrohr-firmware/airrohr-cfg.h.py | 1 + airrohr-firmware/airrohr-firmware.ino | 9 ++++++--- airrohr-firmware/ext_def.h | 1 + airrohr-firmware/html-content.h | 1 + airrohr-firmware/intl_bg.h | 1 + airrohr-firmware/intl_br.h | 1 + airrohr-firmware/intl_cn.h | 1 + airrohr-firmware/intl_cz.h | 1 + airrohr-firmware/intl_de.h | 1 + airrohr-firmware/intl_dk.h | 1 + airrohr-firmware/intl_ee.h | 1 + airrohr-firmware/intl_en.h | 1 + airrohr-firmware/intl_es.h | 1 + airrohr-firmware/intl_fi.h | 1 + airrohr-firmware/intl_fr.h | 1 + airrohr-firmware/intl_gr.h | 1 + airrohr-firmware/intl_hu.h | 1 + airrohr-firmware/intl_it.h | 1 + airrohr-firmware/intl_jp.h | 1 + airrohr-firmware/intl_lt.h | 1 + airrohr-firmware/intl_lu.h | 1 + airrohr-firmware/intl_lv.h | 1 + airrohr-firmware/intl_nl.h | 1 + airrohr-firmware/intl_pl.h | 1 + airrohr-firmware/intl_pt.h | 1 + airrohr-firmware/intl_ro.h | 1 + airrohr-firmware/intl_rs.h | 1 + airrohr-firmware/intl_ru.h | 1 + airrohr-firmware/intl_se.h | 1 + airrohr-firmware/intl_si.h | 1 + airrohr-firmware/intl_sk.h | 1 + airrohr-firmware/intl_tr.h | 1 + airrohr-firmware/intl_ua.h | 1 + 34 files changed, 41 insertions(+), 3 deletions(-) diff --git a/airrohr-firmware/airrohr-cfg.h b/airrohr-firmware/airrohr-cfg.h index 74806dad..19156912 100644 --- a/airrohr-firmware/airrohr-cfg.h +++ b/airrohr-firmware/airrohr-cfg.h @@ -33,6 +33,7 @@ enum ConfigShapeId { Config_fs_ssid, Config_fs_pwd, Config_www_basicauth_enabled, + Config_wlan_nopwd_enabled, Config_dht_read, Config_htu21d_read, Config_ppd_read, @@ -105,6 +106,7 @@ static constexpr char CFG_KEY_WWW_PASSWORD[] PROGMEM = "www_password"; static constexpr char CFG_KEY_FS_SSID[] PROGMEM = "fs_ssid"; static constexpr char CFG_KEY_FS_PWD[] PROGMEM = "fs_pwd"; static constexpr char CFG_KEY_WWW_BASICAUTH_ENABLED[] PROGMEM = "www_basicauth_enabled"; +static constexpr char CFG_KEY_WLAN_NOPWD_ENABLED[] PROGMEM = "wlan_nopwd_enabled"; static constexpr char CFG_KEY_DHT_READ[] PROGMEM = "dht_read"; static constexpr char CFG_KEY_HTU21D_READ[] PROGMEM = "htu21d_read"; static constexpr char CFG_KEY_PPD_READ[] PROGMEM = "ppd_read"; @@ -177,6 +179,7 @@ static constexpr ConfigShapeEntry configShape[] PROGMEM = { { Config_Type_String, sizeof(cfg::fs_ssid)-1, CFG_KEY_FS_SSID, cfg::fs_ssid }, { Config_Type_Password, sizeof(cfg::fs_pwd)-1, CFG_KEY_FS_PWD, cfg::fs_pwd }, { Config_Type_Bool, 0, CFG_KEY_WWW_BASICAUTH_ENABLED, &cfg::www_basicauth_enabled }, + { Config_Type_Bool, 0, CFG_KEY_WLAN_NOPWD_ENABLED, &cfg::wlan_nopwd_enabled }, { Config_Type_Bool, 0, CFG_KEY_DHT_READ, &cfg::dht_read }, { Config_Type_Bool, 0, CFG_KEY_HTU21D_READ, &cfg::htu21d_read }, { Config_Type_Bool, 0, CFG_KEY_PPD_READ, &cfg::ppd_read }, diff --git a/airrohr-firmware/airrohr-cfg.h.py b/airrohr-firmware/airrohr-cfg.h.py index e68e3b2b..353ba41c 100755 --- a/airrohr-firmware/airrohr-cfg.h.py +++ b/airrohr-firmware/airrohr-cfg.h.py @@ -9,6 +9,7 @@ String fs_ssid Password fs_pwd Bool www_basicauth_enabled +Bool wlan_nopwd_enabled Bool dht_read Bool htu21d_read Bool ppd_read diff --git a/airrohr-firmware/airrohr-firmware.ino b/airrohr-firmware/airrohr-firmware.ino index b703663d..1add8a23 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -146,6 +146,7 @@ namespace cfg char www_password[LEN_CFG_PASSWORD]; // wifi credentials + bool wlan_nopwd_enabled = WLAN_NOPWD_ENABLED; char wlanssid[LEN_WLANSSID]; char wlanpwd[LEN_CFG_PASSWORD]; @@ -1653,6 +1654,8 @@ static void webserver_config_send_body_get(String &page_content) page_content += F("
" INTL_WIFI_NETWORKS "

"); } page_content += FPSTR(TABLE_TAG_OPEN); + add_form_checkbox(Config_wlan_nopwd_enabled, FPSTR(INTL_NOPWD)); + static constexpr char CFG_KEY_WLAN_NOPWD_ENABLED[] PROGMEM = "wlan_nopwd_enabled"; add_form_input(page_content, Config_wlanssid, FPSTR(INTL_FS_WIFI_NAME), LEN_WLANSSID - 1); add_form_input(page_content, Config_wlanpwd, FPSTR(INTL_PASSWORD), LEN_CFG_PASSWORD - 1); page_content += FPSTR(TABLE_TAG_CLOSE_BR); @@ -2867,7 +2870,7 @@ static void wifiConfig() debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); - if( *cfg::wlanpwd ) // non-empty password + if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { WiFi.begin(cfg::wlanssid, cfg::wlanpwd); } @@ -2976,7 +2979,7 @@ static void connectWifi() WiFi.setHostname(cfg::fs_ssid); #endif - if( *cfg::wlanpwd ) // non-empty password + if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI } @@ -2987,7 +2990,7 @@ static void connectWifi() debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); - waitForWifiToConnect(40); + waitForWifiToConnect(40); // xx half seconds debug_outln_info(emptyString); if (WiFi.status() != WL_CONNECTED) { diff --git a/airrohr-firmware/ext_def.h b/airrohr-firmware/ext_def.h index d6dc182f..3e2e6c23 100644 --- a/airrohr-firmware/ext_def.h +++ b/airrohr-firmware/ext_def.h @@ -4,6 +4,7 @@ // Wifi config const char WLANSSID[] PROGMEM = "Freifunk-disabled"; const char WLANPWD[] PROGMEM = ""; +#define WLAN_NOPWD_ENABLED 0 // BasicAuth config const char WWW_USERNAME[] PROGMEM = "admin"; diff --git a/airrohr-firmware/html-content.h b/airrohr-firmware/html-content.h index 1130cc08..37d5f3dc 100644 --- a/airrohr-firmware/html-content.h +++ b/airrohr-firmware/html-content.h @@ -21,6 +21,7 @@ const char DBG_TXT_SENDING_TO[] PROGMEM = "## Sending to "; const char DBG_TXT_SDS011_VERSION_DATE[] PROGMEM = "SDS011 version date"; const char DBG_TXT_NPM_VERSION_DATE[] PROGMEM = "Next PM version date"; const char DBG_TXT_CONNECTING_TO[] PROGMEM = "Connecting to "; +const char DBG_TXT_CONNECTING_NOPWD_TO[] PROGMEM = "Connecting w/o passwd "; const char DBG_TXT_FOUND[] PROGMEM = " ... found"; const char DBG_TXT_NOT_FOUND[] PROGMEM = " ... not found"; const char DBG_TXT_SEP[] PROGMEM = "----"; diff --git a/airrohr-firmware/intl_bg.h b/airrohr-firmware/intl_bg.h index 37482487..ee331912 100644 --- a/airrohr-firmware/intl_bg.h +++ b/airrohr-firmware/intl_bg.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Над морското ни const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Налягане на морското ниво"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Оторизация"; +const char INTL_NOPWD[] PROGMEM = "без WiFi парола"; #define INTL_REPORT_ISSUE "Подаване на сигнал за проблем" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi сензор в режим на конфигуриране"; diff --git a/airrohr-firmware/intl_br.h b/airrohr-firmware/intl_br.h index 1075e3b1..277cd33f 100644 --- a/airrohr-firmware/intl_br.h +++ b/airrohr-firmware/intl_br.h @@ -41,6 +41,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autorização"; +const char INTL_NOPWD[] PROGMEM = "sem senha WiFi"; #define INTL_REPORT_ISSUE "Reporter um problema" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Nome do sensor Wi-Fi em modo de configuração"; diff --git a/airrohr-firmware/intl_cn.h b/airrohr-firmware/intl_cn.h index 726e8b4f..c77553a7 100644 --- a/airrohr-firmware/intl_cn.h +++ b/airrohr-firmware/intl_cn.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS(NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "认证"; +const char INTL_NOPWD[] PROGMEM = "没有WiFi密码"; #define INTL_REPORT_ISSUE "报告问题" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi传感器在配置模式下"; diff --git a/airrohr-firmware/intl_cz.h b/airrohr-firmware/intl_cz.h index 4be92b57..60815c9f 100644 --- a/airrohr-firmware/intl_cz.h +++ b/airrohr-firmware/intl_cz.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Přihlášení"; +const char INTL_NOPWD[] PROGMEM = "bez hesla WiFi"; #define INTL_REPORT_ISSUE "Nahlásit problém" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Wi-Fi modul v konfiguračním módu"; diff --git a/airrohr-firmware/intl_de.h b/airrohr-firmware/intl_de.h index c056c2a0..a49f5973 100644 --- a/airrohr-firmware/intl_de.h +++ b/airrohr-firmware/intl_de.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Höhe über Meeresspiegel (m) const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Luftdruck auf Meereshöhe"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "BasicAuth aktivieren"; +const char INTL_NOPWD[] PROGMEM = "ohne WLAN Passwort"; #define INTL_REPORT_ISSUE "Ein Problem melden" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Sensor WLAN Name im Konfigurationsmodus"; diff --git a/airrohr-firmware/intl_dk.h b/airrohr-firmware/intl_dk.h index dbe1477b..b6ff3972 100644 --- a/airrohr-firmware/intl_dk.h +++ b/airrohr-firmware/intl_dk.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Aktiver BasicAuth"; +const char INTL_NOPWD[] PROGMEM = "uden WiFi-adgangskode"; #define INTL_REPORT_ISSUE "Rapporter et problem" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Wi-Fi sensor i opsætningsmode"; diff --git a/airrohr-firmware/intl_ee.h b/airrohr-firmware/intl_ee.h index 847c4f86..2c37e3e9 100644 --- a/airrohr-firmware/intl_ee.h +++ b/airrohr-firmware/intl_ee.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autentimine"; +const char INTL_NOPWD[] PROGMEM = "ilma WiFi paroolita"; #define INTL_REPORT_ISSUE "Teatage probleemist" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi andur konfigureerimisrežiimis"; diff --git a/airrohr-firmware/intl_en.h b/airrohr-firmware/intl_en.h index 995ab884..ba13b5ab 100644 --- a/airrohr-firmware/intl_en.h +++ b/airrohr-firmware/intl_en.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Above sea level (m)"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "pressure at sea level"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Authentication"; +const char INTL_NOPWD[] PROGMEM = "no WiFi password"; #define INTL_REPORT_ISSUE "Report an issue" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi Sensor in configuration mode"; diff --git a/airrohr-firmware/intl_es.h b/airrohr-firmware/intl_es.h index 14cd72a9..14ec6857 100644 --- a/airrohr-firmware/intl_es.h +++ b/airrohr-firmware/intl_es.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autorización"; +const char INTL_NOPWD[] PROGMEM = "sin contraseña wifi"; #define INTL_REPORT_ISSUE "Reportar un problema" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Sensor WiFi en modo de configuración"; diff --git a/airrohr-firmware/intl_fi.h b/airrohr-firmware/intl_fi.h index 8494a037..a78112c3 100644 --- a/airrohr-firmware/intl_fi.h +++ b/airrohr-firmware/intl_fi.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Tunnistus"; +const char INTL_NOPWD[] PROGMEM = "[[no WiFi password]]"; #define INTL_REPORT_ISSUE "Ilmoita asiasta" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi Sensor konfigurointitilassa"; diff --git a/airrohr-firmware/intl_fr.h b/airrohr-firmware/intl_fr.h index cd58e5f2..604a5f73 100644 --- a/airrohr-firmware/intl_fr.h +++ b/airrohr-firmware/intl_fr.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Altitude en m"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Press. atm. au niveau de la mer en hPa"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Activer BasicAuth"; +const char INTL_NOPWD[] PROGMEM = "Sans mot de passe WiFi"; #define INTL_REPORT_ISSUE "Signaler un problème" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Nom du capteur wifi en mode de configuration"; diff --git a/airrohr-firmware/intl_gr.h b/airrohr-firmware/intl_gr.h index d247948f..46e2da05 100644 --- a/airrohr-firmware/intl_gr.h +++ b/airrohr-firmware/intl_gr.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Αυθεντικοποίηση"; +const char INTL_NOPWD[] PROGMEM = "Χωρίς κωδικό πρόσβασης WiFi"; #define INTL_REPORT_ISSUE "Αναφέρετε ένα θέμα" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Αισθητήρας WiFi σε λειτουργία διαμόρφωσης"; diff --git a/airrohr-firmware/intl_hu.h b/airrohr-firmware/intl_hu.h index d80b10bc..d7198fde 100644 --- a/airrohr-firmware/intl_hu.h +++ b/airrohr-firmware/intl_hu.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Azonosítás"; +const char INTL_NOPWD[] PROGMEM = "no WiFi password"; #define INTL_REPORT_ISSUE "Jelents egy hibát" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi Szenzor konfigurációs módban"; diff --git a/airrohr-firmware/intl_it.h b/airrohr-firmware/intl_it.h index 1b6c36ce..47f5b6c9 100644 --- a/airrohr-firmware/intl_it.h +++ b/airrohr-firmware/intl_it.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[Altitudine]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[Pressione al livello del mare]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autorizzazione"; +const char INTL_NOPWD[] PROGMEM = "Senza password Wi-Fi"; #define INTL_REPORT_ISSUE "Segnala un problema" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Sensore WiFi in modalità configurazione"; diff --git a/airrohr-firmware/intl_jp.h b/airrohr-firmware/intl_jp.h index 3004949a..bd38efc2 100644 --- a/airrohr-firmware/intl_jp.h +++ b/airrohr-firmware/intl_jp.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "認証"; +const char INTL_NOPWD[] PROGMEM = "[[no WiFi password]]"; #define INTL_REPORT_ISSUE "問題を報告する" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "設定モードのWiFiセンサー"; diff --git a/airrohr-firmware/intl_lt.h b/airrohr-firmware/intl_lt.h index a1db50fe..ce669792 100644 --- a/airrohr-firmware/intl_lt.h +++ b/airrohr-firmware/intl_lt.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autentiškumo nustatymas"; +const char INTL_NOPWD[] PROGMEM = "[[no WiFi password]]"; #define INTL_REPORT_ISSUE "Pranešti apie problemą" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi jutiklio konfigūravimo režimas"; diff --git a/airrohr-firmware/intl_lu.h b/airrohr-firmware/intl_lu.h index 24601d09..d79ce826 100644 --- a/airrohr-firmware/intl_lu.h +++ b/airrohr-firmware/intl_lu.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "BasicAuth aktivéieren"; +const char INTL_NOPWD[] PROGMEM = "[[no WiFi password]]"; #define INTL_REPORT_ISSUE "E Feeler melden" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi Sensor Numm am Konfiguratiounsmodus"; diff --git a/airrohr-firmware/intl_lv.h b/airrohr-firmware/intl_lv.h index 905df511..f32989eb 100644 --- a/airrohr-firmware/intl_lv.h +++ b/airrohr-firmware/intl_lv.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autentifikācija"; +const char INTL_NOPWD[] PROGMEM = "no WiFi password"; #define INTL_REPORT_ISSUE "Ziņot par problēmu" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi sensors konfigurācijas režīmā"; diff --git a/airrohr-firmware/intl_nl.h b/airrohr-firmware/intl_nl.h index e47cb4d6..651c4899 100644 --- a/airrohr-firmware/intl_nl.h +++ b/airrohr-firmware/intl_nl.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Hoogte boven zeeniveau (m)"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Luchtdruk op zeeniveau"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Toegang beperken"; +const char INTL_NOPWD[] PROGMEM = "zonder wifi-wachtwoord"; #define INTL_REPORT_ISSUE "Een probleem melden" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Netwerknaam en -wachtwoord van de fijnstofsensor"; diff --git a/airrohr-firmware/intl_pl.h b/airrohr-firmware/intl_pl.h index c854a649..6a0d5bfa 100644 --- a/airrohr-firmware/intl_pl.h +++ b/airrohr-firmware/intl_pl.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Wysokość m n.p.m."; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Ciśnienie zredukowane"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autoryzacja"; +const char INTL_NOPWD[] PROGMEM = "bez hasła WiFi"; #define INTL_REPORT_ISSUE "Zgłoś problem" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Parametry WiFi w trybie konfiguracji czujnika"; diff --git a/airrohr-firmware/intl_pt.h b/airrohr-firmware/intl_pt.h index 33128a63..ad43c097 100644 --- a/airrohr-firmware/intl_pt.h +++ b/airrohr-firmware/intl_pt.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autorização"; +const char INTL_NOPWD[] PROGMEM = "sem senha WiFi"; #define INTL_REPORT_ISSUE "Comunicar um problema" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Nome do sensor WiFi em modo de configuração"; diff --git a/airrohr-firmware/intl_ro.h b/airrohr-firmware/intl_ro.h index 8c2235d1..cfd19662 100644 --- a/airrohr-firmware/intl_ro.h +++ b/airrohr-firmware/intl_ro.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autentificare"; +const char INTL_NOPWD[] PROGMEM = "Fără parolă WiFi"; #define INTL_REPORT_ISSUE "Raportați o problemă" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Senzorul WiFi în modul de configurare"; diff --git a/airrohr-firmware/intl_rs.h b/airrohr-firmware/intl_rs.h index 7b7b1c22..6594dec5 100644 --- a/airrohr-firmware/intl_rs.h +++ b/airrohr-firmware/intl_rs.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Autorizacija"; +const char INTL_NOPWD[] PROGMEM = "bez WiFi lozinke"; #define INTL_REPORT_ISSUE "Prijavite problem" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi senzor u konfiguracionom režimu"; diff --git a/airrohr-firmware/intl_ru.h b/airrohr-firmware/intl_ru.h index a284641f..2657d00c 100644 --- a/airrohr-firmware/intl_ru.h +++ b/airrohr-firmware/intl_ru.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Высота над уров const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Давление на уровне моря"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Активировать аутентификацию для входа в интерфейс сенсора"; +const char INTL_NOPWD[] PROGMEM = "без пароля Wi-Fi"; #define INTL_REPORT_ISSUE "Сообщить о проблеме" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Название WiFi устройства в режиме конфигурации"; diff --git a/airrohr-firmware/intl_se.h b/airrohr-firmware/intl_se.h index b179d8c2..17b5d253 100644 --- a/airrohr-firmware/intl_se.h +++ b/airrohr-firmware/intl_se.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Höjd över havet"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "Lufttryck vid havsytan"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Aktivera BasicAuth"; +const char INTL_NOPWD[] PROGMEM = "[[no WiFi password]]"; #define INTL_REPORT_ISSUE "Rapportera ett problem" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi-sensor i konfigurationsläge"; diff --git a/airrohr-firmware/intl_si.h b/airrohr-firmware/intl_si.h index f488f0e0..22c29fc0 100644 --- a/airrohr-firmware/intl_si.h +++ b/airrohr-firmware/intl_si.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Preverjanje pristnosti"; +const char INTL_NOPWD[] PROGMEM = "Bez hesla WiFi"; #define INTL_REPORT_ISSUE "Prijavite težavo" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "Senzor WiFi v načinu konfiguracije"; diff --git a/airrohr-firmware/intl_sk.h b/airrohr-firmware/intl_sk.h index 2430a3af..593f86a9 100644 --- a/airrohr-firmware/intl_sk.h +++ b/airrohr-firmware/intl_sk.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Prihlásenie (heslom)"; +const char INTL_NOPWD[] PROGMEM = "Žiadne heslo WiFi"; #define INTL_REPORT_ISSUE "Report an issue" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi modul v konfiguračnom móde"; diff --git a/airrohr-firmware/intl_tr.h b/airrohr-firmware/intl_tr.h index da2fefa3..8123020b 100644 --- a/airrohr-firmware/intl_tr.h +++ b/airrohr-firmware/intl_tr.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "[[height_above_sealevel]]"; const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "[[pressure_at_sealevel]]"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "yetkilendirme"; +const char INTL_NOPWD[] PROGMEM = "no WiFi password"; #define INTL_REPORT_ISSUE "Sorun bildirin" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi Sensörü Yapılandırma modunda"; diff --git a/airrohr-firmware/intl_ua.h b/airrohr-firmware/intl_ua.h index ebe048b3..89b6fd7f 100644 --- a/airrohr-firmware/intl_ua.h +++ b/airrohr-firmware/intl_ua.h @@ -42,6 +42,7 @@ const char INTL_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "Висота над рівн const char INTL_PRESSURE_AT_SEALEVEL[] PROGMEM = "тиск на рівні моря"; const char INTL_NEO6M[] PROGMEM = "GPS (NEO 6M)"; const char INTL_BASICAUTH[] PROGMEM = "Авторизація"; +const char INTL_NOPWD[] PROGMEM = "без пароля WiFi"; #define INTL_REPORT_ISSUE "Повідомте про проблему" const char INTL_FS_WIFI_DESCRIPTION[] PROGMEM = "WiFi сенсор в режимі конфігурації"; From 085105ef21ffd034c384e91248dcbce9f98a2d8d Mon Sep 17 00:00:00 2001 From: "Moritz Demman (aka maik)" Date: Fri, 18 Oct 2024 15:56:56 +0200 Subject: [PATCH 4/5] different message on OLED if connecting without passwd --- airrohr-firmware/airrohr-firmware.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airrohr-firmware/airrohr-firmware.ino b/airrohr-firmware/airrohr-firmware.ino index 1add8a23..609603c8 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -2868,14 +2868,14 @@ static void wifiConfig() dnsServer.stop(); delay(100); - debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); - if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid, cfg::wlanpwd); } else // empty password: WiFi AP without a password, e.g. "freifunk" or the like { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_NOPWD_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid); // since somewhen, the espressif API changed semantics: no password need the 1 args call since. } @@ -2981,14 +2981,15 @@ static void connectWifi() if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI } else // empty password: WiFi AP without a password, e.g. "freifunk" or the like { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_NOPWD_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid); // since somewhen, the espressif API changed semantics: no password need arg 2 to be nullptr (or omitted) since. } - debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); waitForWifiToConnect(40); // xx half seconds debug_outln_info(emptyString); From 59be433d7d9f096da4d03ea5cd9f7f6bac1bad0f Mon Sep 17 00:00:00 2001 From: "Moritz Demman (aka maik)" Date: Fri, 18 Oct 2024 15:56:56 +0200 Subject: [PATCH 5/5] unused variable eleminated --- airrohr-firmware/airrohr-firmware.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airrohr-firmware/airrohr-firmware.ino b/airrohr-firmware/airrohr-firmware.ino index 1add8a23..da43622b 100644 --- a/airrohr-firmware/airrohr-firmware.ino +++ b/airrohr-firmware/airrohr-firmware.ino @@ -1655,7 +1655,6 @@ static void webserver_config_send_body_get(String &page_content) } page_content += FPSTR(TABLE_TAG_OPEN); add_form_checkbox(Config_wlan_nopwd_enabled, FPSTR(INTL_NOPWD)); - static constexpr char CFG_KEY_WLAN_NOPWD_ENABLED[] PROGMEM = "wlan_nopwd_enabled"; add_form_input(page_content, Config_wlanssid, FPSTR(INTL_FS_WIFI_NAME), LEN_WLANSSID - 1); add_form_input(page_content, Config_wlanpwd, FPSTR(INTL_PASSWORD), LEN_CFG_PASSWORD - 1); page_content += FPSTR(TABLE_TAG_CLOSE_BR); @@ -2868,14 +2867,14 @@ static void wifiConfig() dnsServer.stop(); delay(100); - debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); - if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid, cfg::wlanpwd); } else // empty password: WiFi AP without a password, e.g. "freifunk" or the like { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_NOPWD_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid); // since somewhen, the espressif API changed semantics: no password need the 1 args call since. } @@ -2981,14 +2980,15 @@ static void connectWifi() if( *cfg::wlanpwd && !cfg::wlan_nopwd_enabled ) // non-empty password { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI } else // empty password: WiFi AP without a password, e.g. "freifunk" or the like { + debug_outln_info(FPSTR(DBG_TXT_CONNECTING_NOPWD_TO), cfg::wlanssid); WiFi.begin(cfg::wlanssid); // since somewhen, the espressif API changed semantics: no password need arg 2 to be nullptr (or omitted) since. } - debug_outln_info(FPSTR(DBG_TXT_CONNECTING_TO), cfg::wlanssid); waitForWifiToConnect(40); // xx half seconds debug_outln_info(emptyString);