Skip to main content
This document covers the Bluetooth Low Energy (BLE) communication protocols used by RADR to communicate with supported devices.

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
Not all devices support all commands. RADR queries device capabilities during connection.

Connection Recovery

If RADR loses connection to a device:
  1. Detection — Connection loss detected within supervision timeout (1500ms)
  2. Reconnection — Automatic reconnection attempt within 2-5 seconds
  3. Safety — For OSSM, gradual ramp-down during disconnection
  4. 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
BLE communications are not encrypted. Use RADR in private settings where radio interception is not a concern.

Debugging

For BLE debugging during development:
  1. Use a BLE sniffer (nRF Connect, Wireshark with BLE adapter)
  2. Enable serial logging in firmware (LOG_LEVEL_DEBUG)
  3. Monitor connection events and characteristic writes

Further Reading

NimBLE Documentation

NimBLE stack documentation.

Buttplug.io Protocol

Buttplug device protocol specification.