Skip to content

BLE Specification

This document specifies the Bluetooth Low Energy (BLE) GATT service used for communication between the blinqr device and companion mobile app.

The blinqr device operates as a BLE peripheral (server). The mobile app acts as a central (client) that connects to the device.

The device exposes a single GATT service with two characteristics:

  • reminder_state: App writes LED mask to device
  • button_events: Device notifies app of button presses
PropertyValue
NameReminderService
UUID12340001-0000-1000-8000-00805F9B34FB
TypePrimary Service

Controls which LEDs are illuminated on the device.

PropertyValue
UUID12340002-0000-1000-8000-00805F9B34FB
PropertiesWrite, Write Without Response
Value Typeuint8 (1 byte)
DirectionApp → Device

The value is a bitmask where bits 0–4 correspond to reminder slots 0–4:

BitSlotBinaryHex
0Slot 00b000000010x01
1Slot 10b000000100x02
2Slot 20b000001000x04
3Slot 30b000010000x08
4Slot 40b000100000x10

Examples:

  • 0x00 (0b00000) - All LEDs off
  • 0x01 (0b00001) - LED 0 on
  • 0x03 (0b00011) - LEDs 0 and 1 on
  • 0x1F (0b11111) - All LEDs on

Bits 5-7 are reserved and should be set to 0.


Notifies the app when a physical button is pressed on the device.

PropertyValue
UUID12340003-0000-1000-8000-00805F9B34FB
PropertiesNotify
Value Typeuint8 (1 byte)
DirectionDevice → App

The value is the index (0–4) of the button that was pressed:

ValueMeaning
0x00Button 0 pressed
0x01Button 1 pressed
0x02Button 2 pressed
0x03Button 3 pressed
0x04Button 4 pressed

The app must subscribe to notifications on this characteristic to receive button events:

Enable notifications: Write 0x0100 to CCCD (Client Characteristic Configuration Descriptor)
┌─────────────┐ ┌─────────────┐
│ Mobile App │ │ Device │
│ (Central) │ │ (Peripheral)│
└──────┬──────┘ └──────┬──────┘
│ │
│─────── Scan for devices ─────────────>│
│ │
│<─────── Advertise "blinqr Box" ───────│
│ │
│─────── Connect ──────────────────────>│
│ │
│─────── Discover services ────────────>│
│<────── Service: ReminderService ──────│
│ │
│─────── Subscribe to button_events ───>│
│<────── Subscription confirmed ────────│
│ │
│ │
│ ═══ CONNECTED STATE ════════════════ │
│ │
│ [Reminder fires at 9:00 AM] │
│ │
│─────── Write reminder_state: 0x01 ───>│
│ │ [LED 0 turns ON]
│ │
│ │ [User presses button 0]
│ │
│<────── Notify button_events: 0x00 ────│
│ │
│ [App acknowledges, clears bit] │
│ │
│─────── Write reminder_state: 0x00 ───>│
│ │ [LED 0 turns OFF]
│ │
ParameterValue
Advertising Interval100-200ms
Advertising DataService UUID, Device Name
Scan ResponseFull device name
ParameterRecommended
Connection Interval15-30ms
Slave Latency0
Supervision Timeout4000ms

When the BLE connection is lost:

  1. Device: Turns off all LEDs, restarts advertising
  2. App: Should attempt reconnection and resend current mask

If a write to reminder_state fails:

  • Retry up to 3 times
  • If still failing, inform user of connection issue

The current implementation uses no encryption or pairing. This is suitable for:

  • Development and testing
  • Personal use in a trusted environment

For production deployments requiring security:

  • Enable BLE bonding/pairing
  • Use encrypted characteristics
  • Implement authentication
PlatformBLE LibraryNotes
iOSCoreBluetoothiOS 13+ recommended
Androidandroid.bluetoothAndroid 6.0+
React Nativereact-native-ble-plxCross-platform
WebWeb Bluetooth APIChrome/Edge only
  • Maximum 1 connected client at a time
  • No bonding/pairing in current implementation
  • Notification buffer limited to single button event