LXMF
Type: Protocol Role in Styrene: Wire format for all fleet RPC messages
LXMF (Lightweight Extensible Message Format) is a message format and delivery protocol built on Reticulum. It provides reliable message delivery with store-and-forward capability.
Why Styrene Uses LXMF
Direct Reticulum links are point-to-point and ephemeral. LXMF adds:
- Message persistence — Messages survive disconnection
- Delivery confirmation — Know when messages arrive
- Propagation nodes — Store-and-forward for offline devices
- Extensible fields — Custom payload types
Message Structure
LXMF Message
├── Source (destination hash)
├── Destination (destination hash)
├── Timestamp
├── Title (optional)
├── Content (main payload)
├── Fields
│ ├── FIELD_COMMANDS (embedded actions)
│ ├── FIELD_CUSTOM_TYPE (Styrene uses this)
│ └── ... extensible ...
└── Signature
Styrene Wire Protocol
Styrene uses FIELD_CUSTOM_TYPE for RPC:
| Type Range | Purpose |
|---|---|
| 0x01-0x0F | Control (PING, PONG, HEARTBEAT) |
| 0x10-0x1F | Status (STATUS_REQUEST/RESPONSE) |
| 0x20-0x2F | Content (CHAT, FILE_*) |
| 0x30-0x3F | Network (ANNOUNCE, PEER_*) |
| 0x40-0x5F | RPC Commands (EXEC, REBOOT, CONFIG_UPDATE) |
| 0x60-0x7F | RPC Responses |
| 0x80-0x9F | Hub Services |
| 0xA0-0xBF | Pub/Sub |
| 0xC0-0xCF | Terminal Sessions |
| 0xD8-0xDE | Tunnel Negotiation |
See wire-protocol-migration for full protocol specification.
Propagation
LXMF supports propagation nodes that store messages for offline destinations:
TUI ──LXMF──→ Hub (propagation node) ──stores──→ styrened comes online ──delivers──→ styrened
The NomadNet Hub in Styrene acts as a propagation node for the fleet.
Transport Modes
| Mode | Use Case | Latency |
|---|---|---|
| Direct | Both parties online, same transport | ms-seconds |
| Propagated | Destination offline or different transport | minutes-hours |
| Opportunistic | Direct if possible, propagated otherwise | varies |
Styrene uses opportunistic delivery by default.
Message Size
LXMF has no hard size limit, but:
- Small messages (<500 bytes) can use single-packet delivery
- Larger messages require link establishment
- Over LoRa, practical limit is a few KB due to bandwidth
Styrene RPC messages are designed to fit in single packets when possible.
Resources
- LXMF Repository
- Reticulum — Transport layer
- lxmf/messaging-over-lxmf-research — Pub/sub patterns research
Related
- Reticulum — Underlying transport
- NomadNet — LXMF-based communication platform
- wire-protocol-migration — Styrene’s use of LXMF