Skip to content

Command Reference

This page documents all known commands for the S120 laser distance meter.

All commands follow this structure:

F1 TT SS PP CC
│ │ │ │ └─ Checksum: sum(bytes[1:]) % 256
│ │ │ └──── Parameter byte
│ │ └─────── Sub-type byte
│ └────────── Type byte
└───────────── Frame header (always 0xF1)
CommandHex CodeDescription
CLICK_MEASURE_BUTTONF1 04 01 01 06Trigger single measurement
START_CONTINUE_MEASUREF1 01 01 02 04Start continuous measuring
STOP_CONTINUE_MEASUREF1 04 03 00 07Stop continuous measuring
RETURNF1 04 00 01 05Return/cancel operation
CommandHex CodeDescription
GET_DEVICE_MACF1 03 02 05Get device MAC address
GET_DEVICE_VERSIONF1 03 03 06Get firmware version
GET_DEVICE_BASE_INFOF1 02 02 01 05Get device information
CommandHex CodeDescription
OPEN_ANGLE_REPORTF1 02 03 01 06Enable inclinometer data
CLOSE_ANGLE_REPORTF1 02 03 00 05Disable inclinometer data
CommandHex CodeDescription
SYNC_HISTORY_DATAF1 03 01 14 18Request 20 history records

These commands require calculated parameters:

Changes the active measurement mode.

F1 05 02 MM CC
│ └─ Checksum
└──── Mode code (see table below)

Changes the measurement unit.

F1 05 02 UU CC
│ └─ Checksum
└──── Unit code

Changes the measurement reference point.

F1 05 02 DD CC
│ └─ Checksum
└──── Datum code (front/middle/rear)
CodeModeChineseDescription
01Single单次测量Single distance measurement
02Continuous连续测量Continuous measurement
03Area面积测量Area (Length × Width)
04Volume体积测量Volume (L × W × H)
05Wall Area墙面面积测量Wall surface area
06Camera Area摄像面积测量Camera-based area
07Angle+Height测角测高Angle and height
08Triangle Height求直角三角形高Right triangle height
09Triangle Hypotenuse求直角三角形斜边Right triangle hypotenuse
0ATriangle Base Sum求三角形底边和Triangle base sum
0BTriangle Aux Height三角形辅助线高度测量Triangle auxiliary height
0CTriangle Area三角形面积测量Triangle area
0DTrapezoid Area梯形面积测量Trapezoid area
0ECross-Section断面测量Cross-section
0FSlope坡面测量Slope measurement
10Height Tracking高度跟踪Height tracking
11Azimuth方位角测量Azimuth angle
12Stakeout放样测量Stakeout
13Level Bubble水平泡测量Level bubble
CodeUnitFormat
00Meters0.000 m
01Feet-Inches0’00” 0/32
02Inches0.000 in
03Feet (decimal)0.000 ft
04Yards0.000 yd
import asyncio
from bleak import BleakClient
SERVICE_UUID = "0000ae30-0000-1000-8000-00805f9b34fb"
CHAR_TX = "0000ae01-0000-1000-8000-00805f9b34fb"
CHAR_RX = "0000ae02-0000-1000-8000-00805f9b34fb"
def build_command(type_byte, sub_byte, param_byte):
"""Build a command packet with checksum."""
packet = bytes([0xF1, type_byte, sub_byte, param_byte])
checksum = sum(packet[1:]) % 256
return packet + bytes([checksum])
async def trigger_measurement(client):
"""Send CLICK_MEASURE_BUTTON command."""
cmd = build_command(0x04, 0x01, 0x01) # F1 04 01 01 06
await client.write_gatt_char(CHAR_TX, cmd)
async def get_device_version(client):
"""Send GET_DEVICE_VERSION command."""
cmd = bytes([0xF1, 0x03, 0x03, 0x06])
await client.write_gatt_char(CHAR_TX, cmd)

After sending a command, responses arrive via notifications on 0xAE02 or indications on 0xAE05.

Response PrefixTypeDescription
F1 01 01ACKContinuous measure started
F1 02 01DataSingle measurement data
F1 02 04DataContinuous measurement data
F1 03 00InfoMAC address response
F1 03 01InfoHistory data response
F1 03 02InfoDevice version (JSON)
F1 04 01ResultMeasurement result
F1 05 01ErrorDevice error

See Response Reference for detailed response parsing.