fix: harden ESP-NOW and full companion networking
Add selectable shared ESP-NOW channels, raw/wrapped bridge compatibility, and bounded fragmentation for maximum-size packets.\n\nGive ESP32 Full profiles WiFi coexistence, stabilize WebConfig and USB terminal lifecycles, and keep disabled bridges stopped during observer updates.\n\nUpdate generated UI, firmware selection, documentation, and regression coverage.
This commit is contained in:
1 parent
c6476b8ba8
commit
2b3b93ab2f
56 files changed
+5783
-2155
No files matched your search
+90
-9
@@ -27,7 +27,7 @@ to MQTT unless its target name also contains `mqtt`.
|
||||
| `*_companion_radio_wifi` | Yes | No | Exposes the MeshCore companion protocol on TCP port 5000 |
|
||||
| `*_companion_radio_wifi_mqtt` | Yes | Yes | Runs both the TCP companion interface and the MQTT uplink |
|
||||
| USB, BLE, or serial companion | No | No | Uses the transport named by the target instead |
|
||||
| `*_repeater_bridge_espnow` | Build-dependent on ESP32 | No | Uses ESP-NOW for its bridge; a FULL build also exposes the TCP 5001 LoRa-OTA seeder whenever WiFi is usable |
|
||||
| `*_repeater_bridge_espnow` | Build-dependent on ESP32 | No | Uses ESP-NOW for its bridge; `bridge.format wrapped|raw` selects legacy bridge framing or primary-ESP-NOW compatibility; a FULL build also exposes the TCP 5001 LoRa-OTA seeder whenever WiFi is usable |
|
||||
| RS232 bridge | No | No | Bridges through a serial interface |
|
||||
| Ethernet repeater/room server | No WiFi | No | Uses wired Ethernet for its role-specific network interface |
|
||||
| `*_sensor` | Build-dependent on ESP32 | No | A FULL ESP32 sensor can expose the TCP 5001 LoRa-OTA seeder through its browser-OTA setup AP |
|
||||
@@ -227,7 +227,71 @@ set wifi.pwd your-password
|
||||
Credential writes are persisted immediately. After the reply has drained, the
|
||||
Companion restarts its WiFi station with the saved pair. A port-5002 client is
|
||||
expected to disconnect and can reconnect at the new LAN IP. USB masks the
|
||||
password as it is entered; `get wifi.pwd` is intentionally unavailable.
|
||||
password as it is entered; `get wifi.pwd` is intentionally unavailable. The
|
||||
standalone credential store accepts an empty password, ordinary passphrases up
|
||||
to 63 characters, or an exact 64-character hexadecimal WPA/WPA2 PSK. A
|
||||
non-hexadecimal 64-character value and every longer value are rejected.
|
||||
|
||||
On Full Companion targets whose primary mesh radio is ESP-NOW, ESP-NOW, the
|
||||
setup AP, and the infrastructure-WiFi station must share one 2.4 GHz channel.
|
||||
The persisted channel defaults to 1 and can be inspected or changed from the
|
||||
text terminal:
|
||||
|
||||
```text
|
||||
get espnow.channel
|
||||
set espnow.channel 6
|
||||
reboot
|
||||
```
|
||||
|
||||
Valid values are 1 through 13; use only a channel permitted in your region and
|
||||
supported by the router. `set espnow.channel` saves the new value but does not
|
||||
move the running radio; reboot the node to apply it. Every primary
|
||||
ESP-NOW node that should communicate with it must use the same channel, and
|
||||
the configured router's 2.4 GHz radio must be fixed to that channel as well.
|
||||
A router left on automatic channel selection can move the infrastructure
|
||||
connection away from the ESP-NOW mesh.
|
||||
|
||||
`espnow.channel` configures the node's primary ESP-NOW mesh radio. It is
|
||||
distinct from `bridge.channel`, which applies only to the separate ESP-NOW
|
||||
bridge feature. WiFi power saving does not let ESP-NOW and infrastructure WiFi
|
||||
operate on different channels. On an ESP32 Full build whose primary radio is
|
||||
ESP-NOW, `wifi.powersave max` is unavailable because a station using maximum
|
||||
modem sleep can miss ESP-NOW broadcasts; use `min` for coexistence.
|
||||
|
||||
ESP-NOW compatibility also depends on the bytes and PHY used above the common
|
||||
Espressif transport. The historical `*_repeater_bridge_espnow` firmware wraps
|
||||
each MeshCore packet with a magic value, checksum, and secret-based XOR, while
|
||||
`Generic_ESPNOW` and `SenseCapIndicator-ESPNow` send the serialized MeshCore
|
||||
packet directly using the ESP-NOW LR PHY. Updated bridge firmware can select
|
||||
either behavior without changing the board target:
|
||||
|
||||
```text
|
||||
get bridge.format
|
||||
set bridge.channel 1
|
||||
set bridge.format raw
|
||||
```
|
||||
|
||||
On a Heltec V4, the ordinary `companion_radio_full` image remains a
|
||||
LoRa-primary Companion and does not instantiate this bridge. Select and flash
|
||||
the existing `heltec_v4_repeater_bridge_espnow` role before using these
|
||||
commands. Treat that Companion-to-repeater change as a role/partition
|
||||
migration: back up the node and use the exact V4 merged install artifact.
|
||||
|
||||
`wrapped` remains the default and interoperates with existing bridge nodes
|
||||
that use the same channel and `bridge.secret`. `raw` interoperates with
|
||||
primary-ESP-NOW nodes and other raw bridges; it requires channel 1-13, enables
|
||||
LR reception, forces LR transmission, and ignores `bridge.secret`. Receive
|
||||
parsing is strict to the selected format, so migrate peers deliberately rather
|
||||
than expecting one bridge to accept both. Match `bridge.channel` on the LoRa
|
||||
gateway to the primary nodes' `espnow.channel`; a primary-node channel change
|
||||
takes effect after its reboot.
|
||||
|
||||
Raw mode retains MeshCore's normal packet parsing, authentication/encryption,
|
||||
and the bridge's duplicate suppression, but it does not provide the wrapper's
|
||||
secret-based network isolation. That XOR wrapper is itself only lightweight
|
||||
isolation, not cryptographic security. Multiple LoRa/ESP-NOW gateways covering
|
||||
the same nodes can temporarily amplify duplicates, even though seen-packet
|
||||
tracking prevents an individual bridge from immediately echoing a packet back.
|
||||
|
||||
If the configured network remains unavailable for two minutes, the companion
|
||||
opens its setup AP so the credentials can be repaired. It continues retrying
|
||||
@@ -237,11 +301,16 @@ WiFi card in Companion WebConfig exposes `none`, `min`, and `max`. Fresh
|
||||
Cascade-profile builds select `min`; target-default builds select `none`.
|
||||
A saved setting takes precedence after an upgrade.
|
||||
|
||||
WiFi-only Companions can use all three modes. A Full Companion also runs BLE,
|
||||
so ESP32 WiFi/Bluetooth coexistence requires at least minimum modem sleep. It
|
||||
WiFi-only Companions can use all three modes. Full Companion also runs BLE, so
|
||||
ESP32 WiFi/Bluetooth coexistence requires at least minimum modem sleep. It
|
||||
reports `min` when an old or target-default `none` value is found and rejects a
|
||||
new `none` selection while Bluetooth is compiled in. Device power saving can
|
||||
therefore be turned on or off without changing the selected WiFi modem policy.
|
||||
new `none` selection while Bluetooth is compiled in. When ESP-NOW is also the
|
||||
Full Companion's primary mesh radio, `max` is unavailable: the access point does
|
||||
not buffer ESP-NOW broadcasts for a sleeping station, so maximum modem sleep can
|
||||
lose them. Firmware caps a previously saved `max` value to and reports it as
|
||||
`min`, and rejects a new `max` selection. Thus a WiFi/BLE/primary-ESP-NOW Full
|
||||
Companion uses `min`. Device power saving can still be turned on or off without
|
||||
changing the selected WiFi modem policy.
|
||||
|
||||
WiFi companions do not have the repeater/room-server admin CLI password model,
|
||||
so their LAN WebConfig page is intentionally unauthenticated. Use them only on
|
||||
@@ -372,7 +441,10 @@ connect temporarily. Standalone credentials can be changed through WebConfig
|
||||
or with the listed CLI commands. Changing the SSID or password stops an active
|
||||
WebConfig session; start it again to connect with the new values. Use
|
||||
`set wifi.pwd` with no value for an open network. The password is write-only
|
||||
and is never returned by `get`.
|
||||
and is never returned by `get`. Standalone WiFi accepts ordinary passphrases up
|
||||
to 63 characters and exact 64-character hexadecimal WPA/WPA2 PSKs; other
|
||||
64-character values and all longer values are rejected. MQTT observer WiFi
|
||||
passwords remain limited to 63 characters by their fixed persisted layout.
|
||||
|
||||
`get webui` starts with the saved boot setting, then reports the current
|
||||
session. For example, `> off, http://192.168.1.130/` means automatic WebConfig
|
||||
@@ -475,7 +547,13 @@ card and USB text terminal. Full Companion also accepts the text commands from
|
||||
TCP port 5002. The normal binary Companion protocol can read or write the
|
||||
setting over USB, BLE, or TCP port 5000 without entering terminal mode. Full
|
||||
Companion rejects `none` because its simultaneous BLE transport requires WiFi
|
||||
modem sleep.
|
||||
modem sleep. An ESP32 Full Companion whose primary mesh radio is ESP-NOW also
|
||||
rejects `max`; maximum
|
||||
modem sleep can cause the station to miss ESP-NOW broadcasts because the access
|
||||
point does not buffer them. A previously saved `max` value is capped to and
|
||||
reported as `min`. Such a primary-ESP-NOW Full Companion therefore uses `min`.
|
||||
ESP-NOW and
|
||||
infrastructure WiFi still must use the same fixed channel.
|
||||
|
||||
MQTT observer targets normally limit ESP32 WiFi transmit power to 11 dBm unless
|
||||
the board configuration overrides `MQTT_WIFI_TX_POWER`. This setting affects
|
||||
@@ -531,5 +609,8 @@ For a WiFi companion, find its station IP in the router, connect the client to
|
||||
TCP port 5000, and use the open `MeshCore-Setup-XXXX` AP at
|
||||
`http://192.168.4.1/` if it cannot join the saved network. Current firmware
|
||||
normalizes both ESP32 WiFi interfaces to standard b/g/n before advertising the
|
||||
setup AP, including after an ESP-NOW image used its long-range protocol mode.
|
||||
setup AP. Full Companion targets whose primary mesh radio is ESP-NOW use
|
||||
b/g/n+LR instead and keep the setup AP, infrastructure station, and mesh on the
|
||||
persisted `espnow.channel` (channel 1 by default). Their configured 2.4 GHz
|
||||
router and every other primary ESP-NOW node must use that same channel.
|
||||
MQTT diagnostics apply only to a `wifi_mqtt` companion target.
|
||||
@@ -294,7 +294,7 @@
|
||||
let value = String(tail);
|
||||
if (role === "companion") {
|
||||
value = value.replace(
|
||||
/^(?:full|usb_ble|ble|usb|wifi|serial|ethernet)(?=$|[_-])/i,
|
||||
/^(?:full|wifi_mqtt|usb_ble|usb_wifi|ble|usb|wifi|serial|ethernet)(?=$|[_-])/i,
|
||||
" "
|
||||
);
|
||||
// Power saving and controllable FEM gain are persisted settings. Legacy
|
||||
@@ -330,7 +330,9 @@
|
||||
? "runtime"
|
||||
: fullLoggingFallback
|
||||
? "usb-runtime"
|
||||
: lowerTarget.includes("observer_mqtt")
|
||||
: lowerTarget.includes("observer_mqtt") ||
|
||||
(parts.role === "companion" &&
|
||||
/(?:^|[_-])wifi_mqtt(?=$|[_-])/.test(lowerTail))
|
||||
? "wifi"
|
||||
: lowerTarget.includes("-logging")
|
||||
? "usb"
|
||||
@@ -388,9 +390,17 @@
|
||||
if (!profile || profile.role !== "companion" || profile.mode !== "full") {
|
||||
return false;
|
||||
}
|
||||
// Native nRF52 Serial DFU packages use .zip. ESP32 Full Companion always
|
||||
// has one USB TTY and never receives the dedicated-port capability.
|
||||
return profile.installKinds.includes("zip");
|
||||
const installKinds = Array.isArray(profile.installKinds)
|
||||
? profile.installKinds
|
||||
: [];
|
||||
// Native nRF52 releases normally publish both Serial DFU ZIP and UF2.
|
||||
// Treat a UF2-only Full profile as nRF52 too so an incomplete release page
|
||||
// does not mislabel it as an ESP32 single-TTY image. ESP32 Full profiles
|
||||
// always publish BIN assets.
|
||||
return installKinds.includes("zip") ||
|
||||
(installKinds.includes("uf2") &&
|
||||
!installKinds.includes("bin") &&
|
||||
!installKinds.includes("merged-bin"));
|
||||
}
|
||||
|
||||
function isFullCompanion(profile) {
|
||||
@@ -398,28 +408,31 @@
|
||||
profile.mode === "full");
|
||||
}
|
||||
|
||||
function replacementKey(profile) {
|
||||
let hardware = String(profile && profile.hardware || "").toLowerCase();
|
||||
// The generated base V4 Full image auto-detects both V4.2 and V4.3 FEMs.
|
||||
// Older V4.3 transport artifacts therefore have the same physical
|
||||
// replacement even though their filename hardware prefix differs.
|
||||
if (hardware === "heltec_v4_3") hardware = "heltec_v4";
|
||||
return hardware + "\n" + String(profile && profile.variant || "default");
|
||||
}
|
||||
|
||||
function omitTransportsReplacedByFull(profiles) {
|
||||
const fullKeys = new Set((profiles || []).filter(function (profile) {
|
||||
return isFullCompanion(profile);
|
||||
}).map(function (profile) {
|
||||
return profile.hardware + "\n" + profile.variant;
|
||||
}));
|
||||
}).map(replacementKey));
|
||||
const combinedUsbBleKeys = new Set((profiles || []).filter(
|
||||
function (profile) {
|
||||
return profile.role === "companion" && profile.mode === "usb-ble";
|
||||
}
|
||||
).map(function (profile) {
|
||||
return profile.hardware + "\n" + profile.variant;
|
||||
}));
|
||||
).map(replacementKey));
|
||||
const terminalReplacementKeys = new Set((profiles || []).filter(
|
||||
function (profile) {
|
||||
return profile.role === "companion" &&
|
||||
(profile.mode === "full" || profile.mode === "usb" ||
|
||||
profile.mode === "usb-ble");
|
||||
}
|
||||
).map(function (profile) {
|
||||
return profile.hardware + "\n" + profile.variant;
|
||||
}));
|
||||
).map(replacementKey));
|
||||
const targets = new Set((profiles || []).map(function (profile) {
|
||||
return String(profile.target || "").toLowerCase();
|
||||
}));
|
||||
@@ -450,7 +463,7 @@
|
||||
};
|
||||
|
||||
return (profiles || []).filter(function (profile) {
|
||||
const key = profile.hardware + "\n" + profile.variant;
|
||||
const key = replacementKey(profile);
|
||||
const replacedAttachedTransport = profile.role === "companion" &&
|
||||
(profile.mode === "usb" || profile.mode === "ble" ||
|
||||
profile.mode === "wifi" || profile.mode === "serial" ||
|
||||
@@ -474,9 +487,10 @@
|
||||
return (profiles || []).map(function (profile) {
|
||||
if (!isFullCompanion(profile)) return profile;
|
||||
|
||||
// Every Full Companion has a runtime USB logging mode. nRF52 adds an
|
||||
// independent plaintext interface after reboot. Every ESP32 target
|
||||
// switches its one TTY between framed and plaintext modes.
|
||||
// Every Full Companion controls diagnostics with usb.logging. Some
|
||||
// qualified boards also contain a direct MQTT bridge, but the Companion
|
||||
// command parser does not implement the observer-only logging.output
|
||||
// selector, so never advertise its off/USB/WiFi/both modes here.
|
||||
profile.logging = "usb-runtime";
|
||||
profile.loggingModes = ["none", "usb"];
|
||||
profile.dedicatedUsbLogging = false;
|
||||
@@ -1209,6 +1223,7 @@
|
||||
facetValues: facetValues,
|
||||
uniqueValues: uniqueValues,
|
||||
canonicalAsset: canonicalAsset,
|
||||
installSteps: installSteps,
|
||||
humanizeHardware: humanizeHardware,
|
||||
humanizeVariant: humanizeVariant,
|
||||
labelFor: labelFor,
|
||||
|
||||
@@ -157,6 +157,7 @@ fix, no WiFi connection, an inactive bridge, or an nRF52 bootloader without
|
||||
| Bridge | [`get/set bridge.baud`](cli_commands.md#view-or-change-the-speed-of-the-bridge-rs-232-only) | RS-232 bridge | Feature | Feature | Feature |
|
||||
| Bridge | [`get/set bridge.uart`](cli_commands.md#view-or-change-the-uart-used-by-the-bridge-rs-232-only) | RS-232 bridge | Feature | Feature | Feature |
|
||||
| Bridge | [`get/set bridge.channel`](cli_commands.md#view-or-change-the-channel-used-for-bridging-espnow-only) | ESP-NOW is ESP32 only | No | No | No |
|
||||
| Bridge | [`get/set bridge.format`](cli_commands.md#view-or-change-the-esp-now-bridge-wire-format) | ESP-NOW bridge | No | No | No |
|
||||
| Bridge | [`get/set bridge.secret`](cli_commands.md#set-the-esp-now-secret) | ESP-NOW is ESP32 only | No | No | No |
|
||||
| Board | [`get bootloader.ver`](cli_commands.md#view-the-bootloader-version-nrf52-only) | nRF52 bootloader metadata | Yes | Yes | Yes |
|
||||
| Board | [`get pwrmgt.support`; `get pwrmgt.source`; `get pwrmgt.bootreason`; `get pwrmgt.bootmv`](nrf52_power_management.md#cli-commands) | Board power-management implementation | Feature | Feature | Feature |
|
||||
@@ -243,6 +244,7 @@ fix, no WiFi connection, an inactive bridge, or an nRF52 bootloader without
|
||||
| Radio | [`get/set/del radioat`; `get/set/del tempradioat`](cli_commands.md#schedule-radio-parameter-changes) | Full parser | Yes | Yes | Yes | Yes | Yes |
|
||||
| Radio | [`get freq`; `set freq <mhz>`](cli_commands.md#view-or-change-this-nodes-frequency) | `set` is local serial only | Yes | Yes | Yes | Yes | Yes |
|
||||
| Radio | [`get/set radio.rxgain`](cli_commands.md#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110-v1141) | Supported radio | Feature | Feature | Feature | Feature | Feature |
|
||||
| Radio | [`get/set espnow.channel`](cli_commands.md#view-or-change-the-primary-esp-nowwifi-channel) | Primary ESP-NOW mesh radio | Feature | Feature | Feature | Feature | Feature |
|
||||
| Radio | [`get/set radio.fem.rxgain`](cli_commands.md#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards) | Controllable LoRa FEM | Feature | Feature | Feature | Feature | Feature |
|
||||
| Radio | [`get/set radio.fem.txgain`](cli_commands.md#view-or-change-the-lora-fem-transmit-path-gain-state-on-supported-boards) | Controllable LoRa FEM | Feature | Feature | Feature | Feature | Feature |
|
||||
| Radio | [`get/set radio.rxps`; `get rxps.wd`](#radio-rxps) | Full parser and RX power-saving support | Feature | Feature | Feature | Feature | Feature |
|
||||
@@ -321,6 +323,7 @@ fix, no WiFi connection, an inactive bridge, or an nRF52 bootloader without
|
||||
| Bridge | [`get/set bridge.baud`](cli_commands.md#view-or-change-the-speed-of-the-bridge-rs-232-only) | RS-232 bridge | Feature | Feature | Feature | No | Feature |
|
||||
| Bridge | [`get/set bridge.uart`](cli_commands.md#view-or-change-the-uart-used-by-the-bridge-rs-232-only) | RS-232 bridge | Feature | Feature | Feature | No | Feature |
|
||||
| Bridge | [`get/set bridge.channel`](cli_commands.md#view-or-change-the-channel-used-for-bridging-espnow-only) | ESP-NOW bridge | No | No | No | Feature | Feature |
|
||||
| Bridge | [`get/set bridge.format`](cli_commands.md#view-or-change-the-esp-now-bridge-wire-format) | ESP-NOW bridge | No | No | No | Feature | Feature |
|
||||
| Bridge | [`get/set bridge.secret`](cli_commands.md#set-the-esp-now-secret) | ESP-NOW bridge | No | No | No | Feature | Feature |
|
||||
| Board | [`get bootloader.ver`](cli_commands.md#view-the-bootloader-version-nrf52-only) | nRF52 only | No | No | No | No | No |
|
||||
| Board | [`get pwrmgt.support`; `get pwrmgt.source`; `get pwrmgt.bootreason`; `get pwrmgt.bootmv`](nrf52_power_management.md#cli-commands) | nRF52 only | No | No | No | No | No |
|
||||
|
||||
+102
-4
@@ -247,6 +247,10 @@ The WiFi `set` commands work on MQTT observers and on FULL standalone
|
||||
ESP32 repeater/room-server builds. On a standalone build, changing the SSID or
|
||||
password stops an active WebConfig session; run `start webconfig` again to use
|
||||
the new credentials. `set wifi.pwd` with no value selects an open network.
|
||||
Standalone WiFi also accepts an exact 64-character hexadecimal WPA/WPA2 PSK;
|
||||
ordinary passphrases remain limited to 63 characters. Other 64-character values
|
||||
and all longer values are rejected. MQTT observer WiFi passwords retain their
|
||||
fixed 63-character limit.
|
||||
Power-save changes are applied immediately when WiFi is running and otherwise
|
||||
take effect on the next connection. `get wifi.pwd` is intentionally unavailable
|
||||
so the standalone password is never returned by the CLI.
|
||||
@@ -260,9 +264,45 @@ restarting the WiFi station, so a TCP client should expect to reconnect at the
|
||||
new address; USB password input is masked. Binary
|
||||
Companion clients can use command bytes
|
||||
`0x46` and `0x47` over USB, BLE, or TCP port 5000 without the terminal-start
|
||||
token. WiFi-only Companions accept all three modes; Full Companion rejects
|
||||
token. WiFi-only Companions accept all three modes. Full Companion rejects
|
||||
`none` because its simultaneous BLE transport requires modem sleep. Companion
|
||||
device `powersaving` and LoRa `radio.rxps` remain independent.
|
||||
device `powersaving` and LoRa `radio.rxps` remain independent. On an ESP32 Full
|
||||
Companion whose primary mesh radio is ESP-NOW, `max` is also unavailable: a
|
||||
station using maximum modem sleep can miss ESP-NOW broadcasts, which the access
|
||||
point does not buffer for it. A previously saved `max` value is capped to and
|
||||
reported as `min`, and a new `max` selection is rejected. These
|
||||
WiFi/BLE/primary-ESP-NOW builds therefore use `min`.
|
||||
|
||||
#### View or change the primary ESP-NOW/WiFi channel
|
||||
|
||||
**Usage:**
|
||||
|
||||
- `get espnow.channel`
|
||||
- `set espnow.channel <channel>`
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- `channel`: Shared 2.4 GHz WiFi channel from `1` through `13`; choose one
|
||||
permitted in your region and supported by the router.
|
||||
|
||||
**Default:** `1`
|
||||
|
||||
This command is available when ESP-NOW is the node's primary mesh radio. The
|
||||
setting is persisted. A `set` reply reports that reboot is required; until
|
||||
reboot, the running ESP-NOW radio remains on its previous channel. On builds
|
||||
that also provide ordinary WiFi, its station and setup AP share that channel.
|
||||
|
||||
After reboot, ESP-NOW, the setup AP, and the infrastructure-WiFi station use
|
||||
the selected channel. Every primary ESP-NOW node that must communicate with
|
||||
this node, plus the configured router's 2.4 GHz radio, must use the same fixed
|
||||
channel. WiFi power saving does not allow the transports to use different
|
||||
channels. On an ESP32 Full build with primary ESP-NOW, `wifi.powersave max` is
|
||||
unavailable because maximum modem sleep can miss ESP-NOW broadcasts; use `min`
|
||||
for coexistence.
|
||||
|
||||
`espnow.channel` is the channel of the primary ESP-NOW mesh transport. It is
|
||||
separate from `bridge.channel`, which configures only an ESP-NOW bridge on a
|
||||
firmware role whose primary mesh radio is LoRa.
|
||||
|
||||
The browser portal is not compiled into the two 4 MB
|
||||
`LilyGo_TLora_V2_1_1_6_*_observer_mqtt` targets because it does not fit while
|
||||
@@ -648,7 +688,10 @@ frames active on interface `00`; ESP32 resumes the ordinary ASCII/Binary
|
||||
switcher after the logging terminal turns logging off. This setting does not
|
||||
change the node-storage capture controlled by `log start` and `log stop`.
|
||||
|
||||
Unified ESP32 FULL builds add one saved selector for both output paths:
|
||||
Unified non-Companion ESP32 FULL USB+WiFi observer builds add one saved
|
||||
selector for both output paths. Full Companion builds control USB diagnostics
|
||||
with `usb.logging` instead; their text-command parser does not expose
|
||||
`logging.output`:
|
||||
|
||||
```text
|
||||
get logging.output
|
||||
@@ -3490,7 +3533,60 @@ rate before running `set bridge.enabled on`.
|
||||
- `set bridge.channel <channel>`
|
||||
|
||||
**Parameters:**
|
||||
- `channel`: Channel number (1-14)
|
||||
- `channel`: Channel number from 1 through 13 in either format. This matches
|
||||
the primary-ESP-NOW policy and the default regulatory range used by the
|
||||
supported ESP32 targets.
|
||||
|
||||
This controls the optional ESP-NOW bridge transport; it does not change a
|
||||
node's primary ESP-NOW mesh channel. Primary-ESP-NOW firmware uses
|
||||
`get espnow.channel` and `set espnow.channel <1-13>` instead.
|
||||
|
||||
---
|
||||
|
||||
#### View or change the ESP-NOW bridge wire format
|
||||
**Usage:**
|
||||
- `get bridge.format`
|
||||
- `set bridge.format <format>`
|
||||
|
||||
**Parameters:**
|
||||
- `format`:
|
||||
- `wrapped`: the original ESP-NOW bridge framing (magic, checksum, and XOR
|
||||
using `bridge.secret`)
|
||||
- `raw`: the exact serialized MeshCore packet used by primary
|
||||
`ESPNOWRadio` firmware
|
||||
|
||||
**Default:** `wrapped`
|
||||
|
||||
The setting is persistent and restarts an enabled bridge immediately. Receive
|
||||
parsing is strict: `wrapped` accepts only wrapped frames and `raw` accepts only
|
||||
raw MeshCore frames. Coordinate the format and channel on every ESP-NOW peer;
|
||||
there is no automatic dual-format receive mode because it would permit
|
||||
ambiguous, asymmetric bridge deployments.
|
||||
|
||||
Use `raw` to connect a LoRa-primary `*_repeater_bridge_espnow` node to
|
||||
`Generic_ESPNOW`, `SenseCapIndicator-ESPNow`, or another primary-ESP-NOW node.
|
||||
Raw mode enables the ESP-NOW LR PHY and sends at the same LR rate used by those
|
||||
targets. All nodes must use the same 1-13 channel. On a primary-ESP-NOW node,
|
||||
change that side with `set espnow.channel <1-13>` and reboot; on the bridge,
|
||||
use `set bridge.channel <1-13>`.
|
||||
|
||||
Raw mode ignores `bridge.secret` and removes the bridge wrapper's lightweight
|
||||
network isolation. MeshCore's own packet authentication/encryption still
|
||||
applies where the packet type provides it, but public frames and routing
|
||||
metadata remain visible. The wrapped format's XOR is isolation, not strong
|
||||
cryptography. Bridge duplicate tracking remains active in both formats, but
|
||||
deploying multiple gateways between the same LoRa and ESP-NOW coverage areas
|
||||
can still increase duplicate traffic while their seen-packet tables converge.
|
||||
|
||||
One ESP-NOW frame carries at most 250 payload bytes. In raw mode, serialized
|
||||
MeshCore packets up to that size remain byte-for-byte compatible with existing
|
||||
raw endpoints. Updated raw endpoints split 251-255-byte transport units into
|
||||
two versioned fragments and reassemble them by source MAC, length, and CRC;
|
||||
both endpoints must include this support for those sizes. Current valid
|
||||
MeshCore packet geometry reaches 254 bytes, while 255 is retained as transport
|
||||
headroom. Wrapped mode retains its legacy 246-byte maximum after the four-byte
|
||||
magic and checksum overhead, and drops larger packets instead of truncating
|
||||
them.
|
||||
|
||||
---
|
||||
|
||||
@@ -3504,6 +3600,8 @@ rate before running `set bridge.enabled on`.
|
||||
|
||||
**Default:** Varies by board
|
||||
|
||||
This setting is used only by `bridge.format wrapped`; raw mode ignores it.
|
||||
|
||||
---
|
||||
|
||||
#### View the bootloader version (nRF52 only)
|
||||
|
||||
@@ -261,7 +261,7 @@ text such as `set radio.rxgain off` still requires the USB terminal start token.
|
||||
|
||||
The WiFi power-save pair is available on ESP32 WiFi Companion builds over the
|
||||
normal binary USB, BLE, or TCP port 5000 transport. `CMD_GET_WIFI_POWER_SAVE`
|
||||
has no body and replies with `RESP_CODE_OK` followed by one mode byte.
|
||||
has no body and replies with `RESP_CODE_OK` followed by the effective mode byte.
|
||||
`CMD_SET_WIFI_POWER_SAVE` is followed by that mode byte and replies with
|
||||
`RESP_CODE_OK` after saving it:
|
||||
|
||||
@@ -274,10 +274,14 @@ has no body and replies with `RESP_CODE_OK` followed by one mode byte.
|
||||
An out-of-range value returns `ERR_CODE_ILLEGAL_ARG`. A non-WiFi Companion
|
||||
returns `ERR_CODE_UNSUPPORTED_CMD`. Full Companion has Bluetooth enabled and
|
||||
therefore returns `ERR_CODE_BAD_STATE` for `none`, because ESP32 WiFi/Bluetooth
|
||||
coexistence requires modem sleep. A storage failure also returns
|
||||
`ERR_CODE_BAD_STATE`. If an already-saved mode cannot be applied to the active
|
||||
WiFi driver, SET still returns `RESP_CODE_OK` and the mode is applied on the
|
||||
next connection. Device `powersaving` does not overwrite this setting.
|
||||
coexistence requires modem sleep. On an ESP32 Full Companion whose primary mesh
|
||||
radio is ESP-NOW, SET also returns `ERR_CODE_BAD_STATE` for `max` (value `2`): maximum
|
||||
modem sleep can make the station miss ESP-NOW broadcasts, which the access point
|
||||
cannot buffer. If an older image already saved `max`, GET reports `min` (value
|
||||
`0`) and the running policy uses `min`. A storage failure also returns
|
||||
`ERR_CODE_BAD_STATE`. If an otherwise permitted saved mode cannot be applied to
|
||||
the active WiFi driver, SET still returns `RESP_CODE_OK` and the mode is applied
|
||||
on the next connection. Device `powersaving` does not overwrite this setting.
|
||||
|
||||
The Bluetooth-name pair is available on Companion builds regardless of the
|
||||
currently selected transport, so a host can configure a BLE-capable image over
|
||||
|
||||
@@ -39,6 +39,39 @@ T-Echo Lite, LilyGo T-Impulse Plus, and Wio Tracker L1 E-Ink. Their old
|
||||
transport-specific names remain available for explicit compatibility builds,
|
||||
but the Full image is the canonical release artifact.
|
||||
|
||||
Every ESP32 Full image includes ordinary WiFi Companion, WebConfig, and the TCP
|
||||
mOTA services, even when its historical build base was USB- or BLE-only. On
|
||||
`Generic_ESPNOW` and `SenseCapIndicator-ESPNow`, ESP-NOW is also the primary
|
||||
mesh radio and shares the same 2.4 GHz hardware. Those two Full images retain
|
||||
B/G/N for ordinary clients alongside ESP-NOW LR. Their ESP-NOW mesh, setup AP,
|
||||
and infrastructure connection all use one persisted channel, which defaults
|
||||
to 1. Configure the router's 2.4 GHz radio and every other primary ESP-NOW node
|
||||
for that same fixed channel. Turning Companion WiFi off stops its TCP/AP
|
||||
services but deliberately leaves the ESP-NOW mesh radio running on the
|
||||
selected channel.
|
||||
|
||||
Inspect or change the shared channel from the Full Companion text terminal:
|
||||
|
||||
```text
|
||||
get espnow.channel
|
||||
set espnow.channel 6
|
||||
reboot
|
||||
```
|
||||
|
||||
The accepted range is 1 through 13; use only a channel permitted in your region
|
||||
and supported by the router. The setter persists the selection, but the
|
||||
running radio stays on its current channel until reboot. Coordinate the change
|
||||
across every primary ESP-NOW node and the router before rebooting, or the node
|
||||
will lose one or both links. This primary-radio setting is not
|
||||
`bridge.channel`; that command belongs to the separate ESP-NOW bridge feature.
|
||||
To attach a LoRa-primary `*_repeater_bridge_espnow` gateway to these nodes,
|
||||
match its `bridge.channel` and select `set bridge.format raw`; the bridge's
|
||||
backward-compatible default is the distinct wrapped format.
|
||||
WiFi power saving cannot put infrastructure WiFi and ESP-NOW on different
|
||||
channels. On these two primary-ESP-NOW Full targets, `max` is unavailable
|
||||
because maximum modem sleep can make the station miss ESP-NOW broadcasts; use
|
||||
`min` for WiFi/BLE/ESP-NOW coexistence.
|
||||
|
||||
List the available targets:
|
||||
|
||||
```bash
|
||||
@@ -142,17 +175,29 @@ start webconfig
|
||||
stop webconfig
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
SSID and password writes return their reply first, then restart the Companion
|
||||
WiFi station with the saved credentials. A TCP terminal therefore disconnects
|
||||
shortly after either write; reconnect to the IP reported by the new network.
|
||||
The password is write-only and is masked while it is entered over USB.
|
||||
The password is write-only and is masked while it is entered over USB. It may
|
||||
be empty for an open network, an ordinary passphrase of up to 63 characters, or
|
||||
an exact 64-character hexadecimal WPA/WPA2 PSK. Other 64-character values and
|
||||
all longer values are rejected.
|
||||
|
||||
The normal binary Companion connection can also read or write this setting over
|
||||
USB, BLE, or TCP port 5000 without entering terminal mode. The saved values are
|
||||
USB, BLE, or TCP port 5000 without entering terminal mode. The mode values are
|
||||
`0` for `min`, `1` for `none`, and `2` for `max`; see the
|
||||
[Companion protocol](./companion_protocol.md#commands). Full Companion rejects
|
||||
`none` because simultaneous WiFi and BLE require modem sleep. Fresh Cascade
|
||||
builds select `min`, and an existing saved selection takes precedence.
|
||||
`none` because simultaneous WiFi and BLE require modem sleep. The two
|
||||
primary-ESP-NOW Full targets also reject `max`; unlike infrastructure traffic,
|
||||
peer ESP-NOW
|
||||
broadcasts cannot be buffered by the access point while the station sleeps. If
|
||||
an older image saved `max`, firmware applies and reports `min` instead. Fresh
|
||||
Cascade builds select `min`, and an existing valid saved selection takes
|
||||
precedence.
|
||||
|
||||
On radios with RX duty-cycle support, WebConfig and the text terminal also
|
||||
expose the persisted RXPS setting:
|
||||
|
||||
@@ -148,6 +148,18 @@ board has room; use `set bridge.enabled on` after configuring `bridge.uart` and
|
||||
RS-232 image. Repeaters may also offer separate ESP-NOW, Ethernet, or MQTT
|
||||
observer modes.
|
||||
|
||||
An ESP-NOW bridge target keeps LoRa as its primary mesh radio. Its runtime
|
||||
`bridge.format` setting chooses the peer protocol: `wrapped` (the
|
||||
backward-compatible bridge-to-bridge default using `bridge.secret`) or `raw`
|
||||
(direct MeshCore ESP-NOW LR frames for `Generic_ESPNOW`,
|
||||
`SenseCapIndicator-ESPNow`, and other primary-ESP-NOW nodes). This is one
|
||||
firmware choice, not two board images. Match `bridge.channel` to the primary
|
||||
nodes' `espnow.channel` before selecting `set bridge.format raw`.
|
||||
For Heltec V4 specifically, `companion_radio_full` is still a LoRa-primary
|
||||
Companion; choose the existing `heltec_v4_repeater_bridge_espnow` firmware to
|
||||
make that board the LoRa/ESP-NOW gateway. Use its exact merged artifact when
|
||||
changing roles or partition layouts.
|
||||
|
||||
## FULL versus standard
|
||||
|
||||
For a new installation, use the FULL / complete profile when it exists and the
|
||||
|
||||
@@ -189,7 +189,30 @@ set wifi.powersave {none|min|max}
|
||||
Shows or changes the persisted WiFi modem-sleep policy on ESP32 WiFi Companion
|
||||
builds. Full Companion requires at least `min` while BLE is present and rejects
|
||||
`none`. The WebConfig WiFi card and the normal binary Companion protocol expose
|
||||
the same setting; binary clients do not need the terminal-start token.
|
||||
the same setting; binary clients do not need the terminal-start token. On an
|
||||
ESP32 Full Companion whose primary mesh radio is ESP-NOW, `max` is also
|
||||
unavailable because maximum modem sleep can make the
|
||||
station miss ESP-NOW broadcasts, which the access point does not buffer. A
|
||||
previously saved `max` value is capped to and reported as `min`, and a new `max`
|
||||
selection is rejected. Such a WiFi/BLE/primary-ESP-NOW build therefore uses
|
||||
`min`.
|
||||
|
||||
```
|
||||
get espnow.channel
|
||||
set espnow.channel <1-13>
|
||||
```
|
||||
On Full Companion builds whose primary mesh radio is ESP-NOW, this shows or
|
||||
saves the single channel shared by ESP-NOW, the setup AP, and the
|
||||
infrastructure-WiFi station. The default is channel 1. Use only a channel
|
||||
permitted in your region and supported by the router. A saved change takes
|
||||
effect only after reboot. Every primary ESP-NOW node and the router's 2.4 GHz
|
||||
radio must use the same fixed channel; power saving does not permit separate
|
||||
channels. On these ESP32 Full builds, `wifi.powersave max` is unavailable and
|
||||
`min` is the coexistence setting. This channel setting is also distinct from
|
||||
`bridge.channel`, which controls the optional ESP-NOW bridge transport. An
|
||||
updated LoRa-primary ESP-NOW bridge can join this raw primary transport by
|
||||
selecting the same channel and running `set bridge.format raw`; its default
|
||||
`wrapped` format remains the bridge-to-bridge protocol.
|
||||
|
||||
```
|
||||
get radio.rxgain
|
||||
|
||||
Reference in new issue
Block a user