Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MQTT_IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ below documents the current build.
| `idahomesh` | `wss://mqtt.idahomesh.org:443/mqtt` | JWT | β€” |
| `ntxmesh` | `wss://ntxmesh.dhovin.me:8883` | JWT | β€” |
| `bsmesh` | `wss://mqtt.bsmesh.de:8885` | JWT | β€” |
| `marwoj` | `mqtts://mqtt.marwoj.net:8883` | User/pass (in firmware) | β€” |
| `custom` | your own broker | User/pass, or JWT when `mqttN.audience` is set | `set mqttN.server` (see [custom broker setup](#custom-brokers)) |
| `none` | (slot disabled) | β€” | β€” |

Expand Down Expand Up @@ -370,7 +371,7 @@ Each slot (1-6) supports the following commands:
- `set mqttN.audience` - Clear JWT audience (reverts to username/password auth)
- `set mqttN.filter <all|none|list>` - Select payload types uploaded to this slot

**Note:** Custom server/port settings only apply when the slot's preset is `custom`. Username/password also apply to built-in presets that use per-slot credentials (e.g. `inwmesh`); other userpass presets (`tennmesh`, `nashmesh`, `ctmesh`) ship fixed credentials in firmware.
**Note:** Custom server/port settings only apply when the slot's preset is `custom`. Username/password also apply to built-in presets that use per-slot credentials (e.g. `inwmesh`); other userpass presets (`tennmesh`, `nashmesh`, `ctmesh`, `marwoj`) ship fixed credentials in firmware.

#### Per-broker packet filters

Expand Down Expand Up @@ -889,7 +890,7 @@ the radio actually performs in that case.
### Authentication
The auth mode is fixed per preset (see [Broker Presets](#broker-presets)). Three modes are used:
- **JWT Authentication**: Ed25519-signed tokens for brokers that expect JWT (most WSS presets). For `custom` slots, JWT is used when `audience` is set.
- **Username/Password**: Some presets ship fixed credentials embedded in firmware (`tennmesh`, `nashmesh`, `ctmesh` β€” plain MQTT, no TLS); others (`inwmesh`, `custom`) take per-slot credentials via `mqttN.username` / `mqttN.password`.
- **Username/Password**: Some presets ship fixed credentials embedded in firmware (`tennmesh`, `nashmesh`, `ctmesh` β€” plain MQTT, no TLS; `marwoj` β€” MQTT over TLS); others (`inwmesh`, `custom`) take per-slot credentials via `mqttN.username` / `mqttN.password`.
- **None**: `meshrank` (account token carried in the topic) and `eastidahomesh` connect without broker auth.
- **Username Format** (JWT): `v1_{UPPERCASE_PUBLIC_KEY}`
- **Automatic Token Renewal**: Tokens are renewed before expiration
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/MQTTPresets.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static const char ISRG_ROOT_X1[] PROGMEM =
"-----END CERTIFICATE-----\n";

// Number of built-in presets
static const int MQTT_PRESET_COUNT = 36;
static const int MQTT_PRESET_COUNT = 37;

// Built-in preset definitions (stored in flash)
static const MQTTPresetDef MQTT_PRESETS[MQTT_PRESET_COUNT] = {
Expand Down Expand Up @@ -197,6 +197,7 @@ static const MQTTPresetDef MQTT_PRESETS[MQTT_PRESET_COUNT] = {
{ "idahomesh", "wss://mqtt.idahomesh.org:443/mqtt", "mqtt.idahomesh.org", ISRG_ROOT_X1, MQTT_AUTH_JWT, MQTT_TOPIC_MESHCORE, 0, true, 55, nullptr, nullptr },
{ "ntxmesh", "wss://ntxmesh.dhovin.me:8883", "ntxmesh.dhovin.me", ISRG_ROOT_X1, MQTT_AUTH_JWT, MQTT_TOPIC_MESHCORE, 0, true, 55, nullptr, nullptr },
{ "bsmesh", "wss://mqtt.bsmesh.de:8885", "mqtt.bsmesh.de", ISRG_ROOT_X1, MQTT_AUTH_JWT, MQTT_TOPIC_MESHCORE, 0, true, 55, nullptr, nullptr },
{ "marwoj", "mqtts://mqtt.marwoj.net:8883", nullptr, ISRG_ROOT_X1, MQTT_AUTH_USERPASS, MQTT_TOPIC_MESHCORE, 0, true, 55, "observer-agessaman", "ipRwCEclZkX47K" },
};

// Find a preset by name, returns nullptr if not found
Expand Down