Skip to main content

BLE Services Reference

The Melody device exposes several BLE services for configuration and low-latency control.
  • Device name (BLE): MEL-############, where ############ - 6-byte BLE MAC address.
  • UUID width: 16-bit
  • Byte order: Little-endian
All characteristics must be interpreted using little-endian byte ordering.

Service 0x1001 — WiFi Setup

Configure WiFi credentials and read available access point list.

Service 0x1002 — Device Information

Static device metadata and identifiers.

Service 0x1003 — Device Status

Live operational status and power / temperature information.

Service 0x1004 — Stroker Status

Current motion and target state of the stroker actuator.

Service 0x1005 — Stroker Settings

Software motion limits in millimeters.

Service 0x1006 — OTP

Generate and read short-lived OTP codes for secure pairing / token flows.

Service 0x2001 — HDC (Haptics Direct Control)

Immediate position control. New commands interrupt current movement (not queued). Binary format for 0x0001 (little-endian):
  • Bytes 0–1: Position (uint16, 0–10000)
  • Bytes 2–3: Time (uint16, ms, 0–65535)
Binary format for 0x0002 (little-endian):
  • Bytes 0–1: Position (uint16, 0–10000)
  • Bytes 2–3: Velocity (uint16)

Service 0x2002 — HPS (Haptics Point Stream)

Stream position/time points. Velocity is calculated from time delta between points.
Minimum 2 points required for valid motion.
Limits:
  • Max 64 points/message
  • Max 128 points total buffer
Binary format for 0x0001 (per point, little-endian):
  • Bytes 0–1: Position (uint16, 0–10000)
  • Bytes 2–5: Time (uint32, ms)

Service 0x2003 — HLC (Haptics Loop Control)

Automatic up/down stroking loop with configurable range and speed.

Service 0x1007 — Firmware Update

Firmware update availability and control.

Service 0x1008 — Device Settings

Device configuration settings.

Service 0x1009 — Debug Logs

Debug logging control and data streaming.

Service 0x100A — Service Commands

System-level service commands.

Notes & Best Practices

  • Always respect little-endian ordering for all numeric values.
  • Use WiFi API for higher-level orchestration (scripts, sessions, debug) and BLE for low-latency or local control.
  • For robust apps:
    • Use HPS for smooth real-time motion.
    • Reserve HDC for simple, interruptible target moves.
    • Configure HLC as a simple, automatic loop mode driven by firmware.
  • OTP and WiFi setup over BLE are ideal for first-time device provisioning and pairing flows.