diff --git a/docs/WiFi.md b/docs/WiFi.md index df3fa8ac..a49c47c5 100644 --- a/docs/WiFi.md +++ b/docs/WiFi.md @@ -565,9 +565,11 @@ WiFi only, not LoRa transmit power. `get wifi.status`, `get wifi.ssid`, `get wifi.powersave`, and `get wifi.cli` are available on MQTT observers and on FULL non-MQTT repeater/room-server -builds with WebConfig. ESP32 WiFi Companions with WebConfig expose those -commands, credential setters, and `start webconfig [ap]` through their USB text -terminal; Full Companion additionally exposes that terminal on TCP port 5002. +builds with WebConfig. ESP32 WiFi Companions expose the first three commands, +credential setters, and `start webconfig [ap]` through their USB text terminal; +`get/set wifi.cli` explicitly report that the repeater/room-server browser CLI +is unavailable. Full Companion instead exposes its complete role-specific text +terminal on TCP port 5002. MQTT commands such as `get mqtt.status` and `set mqtt1.preset ...` still require an MQTT observer target. Unknown settings return `Error: unknown setting: `. Older firmware that used the discontinued compact CLI can instead diff --git a/docs/cli_build_matrix.md b/docs/cli_build_matrix.md index 6d74105d..3bafe3cf 100644 --- a/docs/cli_build_matrix.md +++ b/docs/cli_build_matrix.md @@ -175,14 +175,15 @@ maintain the repeater administrator neighbor table. Even in a FULL build, a command can be unavailable when its underlying feature does not exist on that target: -- WebConfig and the `wifi.ssid`, `wifi.status`, `wifi.powersave`, and `wifi.cli` command +- WebConfig and the `wifi.ssid`, `wifi.status`, and `wifi.powersave` command family require an ESP32 WebConfig build. FULL standalone repeater and room-server builds support the corresponding WiFi setters and status commands. ESP32 WiFi Companions with WebConfig expose WiFi credentials, - connection status, WebConfig, CLI-tab, and power-save controls from their USB + connection status, WebConfig, and power-save controls from their USB text terminal as well as power saving through WebConfig and the binary - protocol. Full Companion additionally exposes its complete role-specific - text terminal on TCP port 5002. + protocol. The browser CLI tab and `wifi.cli` setting are repeater/room-server + features. Full Companion instead exposes its complete role-specific text + terminal on TCP port 5002. - MQTT commands require an MQTT observer target. - `discover.scopes` requires an MQTT observer with compiled neighbor support; it does not independently require PSRAM or the FULL parser. diff --git a/docs/companion_radio_full.md b/docs/companion_radio_full.md index d48793b6..6aa130ae 100644 --- a/docs/companion_radio_full.md +++ b/docs/companion_radio_full.md @@ -166,17 +166,20 @@ the WebConfig **WiFi** card, or use the Full Companion text terminal: get wifi.ssid get wifi.status get wifi.powersave -get wifi.cli get webui set wifi.ssid MyNetwork set wifi.pwd my-password set wifi.powersave min set wifi.powersave max -set wifi.cli on start webconfig stop webconfig ``` +Full Companion does not expose the repeater/room-server browser CLI tab, so +`get/set wifi.cli` explicitly report that the browser terminal is unavailable. +Its complete Companion text terminal remains available over USB and TCP port +5002; this does not reduce that command surface. + On the two primary-ESP-NOW Full targets, the same terminal also provides `get espnow.channel` and `set espnow.channel <1-13>`. A channel change is persisted and requires a reboot, unlike a WiFi power-save change. diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index db71fce9..725698f2 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -2232,7 +2232,14 @@ bool MyMesh::handleLocalControlCommand(const char* command, char* reply, WebConfigServer::formatWiFiStatus(reply, reply_size); return true; case mesh::cli::StandaloneWiFiKey::CLI: - WebConfigServer::formatWiFiCliStatus(reply, reply_size); + // Companion WebConfig deliberately has no browser command terminal: + // the page is not an authenticated repeater/room-server admin + // surface. Do not report the saved global WebConfig preference as + // "waiting", because supportsCliTerminal() is false for this role and + // /api/cli can therefore never become active. The Full Companion text + // CLI remains available over USB and TCP port 5002. + snprintf(reply, reply_size, + "Error: browser CLI unavailable; use USB (or TCP 5002 on Full Companion)"); return true; default: break; @@ -2254,7 +2261,10 @@ bool MyMesh::handleLocalControlCommand(const char* command, char* reply, value, reply, reply_size); break; case mesh::cli::StandaloneWiFiKey::CLI: - WebConfigServer::setWiFiCliEnabled(value, reply, reply_size); + // See the matching getter above. In particular, do not persist a + // preference and claim success for a terminal this role cannot serve. + snprintf(reply, reply_size, + "Error: browser CLI unavailable; use USB (or TCP 5002 on Full Companion)"); return true; default: break; @@ -5983,10 +5993,9 @@ void MyMesh::handleTerminalCommand(char* command) { terminalOutput().print(" get wifi.powersave\r\n"); terminalOutput().print(" set wifi.powersave \r\n"); #ifdef WITH_WEBCONFIG - terminalOutput().print(" get wifi.{ssid|status|cli}\r\n"); + terminalOutput().print(" get wifi.{ssid|status}\r\n"); terminalOutput().print(" set wifi.ssid \r\n"); terminalOutput().print(" set wifi.pwd \r\n"); - terminalOutput().print(" set wifi.cli \r\n"); terminalOutput().print(" get webui\r\n"); terminalOutput().print(" set webui \r\n"); terminalOutput().print(" start webconfig [ap]\r\n");