mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-16 05:22:43 +00:00
Clarify Companion WiFi CLI availability
This commit is contained in:
+5
-3
@@ -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:
|
||||
<name>`. Older firmware that used the discontinued compact CLI can instead
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 <none|min|max>\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 <network name>\r\n");
|
||||
terminalOutput().print(" set wifi.pwd <password>\r\n");
|
||||
terminalOutput().print(" set wifi.cli <on|off>\r\n");
|
||||
terminalOutput().print(" get webui\r\n");
|
||||
terminalOutput().print(" set webui <on|off>\r\n");
|
||||
terminalOutput().print(" start webconfig [ap]\r\n");
|
||||
|
||||
Reference in New Issue
Block a user