Share the Companion terminal with the WiFi console
This commit is contained in:
1 parent
cb79dcd4e3
commit
d178cf1474
20 files changed
+3047
-2062
No files matched your search
+15
-14
@@ -491,23 +491,24 @@ get wifi.cli
|
||||
|
||||
The saved `on` setting becomes active only when the WiFi station client is
|
||||
connected and WebConfig is running in LAN mode. It is never exposed on the open
|
||||
setup access point. When active, the WebConfig page has a **CLI** tab for sending
|
||||
commands directly to the repeater or room server. It uses the local
|
||||
administrator command parser and displays one reply at a time. The terminal is
|
||||
protected by the WebConfig admin login and uses remote-administrator
|
||||
permissions, so commands explicitly restricted to a physical serial connection
|
||||
remain unavailable.
|
||||
setup access point. When active, the WebConfig page has a **CLI** tab. Repeater
|
||||
and room-server commands use the authenticated administrator parser; commands
|
||||
restricted to a physical serial connection remain unavailable there.
|
||||
|
||||
Use **Single command** for the normal prompt, or select **Command block** to
|
||||
paste up to 100 commands with one command per line. Blank lines are ignored.
|
||||
The browser validates all lines first, then sends one command at a time and
|
||||
waits for its reply before sending the next. The block queue is kept in the
|
||||
browser only, so closing the page or losing its WiFi connection stops the
|
||||
commands that have not yet been sent. Ctrl+Enter or Command+Enter starts a
|
||||
block.
|
||||
Companion uses the same complete terminal as USB and Full Companion TCP port
|
||||
5002, including `card`, `import meshcore://...`, `list`, `to`, messages, remote
|
||||
login, and delayed replies. It uses the Companion's trusted LAN. See
|
||||
[Companion browser terminal](terminal_chat_cli.md#companion-wifi-browser-terminal)
|
||||
for contact import, terminal ownership, and disconnect behavior.
|
||||
|
||||
Type a command at the prompt, or paste multiple lines and confirm the sequence.
|
||||
Blank lines and comments are ignored. The device reports the supported batch
|
||||
limit. Companion sends each line after the previous command finishes and
|
||||
continues polling for incoming text after the sequence. `help` lists the
|
||||
device's actual terminal commands; Tab completes command names and settings.
|
||||
|
||||
The up/down arrow keys recall commands entered during the current browser
|
||||
session in single-command mode. Commands available in the terminal still
|
||||
session. Commands available in the terminal still
|
||||
depend on the firmware role and build profile. Commands such as
|
||||
`stop webconfig`, `set wifi.cli off`, WiFi credential changes, and reboot
|
||||
operations stop the remaining block and can disconnect the page before it
|
||||
|
||||
+10
-4
@@ -250,10 +250,16 @@ and the selected WiFi/MQTT mode keeps reconnecting. Other setup sessions retain
|
||||
their profile's idle timeout.
|
||||
|
||||
Every ESP32 build with WebConfig supports the browser command terminal,
|
||||
including WiFi Companion and Full Companion. Companions use their own bounded
|
||||
configuration commands on the trusted LAN; chat and streaming commands remain
|
||||
in the USB/TCP terminal. Repeater and Room Server use the authenticated admin
|
||||
parser.
|
||||
including WiFi Companion and Full Companion. Companions use their complete
|
||||
USB/TCP terminal on the trusted LAN, including contact import, chat, recipient
|
||||
selection, and delayed replies. Repeater and Room Server use the authenticated
|
||||
admin parser.
|
||||
|
||||
To add a Companion contact, run `import meshcore://<full-contact-card-data>`,
|
||||
then `list` to confirm it appears. Get the complete card with `card` on the
|
||||
other Companion. A public key alone is insufficient. See the
|
||||
[terminal command guide](terminal_chat_cli.md#companion-wifi-browser-terminal)
|
||||
for `to`, `send`, `login`, and `cmd` examples and session ownership.
|
||||
|
||||
The saved `wifi.cli` setting defaults to `on`. Use `set wifi.cli off` to disable
|
||||
the **CLI** tab.
|
||||
|
||||
@@ -231,9 +231,12 @@ The browser accepts Companion configuration commands, including `get powersaving
|
||||
`set usb.logging on|off`, WiFi controls, and MQTT settings. `set mqtt.enabled on|off` controls MQTT
|
||||
without erasing broker settings; `get mqtt.enabled`, `get mqtt.running`, and
|
||||
`get mqtt.status` distinguish the saved switch from current connections.
|
||||
`set logging.output off|usb|wifi|both` selects both outputs together. Chat, recipient
|
||||
selection, streaming output, and USB MOTA session commands use the complete
|
||||
Companion text terminal over USB or TCP port 5002.
|
||||
`set logging.output off|usb|wifi|both` selects both outputs together. The browser
|
||||
also uses the complete Companion terminal for `card`, `import meshcore://...`,
|
||||
`list`, `to`, `send`, `login`, `cmd`, and delayed replies, with the same syntax
|
||||
as USB and TCP port 5002. See the [terminal command guide](terminal_chat_cli.md)
|
||||
for contact import and session ownership. USB MOTA session commands require
|
||||
the USB connection; WiFi host folders use port 5001.
|
||||
|
||||
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
|
||||
|
||||
@@ -31,7 +31,10 @@ Companion mode, send this line once and wait for the terminal banner:
|
||||
```
|
||||
|
||||
Run `help`, `board`, and `version` to inspect the device. On ESP32 you can
|
||||
alternatively connect to its text terminal with `nc DEVICE_IP 5002`.
|
||||
alternatively open the node's LAN address and select **CLI**, or connect with
|
||||
`nc DEVICE_IP 5002`. Both use the same terminal commands as USB, including
|
||||
`import meshcore://...`, `list`, `to`, and `send`. Use `disconnect` to release
|
||||
a browser/TCP session. See [the terminal guide](terminal_chat_cli.md).
|
||||
When finished, send `+++MESHCORE-TERM-STOP`, close the terminal, and reconnect
|
||||
your Companion app. These are local text commands; an app's custom-variable
|
||||
editor does not necessarily forward them.
|
||||
|
||||
@@ -39,8 +39,10 @@ The linked console runs in your computer's browser over **USB**. It does not
|
||||
need node WiFi or `set webui on`. **WebConfig** is a separate settings website
|
||||
served by supported ESP32 images. Both infrastructure and WiFi Companion
|
||||
WebConfig include a browser command terminal (`set wifi.cli on`), enabled by
|
||||
default on the LAN. Full ESP32 Companion also has a text terminal at TCP port **5002**
|
||||
for its complete chat and streaming command surface.
|
||||
default on the LAN. The Companion browser CLI uses the same terminal commands
|
||||
as USB, including contact import, chat, recipient selection, and streaming
|
||||
replies. Full ESP32 Companion also exposes this terminal at TCP port **5002**.
|
||||
See the [terminal command guide](terminal_chat_cli.md#companion-wifi-browser-terminal).
|
||||
|
||||
## Which old variant setting should I use?
|
||||
|
||||
|
||||
@@ -2,6 +2,42 @@
|
||||
|
||||
Below are the commands you can enter into the Terminal Chat clients:
|
||||
|
||||
## Companion WiFi browser terminal
|
||||
|
||||
On ESP32 WiFi Companions with WebConfig, open the node's LAN IP address and
|
||||
select **CLI**. The browser runs the same commands as the USB terminal and
|
||||
Full Companion's TCP terminal on port 5002, including contact import, contact
|
||||
selection, messages, remote login/commands, and delayed RF replies. Run `help`
|
||||
to list commands compiled into the device. Enable the tab with
|
||||
`set wifi.cli on`; the open setup AP does not expose it.
|
||||
|
||||
For example, copy the complete `meshcore://...` string from `card` on another
|
||||
Companion, then run these commands on the receiving Companion:
|
||||
|
||||
```text
|
||||
import meshcore://<full-contact-card-data>
|
||||
list
|
||||
to <contact-name-or-prefix>
|
||||
```
|
||||
|
||||
Replace the placeholders; a bare public key is not a contact card. Import is
|
||||
queued for validation, so use `list` to confirm the contact appears. `to`
|
||||
remains selected for subsequent `send`, `path`, `login`, and `cmd` commands
|
||||
within this terminal session.
|
||||
|
||||
Only one USB, TCP, or browser text terminal owns the session at a time. An
|
||||
idle startup USB prompt can be borrowed by WiFi. Use `disconnect` or the
|
||||
browser's **disconnect** button to release it. Closing the page releases the
|
||||
session; if the connection disappears, it expires after 60 seconds without a
|
||||
poll. Long replies page into the browser automatically, and incoming replies
|
||||
continue appearing after a command finishes. Terminal scrollback starts at
|
||||
4 KiB and can grow to 32 KiB for unread output, preferring PSRAM; it shrinks
|
||||
after reading and is freed when the session expires. If output exceeds the
|
||||
available buffer while unread, the browser reports the missing output.
|
||||
|
||||
USB protocol-switch and USB MOTA ownership commands still apply to the USB
|
||||
connection. Use the WiFi MOTA seeder on port 5001 for a host folder over WiFi.
|
||||
|
||||
## Companion USB mode
|
||||
|
||||
An ordinary Companion USB build starts in the normal binary Companion protocol
|
||||
|
||||
Reference in new issue
Block a user