From a1d47277b49f7be71da24ded38b59367e4a4a23c Mon Sep 17 00:00:00 2001 From: Adam Gessaman Date: Mon, 25 May 2026 12:04:23 -0700 Subject: [PATCH] Add INW Mesh preset and enhance credential handling in MQTTBridge - Introduced a new MQTT preset for INW Mesh with username/password authentication. - Updated documentation to include the new preset and its configuration requirements. - Enhanced credential handling in MQTTBridge to support dynamic username/password assignment for presets requiring per-slot credentials. - Improved feedback in CLI for users to set credentials when needed. --- MQTT_IMPLEMENTATION.md | 8 +++++--- src/helpers/CommonCLI.cpp | 8 ++++++++ src/helpers/MQTTPresets.h | 13 ++++++++++--- src/helpers/bridges/MQTTBridge.cpp | 31 +++++++++++++++++++++++++++--- 4 files changed, 51 insertions(+), 9 deletions(-) diff --git a/MQTT_IMPLEMENTATION.md b/MQTT_IMPLEMENTATION.md index f813e068..2bf2f551 100644 --- a/MQTT_IMPLEMENTATION.md +++ b/MQTT_IMPLEMENTATION.md @@ -111,6 +111,7 @@ The MQTT bridge uses a slot-based architecture with up to 6 concurrent connectio | `coloradomesh` | wss://mqtt.meshcore.coloradomesh.org:1883 | JWT (Ed25519) | WSS | | `meshcore-ca-1` | mqtt1.meshcore.ca:443 | JWT (Ed25519) | WSS | | `meshcore-ca-2` | mqtt2.meshcore.ca:443 | JWT (Ed25519) | WSS | +| `inwmesh` | scope.inwmesh.org:8883 | Username/password (per slot via `mqttN.username` / `mqttN.password`) | MQTT over TLS | | `custom` | User-configured | Username/Password | MQTT or WSS | | `none` | (disabled) | — | — | @@ -288,18 +289,19 @@ Each slot (1-6) supports the following commands: - `set mqttN.preset meshat.se` - Set slot N to Meshat.se - `set mqttN.preset eastidahomesh` - Set slot N to EastIdahoMesh (WSS/TLS, no auth; packets on `meshcore/{IATA}/{PUBLIC_KEY}/packets`) - `set mqttN.preset coloradomesh` - Set slot N to ColoradoMesh +- `set mqttN.preset inwmesh` - Set slot N to INW Mesh Scope (`mqtts://scope.inwmesh.org:8883`; set `mqttN.username` and `mqttN.password`) - `set mqttN.preset custom` - Set slot N to custom broker (configure server/port/username/password) - `set mqttN.preset none` - Disable slot N - `set mqttN.server ` - Set custom server hostname for slot N - `set mqttN.port ` - Set custom server port for slot N (1-65535) -- `set mqttN.username ` - Set custom username for slot N -- `set mqttN.password ` - Set custom password for slot N +- `set mqttN.username ` - Set username for slot N (`custom` preset, or presets like `inwmesh` that require per-device credentials) +- `set mqttN.password ` - Set password for slot N (`custom` preset, or presets like `inwmesh` that require per-device credentials) - `set mqttN.token ` - Set per-slot token (required for MeshRank preset) - `set mqttN.topic