-
Notifications
You must be signed in to change notification settings - Fork 3
RaftCommandSerialSysMod
Rob Dobson edited this page May 3, 2026
·
1 revision
Built-in SysMod that opens one or more dedicated UARTs (separate from
SerialConsole) as binary command channels — typically used to attach peripherals or talk to a host MCU.
- Up to four configurable UART ports (
MAX_SERIAL_PORTS = 4). - Each port is registered as a Comms Channel using the configured protocol codec.
- Supports bridges: a host on (e.g.) BLE can be connected to a peripheral on a UART, with messages forwarded transparently.
-
commandserialREST endpoint to manage bridges at runtime.
| Per-port key | Default | Meaning |
|---|---|---|
enable |
0 |
Enable this port |
name |
auto | Channel name reported to CommsChannelManager
|
uartNum |
1 |
ESP32 UART number |
baudRate |
921600 |
Baud rate |
rxPin / txPin
|
-1 |
GPIO pins; -1 = use UART defaults |
rxPullup |
0 |
Enable pullup on rx |
rxBufSize / txBufSize
|
1024 |
UART driver buffer sizes |
protocol |
"" |
Codec name (RICSerial, RICFrame, RICJSON) |
commandserial accepts JSON (via CommandFrame) for bridge control:
| Form | Effect |
|---|---|
commandserial?cmd=open&port=<name>&name=<bridgeName>&idleCloseSecs=<n> |
Open a bridge from the requesting channel to port
|
commandserial?cmd=close&id=<bridgeID>&force=0|1 |
Close a bridge |
(JSON-frame equivalents using cmdName="commandserial" are also supported.)
- Comms Channels
- SerialConsole SysMod — for an interactive command UART (different role)
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
- PlatformIO / Arduino
Scaffolding & Building
- Raft CLI
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
Helpers
Reference
{ "name": "CommandSerial", "ports": [ { "enable": 1, "name": "Serial1", "uartNum": 1, "baudRate": 921600, "rxPin": 16, "txPin": 17, "rxPullup": 0, "rxBufSize": 1024, "txBufSize": 1024, "protocol": "RICSerial" } ] }