Technical documentation for the RADR over-the-air update architecture
This document describes the over-the-air (OTA) update system used by the Research And Desire wireless Remote (RADR), including the update chain, state machine flow, and what components get updated.
LittleFS partition containing device registry and protocol specs
littlefs.bin
The filesystem update is particularly important for device support — it contains the Buttplug.io registry that maps Bluetooth service UUIDs to device configurations. This allows adding support for new devices without requiring firmware changes.
When the filesystem is updated, the Buttplug.io device registry is refreshed:The registry is loaded at boot time by initRegistry() in src/devices/registry.cpp:
Hardcoded devices are registered first (e.g., OSSM)
/registry.json is read from LittleFS
Each service UUID is mapped to a ButtplugIODeviceFactory
Protocol specs are loaded on-demand when devices are discovered
Update availability is determined by guard functions in src/state/guards.hpp:
bool hasFilesystemUpdate(const State &state, const Event &event) { return isFilesystemUpdateAvailable;}bool hasSoftwareUpdate(const State &state, const Event &event) { return isSoftwareUpdateAvailable;}
These flags are controlled by:
Flag
Set When
isSoftwareUpdateAvailable
FORCE_UPDATE compile flag, or server indicates update
isFilesystemUpdateAvailable
FORCE_UPDATE compile flag, or server indicates update
The current implementation has a TODO for automatic update checking. Currently, updates are triggered manually and availability must be set via compile flags or external mechanisms.