This guide gets you from a clean checkout to a running node in under five minutes, first in host simulation (no hardware required) and then on real hardware.
| Tool | Minimum version | Install |
|---|---|---|
| Rust toolchain | 1.74 | curl https://sh.rustup.rs -sSf | sh |
| GCC | 11 | sudo apt install build-essential |
| PlatformIO CLI | 6.x | pip install platformio |
Clone the repository:
git clone https://github.com/MichTronics/Rivr.git Rivr
cd RivrBuild the host tools and run the bundled replay:
# Build rivrc (compiler CLI) and the replay host binary
cargo build -p rivr_host
# Compile a RIVR program and display the AST
cargo run -p rivr_host --bin rivrc -- tests/rivr_replay.jsonl
# Replay a captured traffic log through the Rivr engine
cargo run -p rivr_host -- tests/rivr_replay.jsonlExpected output ends with a line like:
[REPLAY] done — 42 frames processed, 0 errors
cd tests
make allExpected: 5 suites, 295 checks total, 0 failures (acceptance · radio_recovery · replay · dutycycle · ota/policy).
# Flash a client node (send + receive, no relay)
~/.platformio/penv/bin/pio run -e client_esp32devkit_e22_900 -t upload
# Flash the same client with BLE bridge enabled
~/.platformio/penv/bin/pio run -e client_esp32devkit_e22_900_ble -t upload
# Flash a dedicated repeater node
~/.platformio/penv/bin/pio run -e repeater_esp32devkit_e22_900 -t uploadBLE variants — every board has a
client_<board>_bleenvironment. The BLE client advertises asRIVR-XXXXand accepts GATT writes (Nordic NUS UUIDs). See FLASHING.md for all board BLE commands.
~/.platformio/penv/bin/pio run -e client_lilygo_lora32_v21 -t upload
~/.platformio/penv/bin/pio run -e client_lilygo_lora32_v21_ble -t upload~/.platformio/penv/bin/pio device monitor
# Baud rate: 115200Once the node boots you will see a startup banner followed by a rivr> prompt.
Common commands:
| Command | Description |
|---|---|
help |
List all available commands |
id |
Print this node's address and firmware version |
chat <message> |
Broadcast a CHAT packet over the mesh |
neighbors |
Show the neighbor link-quality table (RSSI, SNR, score) |
routes |
Dump the unicast reverse-path cache |
policy |
Print current runtime parameters (@POLICY JSON) |
supportpack |
Emit a @SUPPORTPACK JSON block — attach this to every bug report |
Example session:
rivr> id
@ID addr=0xA1B2C3D4 role=CLIENT fw=beta-0.2.0 radio=SX1262
rivr> neighbors
@NBR count=2
peer=0xDEADBEEF rssi=-78 snr=6 score=0.82 flags=DIRECT
peer=0xCAFEB0BA rssi=-91 snr=2 score=0.54 flags=STALE
rivr> chat Hello mesh
@CHT tx seq=1 ttl=5 len=11
rivr> supportpack
@SUPPORTPACK ...
| Parameter | Value |
|---|---|
| Frequency | 869.480 MHz (EU868 g3 sub-band) |
| Spreading factor | SF8 |
| Bandwidth | 62.5 kHz (RF_BANDWIDTH_HZ=62500) |
| Coding rate | CR 4/8 |
| Preamble length | 8 symbols |
| Max TX power | +30 dBm (E22) / +20 dBm (LilyGo) |
| Duty cycle | 10 % (EU868 g3 limit, enforced in firmware) |
Override frequency at build time:
~/.platformio/penv/bin/pio run -e client_esp32devkit_e22_900 \
--project-option "build_flags=-DRIVR_RF_FREQ_HZ=915000000" -t uploadRegulatory notice: You are responsible for compliance with the radio regulations in your jurisdiction. The default 869.480 MHz / +30 dBm configuration targets EU868 g3; operating outside the licensed band or above the permitted power level is illegal in most jurisdictions.
| Goal | Where to look |
|---|---|
| Enable BLE companion link | docs/en/companion-ble-integration.md |
| Architecture | docs/en/architecture.md |
| Write a custom RIVR pipeline | docs/en/language-reference.md |
| Wire up new hardware | docs/en/build-guide.md |
| Integrate into existing firmware | docs/en/firmware-integration.md |
| Prepare a release | docs/releasing.md |
| Beta release checklist | docs/beta-release-checklist.md |