Retain independent RS232 in Full MQTT repeaters
This commit is contained in:
1 parent
292834c9b1
commit
6765100c3a
37 files changed
+1572
-196
No files matched your search
@@ -1600,17 +1600,21 @@
|
||||
if (profile.role === "repeater") toggle("Repeat mesh traffic", "set repeat", "get repeat");
|
||||
if (info.rs232 && infrastructure) {
|
||||
const mode = chosen.mode;
|
||||
// MQTT images keep the historical bridge.enabled ESP-NOW alias.
|
||||
// Their independently saved UART uses the transport-specific controls.
|
||||
const uartSetting = info.mqtt ? "rs232.enabled" : "bridge.enabled";
|
||||
const uartRunning = info.mqtt ? "rs232.running" : "bridge.running";
|
||||
section("RS232 bridge" + (mode === "rs232" ? " - selected" : ""), [
|
||||
{ label: "On", commands: ["set bridge.enabled on", "get bridge.running"] },
|
||||
{ label: "Off", commands: ["set bridge.enabled off"] },
|
||||
{ label: "Set baud", commands: ["set bridge.enabled off", "set bridge.baud 115200", "set bridge.enabled on"] },
|
||||
{ label: "On", commands: ["set " + uartSetting + " on", "get " + uartRunning] },
|
||||
{ label: "Off", commands: ["set " + uartSetting + " off"] },
|
||||
{ label: "Set baud", commands: ["set " + uartSetting + " off", "set bridge.baud 115200", "set " + uartSetting + " on"] },
|
||||
].sort(function (a, b) {
|
||||
return mode === "standard" ? Number(b.label === "Off") - Number(a.label === "Off") : 0;
|
||||
}), "Use the UART and pin map for this exact board. Canonical GPS-enabled RAK4631 uses UART2; select it with set bridge.uart 2 while the bridge is stopped. UART1 needs a compatible GPS-free image.");
|
||||
}
|
||||
if (info.espnowBridge && infrastructure) {
|
||||
// Combined images need the transport-specific switch: bridge.enabled
|
||||
// controls the UART when RS-232 is compiled alongside ESP-NOW. Older
|
||||
// keeps its historical meaning for the primary transport. Older
|
||||
// dedicated ESP-NOW releases retain their original bridge.* commands.
|
||||
const independentEspnow = info.rs232 || info.mqtt;
|
||||
toggle("ESP-NOW bridge", independentEspnow ? "set espnow.enabled" : "set bridge.enabled",
|
||||
|
||||
@@ -204,6 +204,18 @@ available from a canonical image:
|
||||
target remains directly buildable with its bridge-on default but is omitted
|
||||
from bulk releases. Browser OTA pauses ESP-NOW while leaving RS-232 running;
|
||||
`stop ota` restores ESP-NOW when its saved setting is on.
|
||||
- Full Heltec V3, Wireless Stick Lite V3, RAK3112 and LilyGo T-LoRa V2.1-1.6
|
||||
MQTT repeaters retain RS-232 alongside MQTT and ESP-NOW. The first three
|
||||
use UART2 with RX on GPIO5 and TX on GPIO6; T-LoRa uses UART2 with RX on
|
||||
GPIO34 and TX on GPIO25. Use `set rs232.enabled on|off` and
|
||||
`get rs232.running` independently of `mqtt.enabled` and `espnow.enabled`.
|
||||
`bridge.baud` and `bridge.uart` configure the UART. Old MQTT preferences
|
||||
do not enable this newly added UART; its saved intent needs a validated
|
||||
UART profile marker. Historical `bridge.enabled` keeps its ESP-NOW meaning
|
||||
in MQTT images and its UART meaning in non-MQTT images. Full qualification
|
||||
verifies the linked UART driver even when compiling observer sources for a
|
||||
normal repeater, and resumed release selection rejects Full images without
|
||||
that proof.
|
||||
- MeshTower V2 repeaters use
|
||||
`Heltec_tower_v2_sdcard_repeater_lora_ota_no_external_sensors` as the one
|
||||
canonical target. Its SD OTA target `0A9DBBF0`, hardware ID
|
||||
|
||||
+14
-2
@@ -4745,6 +4745,15 @@ bridge actually started in this boot; they can differ after a hardware conflict,
|
||||
missing credentials, or a transient initialization failure. Normal merged
|
||||
repeater images default to `off`; dedicated bridge images may default to `on`.
|
||||
|
||||
Full MQTT repeaters with RS-232 expose three independent transports. Use
|
||||
`set rs232.enabled on|off` and `get rs232.enabled` for saved UART intent;
|
||||
`get rs232.running` reports the actual UART state. `mqtt.enabled` and
|
||||
`espnow.enabled` select the other two transports. In MQTT images the historical
|
||||
`bridge.enabled` alias controls ESP-NOW; in non-MQTT UART images it controls
|
||||
RS-232. `bridge.baud` and `bridge.uart` change only UART configuration, without
|
||||
restarting MQTT or ESP-NOW. The new UART mode starts off when upgrading old
|
||||
MQTT preferences and retains explicit settings across reboots.
|
||||
|
||||
---
|
||||
|
||||
#### Add a delay to packets routed through this bridge
|
||||
@@ -4908,7 +4917,9 @@ Requires WiFi connected and the MQTT bridge running.
|
||||
**Parameters:**
|
||||
- `rate`: Integer baud rate from `9600` through the board's compiled
|
||||
`BRIDGE_MAX_BAUD` (commonly `500000`); for example `115200`. Stop the bridge
|
||||
with `set bridge.enabled off` before changing it, then enable it again.
|
||||
with `set rs232.enabled off` in a combined MQTT image, or
|
||||
`set bridge.enabled off` in a non-MQTT UART image, before changing it.
|
||||
Enable the UART again with the matching switch.
|
||||
|
||||
**Default:** `115200`
|
||||
|
||||
@@ -4928,7 +4939,8 @@ Requires WiFi connected and the MQTT bridge running.
|
||||
|
||||
The setting is persistent and restarts an enabled bridge immediately. Normal
|
||||
repeater artifacts start with `bridge.enabled off`; configure the UART and baud
|
||||
rate before running `set bridge.enabled on`. On the canonical RAK4631 runtime
|
||||
rate before running `set bridge.enabled on`. Combined MQTT images use
|
||||
`rs232.enabled` for that independent UART setting. On the canonical RAK4631 runtime
|
||||
image, UART 1 is reserved even if the bounded boot probe hears no RAK12501.
|
||||
Silence cannot prove that a cold L76K is physically absent, and that module
|
||||
remains powered by the shared WB_IO2/3V3_S rail. Use UART 2. UART 1 requires an
|
||||
|
||||
@@ -84,6 +84,7 @@ Stopping it first lets you finish configuring both sides before connecting them.
|
||||
| Option | Choices and purpose |
|
||||
| --- | --- |
|
||||
| `espnow.enabled` | `on` starts ESP-NOW; `off` stops it and keeps its saved settings. Independent of MQTT or RS-232. |
|
||||
| `rs232.enabled` | On combined UART images, starts or stops RS-232 independently of MQTT and ESP-NOW. Use `get rs232.running` to check the live UART. |
|
||||
| `bridge.channel` | The 2.4 GHz channel, 1-13. Match it on both boards. This is separate from the LoRa frequency in `set radio`. |
|
||||
| `bridge.format` | `wrapped` is the default for this two-repeater setup and uses the shared secret. `raw` connects to primary-ESP-NOW nodes such as `Generic_ESPNOW` or `SenseCapIndicator-ESPNow`; it ignores the secret. Both peers must use compatible formats. |
|
||||
| `bridge.secret` | A matching, case-sensitive value of 1-15 characters for `wrapped` mode. It separates bridge groups; it is not strong encryption. MeshCore's own message encryption remains in place. |
|
||||
|
||||
@@ -207,8 +207,10 @@ both transports. Use `set espnow.enabled on|off` for ESP-NOW and, where
|
||||
supported, `set mqtt.enabled on|off` for MQTT. Newly combined ordinary
|
||||
repeaters start with ESP-NOW off until explicitly enabled, including the first
|
||||
upgrade from unmarked legacy preferences. Later reboots preserve that setting.
|
||||
On combined RS-232 boards `bridge.enabled` controls the UART independently. Both use
|
||||
one 2.4 GHz radio, so when both are enabled the ESP-NOW bridge channel must
|
||||
On combined RS-232 boards without MQTT, `bridge.enabled` controls the UART.
|
||||
Full Heltec V3, WSL3, RAK3112 and T-LoRa V2.1 MQTT images also retain RS-232;
|
||||
use `set rs232.enabled on|off` and `get rs232.running` for their independent
|
||||
UART. MQTT and ESP-NOW use one 2.4 GHz radio, so when both are enabled the ESP-NOW bridge channel must
|
||||
match the connected WiFi access point's fixed channel. ESP-NOW-only mode does
|
||||
not require WiFi credentials. Its runtime
|
||||
`bridge.format` setting chooses the peer protocol: `wrapped` (the
|
||||
|
||||
@@ -26,7 +26,11 @@ Classic ESP32 additionally retains its existing 8 KiB **static DRAM** check.
|
||||
|
||||
The policy adds allowances for task stacks, radio packet pools, screen objects
|
||||
and pixel buffers, filesystem/sensor allocations, enabled wireless stacks,
|
||||
MQTT connections, OTA scratch and transient allocations. A 160x80 ST7735
|
||||
MQTT connections, OTA scratch and transient allocations. ESP32 images with
|
||||
RS-232 reserve another 8 KiB even when UART defaults off: 4 KiB for the
|
||||
source-bounded bridge object and 4 KiB for the UART driver and buffers. This
|
||||
keeps runtime UART enablement in the budget beside MQTT and ESP-NOW.
|
||||
A 160x80 ST7735
|
||||
framebuffer needs 25,602 bytes; an OLED allowance is 4 KiB. nRF52 Full with that
|
||||
color framebuffer must have at least 72 KiB available before startup allocations.
|
||||
Headless and OLED devices use their own smaller totals. The JSON lists each
|
||||
|
||||
@@ -190,6 +190,8 @@ from some portable builds. The USB browser console still works without it.
|
||||
| Verbose USB diagnostics | `set usb.debug on` while USB logging is on | `set usb.debug off` | `get usb.debug` reports saved intent |
|
||||
| Capture RX log to node storage | `log start` | `log stop` | `log` prints the capture locally |
|
||||
| RS232 / ESP-NOW bridge master | `set bridge.enabled on` | `set bridge.enabled off` | `get bridge.enabled`, `get bridge.running`, `get bridge.type` |
|
||||
| Independent RS232 in combined Full MQTT images | `set rs232.enabled on` | `set rs232.enabled off` | `get rs232.enabled`, `get rs232.running` |
|
||||
| Independent ESP-NOW in combined Full images | `set espnow.enabled on` | `set espnow.enabled off` | `get espnow.enabled`, `get espnow.running` |
|
||||
| MQTT periodic status publication | `set mqtt.status on` | `set mqtt.status off` | `get mqtt.status` shows connection status |
|
||||
| MQTT packet publication | `set mqtt.packets on` | `set mqtt.packets off` | `get mqtt.packets` |
|
||||
| SNMP on supported MQTT infrastructure | `set snmp on`, then `reboot` | `set snmp off`, then `reboot` | `get snmp` |
|
||||
|
||||
Reference in new issue
Block a user