Address review findings on WiFi companion support

- scope the serial config CLI to RP2040; it was exposing the rescue CLI
  (cat/rm/erase) on every ESP32 WiFi build, which gates it behind a
  physical long-press
- bound and space out RP2040 rejoins: the core's join busy-waits, so cap
  it at 5s and retry every 30s instead of every 10s
- stamp the reconnect timer in setup(), so the first loop() doesn't tear
  down an association that is still finishing DHCP
- treat stored credentials as a pair, and pass NULL (not "") for an open
  network
- teach build_as_lib.py where SerialWifiInterface moved
This commit is contained in:
Michael Graff
2026-09-05 23:15:13 -05:00
parent 58181bb8a2
commit a4ac85a0d6
3 changed files with 25 additions and 6 deletions
+3 -2
View File
@@ -2416,8 +2416,9 @@ void MyMesh::loop() {
checkCLIRescueCmd();
} else {
checkSerialInterface();
#if defined(WIFI_SSID) && !defined(ENABLE_USB_INTERFACE)
// headless WiFi build: USB serial isn't a companion transport, so use it for config
#if defined(WIFI_SSID) && defined(RP2040_PLATFORM) && !defined(ENABLE_USB_INTERFACE)
// RP2040 WiFi builds are headless and have no way into the rescue CLI (that needs a
// display + long-press), so serve config commands on the otherwise unused USB serial
checkCLIRescueCmd();
#endif
}