Tkstar protocol

Protocol used by GPS tracking devices manufactured by TKSTAR headquartered in China.
flespi parses the Tkstar protocol messages into a JSON object with the fields listed below in the Parameters tab.

To connect your tracker using the TK-Star protocol, you need to have a tkstar channel created in your flespi account.

You can register free flespi.io account in few clicks and follow this guide to connect TK-Star device to your flespi account.

You have to point the tracker to the channel's IP:port via SMS or configuration utility provided by your vendor. You can directly use the domain name provided by the channel instead of IP or resolve it into the IP address using any resolving service in the Internet.

After correctly configuring the device to the address of your channel you may check the 'Logs & Messages' tab on the device or channel screen to validate if the messages are coming or connection to your channel has been established. Ensure that device can lock satellites to catch current time and position for the very first message.

battery.level
number
percentage
Internal battery level
Extending command 0x00A8 of Additional info ID 0xEB
battery.low.alarm
boolean
Battery low alarm event
Alarm sign bitmask
battery.voltage
number
volts
Internal battery voltage
Extending command 0x002D of Additional info ID 0xEB
channel.id
number
ID of channel that received a message
device.id
number
ID of device that received a message
device.name
string
Name of device that received a message
device.type.id
number
ID of device type of device that received a message
engine.ignition.status
boolean
Engine ignition or ACC status
Status bitmask
event.seqnum
number
Unique event sequence number
Message Sequence Number
external.powersource.voltage
number
volts
External power voltage
gsm.cellid
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) base station ID
Extending command 0x00D8 of Additional info ID 0xEB
gsm.lac
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) location area code
Extending command 0x00D8 of Additional info ID 0xEB
gsm.mcc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) country code
Extending command 0x00D8 of Additional info ID 0xEB
gsm.mnc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) code
Extending command 0x00D8 of Additional info ID 0xEB
gsm.signal.dbm
number
dbm
Strength of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal
gsm.signal.level
number
percentage
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal strength level
gsm.signal.quality
number
The quality (bit error rate) of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal
Additional info ID 0x30
gsm.sim.iccid
string
Integrated Circuit Card Id of SIM card of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...)
Extending command 0x00B2 of Additional info ID 0xEB
gsm.timing.advance
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) timing advance
ident
string
Device unique identifier like serial number, IMEI, etc
illegal.movement.alarm
boolean
Illegal movement alarm event
Extending command 0x0089 of Additional info ID 0xEB
location.source.gps
boolean
Location is obtained via GPS
Extending command 0x00C5 of Additional info ID 0xEB
location.source.wifi
boolean
Location is obtained by Wi-Fi
Extending command 0x00C5 of Additional info ID 0xEB
message.type
string
Message type
overspeeding.event
boolean
Overspeeding detected
Alarm sign bitmask
peer
string
IP:port from which device connecting to the channel
position.altitude
number
meters
Altitude value for position
Message ID 0x0200
position.direction
number
degrees
Heading angle at position detection moment
Message ID 0x0200
position.latitude
number
degrees
Latitude coordinate value
Message ID 0x0200
position.longitude
number
degrees
Longitude coordinate value
Message ID 0x0200
position.outdated
boolean
Position information is outdated
position.satellites
number
Quantity of satellites used to calculate coordinates for given position information
Additional info ID 0x31
position.speed
number
km/h
Instant speed at position detection moment
Message ID 0x0200
position.valid
boolean
Is position information accurate and valid for given timestamp
Status bitmask
protocol.id
number
ID of protocol
report.code
string
Report code
server.timestamp
number
seconds
Timestamp when server received a message
steps.count
number
The total number of steps for the day
timestamp
number
seconds
Message timestamp
Message ID 0x0200
vehicle.mileage
number
km
Total calculated mileage
Additional info ID 0x01
vehicle.plate.number
string
Vehicle plate number
Message ID 0x0100
vehicle.state
string
Vehicle state, such as moving, idling, parked etc
vehicle.state.bitmask
number
Vehicle state flags bitmask
vehicle.vin
string
VIN of vehicle
Message ID 0x0100
vendor.code
string
Vendor identification string code
vibration.alarm
boolean
Vibration alarm event
Extending command 0x00C5 of Additional info ID 0xEB
Properties
Custom command
custom
Send custom command to device without waiting for response
payload: Payload string
Cut oil command (Applied model: TK920)
{"payload":"*HQ,,S20,000000,1,1#"}
Oil/Power cut command (Applied models: TK806)
{"payload":"[SG**0008*STOP,1]"}