BLE Overview
RADR uses Bluetooth Low Energy (BLE) for all device communication. As a BLE central device, RADR scans for and connects to peripheral devices like the OSSM and Lovense toys.Scan Parameters
During active scanning, RADR sends scan request packets to devices to retrieve their full advertising data, including device names.
Connection Parameters
RADR uses optimized connection parameters for responsive control:
The 15ms connection interval provides responsive control with minimal latency between encoder turns and device response.
Device Discovery
RADR identifies supported devices by their advertised service UUIDs:Research And Desire Devices
Lovense Devices
Buttplug.io Devices
Devices supported via the Buttplug.io protocol are identified using UUIDs from the dynamic registry (registry.json). This registry can be updated via firmware updates without code changes.
OSSM Protocol
RADR communicates with OSSM using a custom BLE protocol:Service Structure
Command Format
Commands are sent as byte arrays to the appropriate characteristic:Pattern Selection
Patterns are selected by index:Lovense Protocol
For Lovense devices with direct integration (Domi), RADR uses the Lovense BLE protocol:Vibration Control
Battery Query
Power Control
Buttplug.io Devices
For devices supported via Buttplug.io, RADR implements a subset of the Buttplug protocol:- Vibrate — Set vibration level (0-1 float, mapped to device range)
- Linear — For thrusting devices
- Rotate — For rotating devices
Connection Recovery
If RADR loses connection to a device:- Detection — Connection loss detected within supervision timeout (1500ms)
- Reconnection — Automatic reconnection attempt within 2-5 seconds
- Safety — For OSSM, gradual ramp-down during disconnection
- Failure — After failed reconnection, return to main menu
Security
RADR uses open BLE connections without pairing or bonding:- No PIN required
- No encryption (commands are plaintext)
- Single connection at a time
Debugging
For BLE debugging during development:- Use a BLE sniffer (nRF Connect, Wireshark with BLE adapter)
- Enable serial logging in firmware (
LOG_LEVEL_DEBUG) - Monitor connection events and characteristic writes
Further Reading
NimBLE Documentation
NimBLE stack documentation.
Buttplug.io Protocol
Buttplug device protocol specification.

