
H02 Protocol Explained: The Text Format Behind SinoTrack and CanTrack Trackers
How the H02 text protocol of SinoTrack and CanTrack trackers works - fields, active-low alarm bits, heartbeats - and how to test it without a device.
H02 is the protocol of the SinoTrack ST-901, most CanTrack models and many LK-GPS, MiCODUS and TKStar units. Unlike most tracker protocols, it's plain text you can read straight from a log - easy to start with, and easy to get subtly wrong.
One Line, Field by Field
A position message (V1) looks like this:
*HQ,1234567890,V1,083045,A,5213.7820,N,02100.7320,E,21.60,087,031126,FFFFFFFF#
*HQ- header (some firmware uses*TH)1234567890- device ID: 10 digits, or a 15-digit IMEI083045and031126- time and date, both UTCA- valid fix (Vmeans no fix)5213.7820,Nand02100.7320,E- coordinates in degrees and minutes21.60- speed in knots, not km/h087- courseFFFFFFFF- status word#- end of message
The Status Word
Eight hex characters, 32 bits, and the alarm bits are active low: a cleared bit means the alarm is on. FFFFFFFD is an SOS, FFFFFFFB is overspeed and FFF7FFFF is a power cut. Bit 10 carries ignition: FFFFFBFF means ignition off.
Read the bits the usual way and every quiet device looks like it's raising every alarm at once.
The Session
There isn't much of one. No login, no checksum, and the server doesn't have to reply - Traccar answers each position with a V4 line anyway. Heartbeats are optional: HTBT carries the battery level, LINK adds GSM signal and satellites.
After the status word, a device can append extra values: odometer, temperature, fuel, altitude, LAC and Cell ID. Other firmware appends its own numbers instead, which Traccar stores as io1, io2 and so on.

Decoder Bugs to Watch For
- Treating speed as km/h - it's knots (1 knot = 1.852 km/h)
- Reading the alarm bits as active high
- Hard-coding the
HQheader - Accepting only 15-digit IMEIs, when many devices send a 10-digit ID
Testing Without a Device
Telemify sends real H02 lines: positions along a route, alarms through the status word, ignition that follows the driving, optional HTBT or LINK heartbeats, the HQ or TH header, and either the extra values or your own custom numbers after the status word.

Server support varies more than for any other protocol: Traccar reads everything, while flespi reads only the basic position. See CanTrack trackers on flespi for the details, or test a SinoTrack ST-901 on Traccar.
