Crate umsh_ulcp_runtime

Crate umsh_ulcp_runtime 

Source
Expand description

Board-agnostic ULCP device runtime shared across firmware targets.

This crate holds the parts of the ULCP device that have no board HAL dependency, so the nRF52840 (T-Echo / T-1000E) and ESP32-S3 (Heltec V3) firmwares consume one copy instead of maintaining divergent forks.

Increment A moved the pure leaf modules: transport arbitration, the persisted counter map re-export, the BLE pairing-policy helpers, and the radio multiplexer. Increment C adds driver: the ULCP session run loop (formerly the nRF device_task/apply_effect/Emitter), with every board coupling routed through the driver::DeviceEnv trait.

The storage layer followed: journal holds the two-page rotating journal handle (mount scan, write-target rotation, boot walk-back) and node_counters the device node’s persisted frame counters. Both are generic over the board’s flash type, which is the only part of that stack that is genuinely per-board—the nRF images drive MPSL-coordinated NVMC, the ESP32 image its SPI part. Shared modules emit diagnostics through log, whose sink each board installs once at boot.

Modules§

admin_responder
The device’s answer to Node Management Requests.
ble_controller
Application-owned controller adapters: fail-closed privacy initialization and an ACL completion fence for the final response before forgetting a host.
ble_privacy
Public BLE discovery policy. No hardware or host-stack dependencies.
ble_security
Pure BLE security-policy helpers shared by embedded code and host tests.
counter_map
The device node’s persisted frame-counter map, shared via umsh-journal-store (see that crate’s counter module for the contract and tests).
device_node
The device node: a full umsh-mac/umsh-node stack running on the device itself, alongside the ULCP session.
driver
The board-agnostic ULCP session driver (Phase 5, increment C).
duty_gate
Duty-cycle admission gate for the device node’s radio path.
gnss
What a board does with a GNSS fix, shared by every board that has one.
i2c
The bus half of CMD_I2C_TRANSFER and CMD_I2C_SCAN, over any embedded-hal-async bus.
journal
Two-page rotating journal handles, generic over the board’s flash.
lan_bearer
The board-agnostic half of a LAN bearer: what a radio does with a datagram from the group before its node sees it.
log
The runtime’s debug-log seam.
meshcore
The MeshCore forwarder: a third radio client beside the session and the device node, forwarding MeshCore v1 traffic the way a MeshCore repeater does.
node_counters
The device node’s persisted frame counters.
radio_mux
Radio multiplexer: shares the one physical radio among multiple clients.
reply_completion
One outstanding response whose successful transmission permits DFU.
reseed
A ChaCha20 generator that takes entropy gathered after it was built.
temperature
Append-only temperature inventory, independent of sensor drivers.
transport_policy
Pure ULCP session transport arbitration.
wifi_journal
Full-page WiFi snapshots sharing the existing two-page journal reservation. Mount accepts legacy half-page records. The first new commit goes to the opposite page, so an interrupted upgrade cannot erase the saved configuration.