diff --git a/geeksville-private/TODO.md b/geeksville-private/TODO.md index 58fbb04cb..3c0a5a1c8 100644 --- a/geeksville-private/TODO.md +++ b/geeksville-private/TODO.md @@ -2,9 +2,11 @@ You probably don't care about this section - skip to the next one. +* investigate TCP on ESP32 https://github.com/meshtastic/Meshtastic-python/issues/90 * fix python tool problem with windows and the heartbeat * router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3 * fix ttgo eink screen +* list portduino on platformio * DONE make native sim not touch hardware * DONE reenable sim in CI builds * figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt diff --git a/platformio.ini b/platformio.ini index 28edc6626..48437c9a0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -;default_envs = tbeam +default_envs = tbeam ;default_envs = tbeam0.7 ;default_envs = heltec-v2.0 ;default_envs = tlora-v1 @@ -18,7 +18,7 @@ ;default_envs = lora-relay-v1 # nrf board ;default_envs = t-echo ;default_envs = nrf52840dk-geeksville -default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here +;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here ;default_envs = rak4631 ;default_envs = rak4630 diff --git a/src/mesh/http/WiFiAPClient.cpp b/src/mesh/http/WiFiAPClient.cpp index bf8ee9624..945cbfd1d 100644 --- a/src/mesh/http/WiFiAPClient.cpp +++ b/src/mesh/http/WiFiAPClient.cpp @@ -36,7 +36,6 @@ bool isWifiAvailable() } const char *wifiName = radioConfig.preferences.wifi_ssid; - const char *wifiPsw = radioConfig.preferences.wifi_password; // strcpy(radioConfig.preferences.wifi_ssid, "meshtastic"); // strcpy(radioConfig.preferences.wifi_password, "meshtastic!"); @@ -47,7 +46,7 @@ bool isWifiAvailable() // radioConfig.preferences.wifi_ap_mode = true; // radioConfig.preferences.wifi_ap_mode = false; - if (*wifiName && *wifiPsw) { + if (*wifiName) { return 1; } else { return 0; @@ -96,7 +95,10 @@ void initWifi(bool forceSoftAP) const char *wifiName = radioConfig.preferences.wifi_ssid; const char *wifiPsw = radioConfig.preferences.wifi_password; - if ((*wifiName && *wifiPsw) || forceSoftAP) { + if (!*wifiPsw) // Treat empty password as no password + wifiPsw = NULL; + + if (*wifiName || forceSoftAP) { if (forceSoftAP) { DEBUG_MSG("Forcing SoftAP\n"); @@ -178,8 +180,6 @@ void initWifi(bool forceSoftAP) DEBUG_MSG("Not using WIFI\n"); } - - // Called by the Espressif SDK to static void WiFiEvent(WiFiEvent_t event) { @@ -304,12 +304,15 @@ void handleDNSResponse() void reconnectWiFi() { - const char *wifiName = radioConfig.preferences.wifi_ssid; - const char *wifiPsw = radioConfig.preferences.wifi_password; - if (radioConfig.has_preferences) { - if (*wifiName && *wifiPsw) { + const char *wifiName = radioConfig.preferences.wifi_ssid; + const char *wifiPsw = radioConfig.preferences.wifi_password; + + if (!*wifiPsw) // Treat empty password as no password + wifiPsw = NULL; + + if (*wifiName) { DEBUG_MSG("... Reconnecting to WiFi access point");