BLE Service Reference
This page documents the Bluetooth Low Energy GATT services and characteristics exposed by the Huepar S120.
Device Advertisement
Section titled “Device Advertisement”| Field | Value |
|---|---|
| Device Name | LDM-S120 xxxx (xxxx = last 4 hex of MAC) |
| Address Type | Random (BLE random address) |
| Advertised Services | None during scanning |
| Manufacturer Data | None |
GATT Services
Section titled “GATT Services”Generic Access (0x1800) Standard
Section titled “Generic Access (0x1800) Standard”| Characteristic | UUID | Properties | Value |
|---|---|---|---|
| Device Name | 0x2A00 | read, write | LDM-S120 faca |
| Appearance | 0x2A01 | read | 0x0000 (Unknown) |
Generic Attribute (0x1801) Standard
Section titled “Generic Attribute (0x1801) Standard”| Characteristic | UUID | Properties | Purpose |
|---|---|---|---|
| Service Changed | 0x2A05 | indicate | GATT service change notifications |
Custom Laser Meter Service (0xAE30)
Section titled “Custom Laser Meter Service (0xAE30)”This is the primary service for device communication.
Full UUID: 0000ae30-0000-1000-8000-00805f9b34fb
| Characteristic | UUID | Handle | Properties | Purpose |
|---|---|---|---|---|
| Command TX | 0xAE01 | 0x000A | write-without-response | Send commands to device |
| Data RX | 0xAE02 | - | notify | Receive measurement data |
| Status RX | 0xAE05 | - | indicate | Receive status/errors |
Characteristic Details
Section titled “Characteristic Details”0xAE01 - Command TX
Section titled “0xAE01 - Command TX”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└─────────── Header0xAE02 - Data RX (Notify)
Section titled “0xAE02 - Data RX (Notify)”Direction: Device → App
Used for measurement data and device information responses. Enable notifications to receive data.
Response format varies by command:
| Response Type | Prefix | Description |
|---|---|---|
| Measurement | F1 01 | Distance/area/volume results |
| MAC Address | F1 03 00 | Device MAC as ASCII |
| Version | F1 03 02 | JSON firmware info |
| History | F1 03 01 | Stored measurements |
Enabling notifications:
# Python (bleak)await client.start_notify( "0000ae02-0000-1000-8000-00805f9b34fb", notification_handler)0xAE05 - Status RX (Indicate)
Section titled “0xAE05 - Status RX (Indicate)”Direction: Device → App
Used for status updates and error reporting. Uses indicate (with ACK) for reliability.
Common responses:
| Status | Meaning |
|---|---|
Err 1 | Target too far |
Err 2 | Target too close |
Err 3 | Excessive ambient light |
Err 4 | Out of range |
Service UUIDs by Manufacturer
Section titled “Service UUIDs by Manufacturer”Different manufacturers use different service UUIDs:
| Manufacturer | Service UUID | Notes |
|---|---|---|
| Longshuo (Huepar S120) | 0xAE30 | This device |
| SNDway | 0xFFF0 | Different protocol variant |
| Xintong | 0x1000 | Unknown protocol |
| Levelsure | 0xFFF0 | Laser levels |
| Levelsure 603BT | 0xFFA0 | Different model |
| Levelsure DP | 0xFFE0 | DP series |
Connection Requirements
Section titled “Connection Requirements”Linux (BlueZ)
Section titled “Linux (BlueZ)”# Must trust before connectingbluetoothctl trust 5B:A6:86:38:FA:CAbluetoothctl connect 5B:A6:86:38:FA:CAAndroid/iOS
Section titled “Android/iOS”Direct connection works without explicit trust step - the OS handles this automatically.
MTU Considerations
Section titled “MTU Considerations”| Platform | Default MTU | Notes |
|---|---|---|
| Android | 23 bytes | Can negotiate higher |
| iOS | 185 bytes | Automatic negotiation |
| Linux | 23 bytes | Use bt_gatt_exchange_mtu |
The S120 commands are all under 20 bytes, so default MTU is sufficient.
Related Pages
Section titled “Related Pages”- Command Reference - All available commands
- Response Reference - Response packet formats
- Connecting Guide - How to connect to the device