Skip to content

BLE Service Reference

This page documents the Bluetooth Low Energy GATT services and characteristics exposed by the Huepar S120.

FieldValue
Device NameLDM-S120 xxxx (xxxx = last 4 hex of MAC)
Address TypeRandom (BLE random address)
Advertised ServicesNone during scanning
Manufacturer DataNone
CharacteristicUUIDPropertiesValue
Device Name0x2A00read, writeLDM-S120 faca
Appearance0x2A01read0x0000 (Unknown)
CharacteristicUUIDPropertiesPurpose
Service Changed0x2A05indicateGATT service change notifications

This is the primary service for device communication.

Full UUID: 0000ae30-0000-1000-8000-00805f9b34fb

CharacteristicUUIDHandlePropertiesPurpose
Command TX0xAE010x000Awrite-without-responseSend commands to device
Data RX0xAE02-notifyReceive measurement data
Status RX0xAE05-indicateReceive status/errors

Direction: App → Device

Used to send all commands to the device. Commands must follow the LDMv1 packet format.

┌────────┬──────────┬──────────┬──────────┐
│ Header │ Command │ Payload │ Checksum │
│ 0xF1 │ 1 byte │ 0-N bytes│ 1 byte │
└────────┴──────────┴──────────┴──────────┘

Properties:

  • write-without-response - No ACK from BLE stack
  • Maximum write size: 20 bytes (BLE default MTU)

Example:

F1 00 00 F1 // Trigger measurement
│ │ │ └── Checksum: (0x00 + 0x00) % 256 = 0x00... wait, this is 0xF1
│ │ └───── Payload: none
│ └──────── Command: CLICK_MEASURE_BUTTON
└─────────── Header

Direction: Device → App

Used for measurement data and device information responses. Enable notifications to receive data.

Response format varies by command:

Response TypePrefixDescription
MeasurementF1 01Distance/area/volume results
MAC AddressF1 03 00Device MAC as ASCII
VersionF1 03 02JSON firmware info
HistoryF1 03 01Stored measurements

Enabling notifications:

# Python (bleak)
await client.start_notify(
"0000ae02-0000-1000-8000-00805f9b34fb",
notification_handler
)

Direction: Device → App

Used for status updates and error reporting. Uses indicate (with ACK) for reliability.

Common responses:

StatusMeaning
Err 1Target too far
Err 2Target too close
Err 3Excessive ambient light
Err 4Out of range

Different manufacturers use different service UUIDs:

ManufacturerService UUIDNotes
Longshuo (Huepar S120)0xAE30This device
SNDway0xFFF0Different protocol variant
Xintong0x1000Unknown protocol
Levelsure0xFFF0Laser levels
Levelsure 603BT0xFFA0Different model
Levelsure DP0xFFE0DP series
Terminal window
# Must trust before connecting
bluetoothctl trust 5B:A6:86:38:FA:CA
bluetoothctl connect 5B:A6:86:38:FA:CA

Direct connection works without explicit trust step - the OS handles this automatically.

PlatformDefault MTUNotes
Android23 bytesCan negotiate higher
iOS185 bytesAutomatic negotiation
Linux23 bytesUse bt_gatt_exchange_mtu

The S120 commands are all under 20 bytes, so default MTU is sufficient.