Atrack protocol

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

Important note #1 on Position Report Format

Since Atrack protocol has configurable format of position reports, server needs to know report format configured for the device in order to be able to parse device's messages correctly.

The message format is read from the device by AT$FORM=? command and stored in the Position Report Format setting of the flespi device [Commands & Settings -> Configuration tab]:

geometris wherecube packet format setting flespi

Parsing of the position reports received from the device is done in accordance with the format that is currently stored in the setting.

It's highly recommended to use Position Report Format setting of flespi device to change the configuration of position reports for the tracker, e.g. add or remove items to Custom info data field. 

⚠️ If you changed the report format on the tracker in any way other than via the flespi device setting (e.g. by the means of SMS command or in USB configurator), you must update Position Report Format setting in flespi device, otherwise parsing will fail.

To do this hit Request setting from device button on the setting card, and server will re-read currently configured position report format from the tracker.


Note #2 on G-Sensor data

For those Atrack devices that are equipped with accelerometers, flespi supports fetching of the last impact G-Sensor data.

The G-Sensor data consists of accelerations on the axes x, y, and z expressed in G. The G-Sensor data covers the period 500 ms prior to the impact and 500 ms following the impact. Device will send in total 8 data packets with 400 records of impact data.

To fetch the G-sensor data, you need to send to the device a G-Sensor data setting on Actions tab:

geometris wherecube packet format setting flespi

Under the hood server will send AT$GDAT command to the device to initiate sending of G-Sensor data. As soon as the command is acknowledged by the device by sending $OK as response, server expects 8 packets of impact data to be sent by the device next. 

The G-sensor data from the impact data packets is parsed into the following flespi message parameters:

  • acceleration.array - JSON array of objects with accelerometer data on the axes X, Y, Z expressed in G 
  • accelerometer.data.seqnum - sequential number of the G-sensor data packet (from 0 - 7) 

⚠️ The impact data packets have a special format that require special parsing. Therefore server is capable to parse them only when it "waits" for G-sensor data after the G-Sensor data setting was sent and acknowledged by the device. 

As soon as all 8 packets with G-sensor data are received, then server no longer waits for the G-sensor data packets and switches back to waiting and processing position reports.

Only sending of G-Sensor data setting enables waiting for the impact data packets by the server. Sending a custom command with text AT$GDAT won't work this way.

acceleration.array
array
g
Array of objects with acceleration data by x, y, and z axis
accelerometer.data.seqnum
number
Sequence number of acceleration data package
ain
number
volts
Voltage on the analog input
Data field %AI,
Data field %AV
ain.voltage.high.status
boolean
Analog input's voltage is above the threshold
Data field %AG
autogeofence.status
boolean
Auto Geo-Fence Area status
Data field %PK
backup.battery.voltage
number
volts
Backup battery voltage
Data field %BV
battery.low.status
boolean
Battery low status
Data field %BL
ble.beacons
array
Array with all detected BLE beacons data objects. Each object contain list of associated parameters sent by appropriate beacon. Standard parameter names used: *id* - beacon identification string. Usually it is beacon's UUID or MAC-address *local_name* - Beacons's Local Name *rssi* - BLE signal level. Units = dBm *battery.voltage* - Beacon's battery voltage. Units = volts *battery.level* - Beacon's battery level. Units = percentage *temperature* - Beacon's temperature. Units = celsius
bluetooth.connected.status
boolean
Bluetooth connection status
Data field %BT
can.ambient.air.temperature
number
celsius
CAN ambient air temperature
Data field %JH
can.axle.weight
number
kg
Weight on the axle read from CAN
Data field %JH
can.cruise.control.mileage
number
km
CAN-bus Cruise Control Distance
Data field %JN
can.cruise.status
boolean
CAN cruise control is active
Data field %JO
can.driver.card.status
boolean
CAN-bus driver card presence
Data field %JO
can.driver.time.related.status
number
CAN-bus driver time related states Indicating whether the driver approaches or exceeds working time limits. 0=normal;1=15min before4.5h;2=4.5h reached;3=15min before 9h ;4=9h reached;5=15min before16h;6=16h reached;14=Error;15=not available
Data field %JO
can.driver.work.state.enum
number
CAN-bus driver working state: 0=Rest;1=Driver available;2=Work;3=Drive;6=Error;7=Not available
Data field %JO
can.dtc.cleared.mileage
number
km
Vehicle mileage since diagnostic trouble codes were cleared, read from CAN
Data field %DC
can.dtc.pending.status
boolean
Pending DTC status read from CAN
Data field %PD
can.engine.coolant.temperature
number
celsius
Engine coolant temperature read from CAN
Data field %JO
can.engine.load.level
number
percentage
Calculated engine load level read from CAN
Data field %JO
can.engine.motorhours
number
hours
Total engine motorhours (engine work time) read from CAN
Data field %EH
can.engine.temperature
number
celsius
Engine temperature read from CAN
Data field %ET
can.fms.diagnostic.state
number
Status signal indicates whether the FMS Vehicle Interface supports the handling of diagnostic messages from the vehicle network onto the FMS network
Data field %JO
can.fms.request.state
number
The status signal indicates whether the FMS Vehicle Interface will respond to requests from the FMS device for the PGNs listed in the FMS Interface Specification.
Data field %JO
can.fuel.consumed
number
liters
Fuel volume totally consumed by vehicle read from CAN
Data field %FC
can.fuel.consumption
number
liters/h
Engine fuel rate read from CAN
Data field %JH
can.fuel.economy
number
km/liters
CAN instantaneous fuel economy
Data field %JH
can.fuel.idle.consumed
number
liters
Fuel volume totally consumed during idling state of the vehicle read from CAN
Data field %JN
can.fuel.level
number
percentage
Fuel level in tank read from CAN
Data field %JO
can.handling.info.status
boolean
CAN-bus handling information
Data field %JO
can.intake.air.temperature
number
celsius
Intake air temperature
Data field %IA
can.intake.map
number
kPa
Intake manifold absolute pressure
Data field %MP
can.j1708.abs.state
number
CAN J1708 ABS control state bitmask
Data field %ZO
can.j1708.accelerator.pedal.level
number
percentage
CAN J1708 accelerator pedal position
Data field %ZO
can.j1708.boost.pressure
number
kPa
CAN J1708 boost pressure
Data field %ZO
can.j1708.brake.pressure
number
kPa
CAN J1708 brake application pressure
Data field %ZO
can.j1708.brake.primary.pressure
number
kPa
CAN J1708 brake primary pressure
Data field %ZO
can.j1708.brake.secondary.pressure
number
kPa
CAN J1708 brake secondary pressure
Data field %ZO
can.j1708.brake.stroke.state
number
CAN J1708 brake stroke state bitmask
Data field %ZO
can.j1708.cargo.weight
number
N
CAN J1708 cargo weight
Data field %ZH
can.j1708.cruise.control.state
number
CAN J1708 cruise control state bitmask
Data field %ZO
can.j1708.engine.coolant.temperature
number
celsius
CAN J1708 engine coolant temperature
Data field %ZO
can.j1708.engine.load
number
percentage
CAN J1708 engine load
Data field %ZO
can.j1708.engine.motorhours
number
hours
CAN J1708 calculated engine motorhours
Data field %ZL
can.j1708.engine.oil.pressure
number
kPa
CAN J1708 engine oil pressure
Data field %ZO
can.j1708.engine.rpm
number
rpm
CAN J1708 engine RPM
Data field %ZH
can.j1708.fuel.level
number
percentage
CAN J1708 fuel level
Data field %ZO
can.j1708.fuel.rate
number
10e-6L/s
CAN J1708 instantaneous fuel rate
Data field %ZH
can.j1708.fuel.used
number
liters
CAN J1708 total fuel used
Data field %ZL
can.j1708.fuel.used.idle
number
liters
CAN J1708 total idle fuel used
Data field %ZL
can.j1708.idle.motorhours
number
hours
CAN J1708 total idle hours
Data field %ZL
can.j1708.intake.manifold.temperature
number
celsius
CAN J1708 intake manifold temperature
Data field %ZO
can.j1708.mil.state
number
CAN J1708 malfunction attention/warning indicator lamps state bitmask
Data field %ZO
can.j1708.parking.brake.state
number
CAN J1708 parking brake switch state bitmask
Data field %ZO
can.j1708.throttle.pedal.level
number
percentage
CAN J1708 throttle pedal position
Data field %ZO
can.j1708.vehicle.mileage
number
km
CAN J1708 vehicle mileage
Data field %ZL
can.j1708.vehicle.motorhours
number
hours
CAN J1708 total vehicle hours
Data field %ZL
can.j1708.vehicle.speed
number
km/h
CAN J1708 vehicle speed
Data field %ZO
can.j1708.vehicle.vin
string
CAN J1708 vehicle VIN
Data field %ZS
can.j1939.engine.fuel.total
number
liters
CAN-ubs J1939 FMS engine total fuel used
Data field %JL
can.j1939.engine.motorhours
number
hours
CAN J1939 calculated engine motorhours
Data field %JL
can.j1939.engine.rpm
number
rpm
CAN J1939 engine RPM
Data field %JH
can.j1939.fuel.consumed
number
liters
CAN J1939 fuel volume consumed by vehicle
Data field %JL
can.j1939.software.version
string
CAN-bus J1939 FMS SW-version
Data field %JS
can.j1939.vehicle.mileage
number
km
CAN J1939 vehicle mileage
Data field %JL
can.j1939.vehicle.speed
number
km/h
CAN J1939 vehicle speed
Data field %JH
can.j1939.vehicle.vin
string
CAN J1939 vehicle VIN
Data field %JS
can.maf.air.flow.rate
number
g/sec
MAF air flow rate read from CAN
Data field %MF
can.mil.status
boolean
Malfunction indicator lamp status read from CAN
Data field %ML
can.movement.status
boolean
CAN-bus current movement state
Data field %JO
can.overspeeding.status
boolean
CAN-bus ovespeeding status
Data field %JO
can.pedal.brake.status
boolean
CAN brake pedal pressed
Data field %JO
can.pedal.clutch.status
boolean
CAN clutch pedal pressed
Data field %JO
can.pending.dtc
string
Pending diagnostic trouble code read from CAN
Data field %PD
can.powersource.takeoff.engaged.status
boolean
CAN-bus at least one PTO engaged
Data field %JO
can.powersource.takeoff.enum
number
CAN power takeoff bitmask
Data field %JO
can.powesource.takeof.duration
number
hours
PTO total duration read from CAN
Data field %JN
can.powesource.takeof.fuel.consumed
number
liters
CAN-bus Fuel Used During PTO
Data field %JN
can.reverse.gear.status
boolean
CAN reverse gear is on
Data field %JO
can.service.mileage
number
km
Service distance read from CAN
Data field %JH
can.tacho.event
boolean
CAN-bus Tachograph system event
Data field %JO
can.tacho.performance
number
CAN-bus Tachograph performance: 0=normal;1=analysis
Data field %JO
can.tacho.position.speed
number
km/h
CAN-bus Tachograph vehicle speed
Data field %JH
can.throttle.pedal.level
number
percentage
Throttle pedal push level read from CAN
Data field %JO
can.total.engine.idle.time
number
hours
Time of engine running in idling status (vehicle stopped) since vehicle manufacture, read from CAN
Data field %JN
can.vehicle.mileage
number
km
Total vehicle mileage read from CAN
Data field %EO
can.vehicle.speed
number
km/h
Vehicle speed read from CAN
Data field %ES
channel.id
number
ID of channel that received a message
counter.impulses
number
Impulses counter
Data field %PC
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
din
number
Digital inputs bitmask
Data field %IN
dout
number
Digital outputs bitmask
Data field %OP
driver.id
string
Driver identification card id
Data field %DD,
Data field %JS
driver.message
string
Driver text message content
engine.ignition.status
boolean
Engine ignition or ACC status
Data field %EG
engine.motorhours
number
hours
Total calculated engine motorhours
Data field %EH
event.seqnum
number
Unique event sequence number
external.powersource.level
number
percentage
External battery level
Data field %BP
external.powersource.status
boolean
External power source connection status
Data field %PS
external.powersource.voltage
number
volts
External power voltage
Data field %MV
fuel.level
number
percentage
Fuel level percentage
Data field %FL
fuel.sensor.status
boolean
Fuel sensor event status
Data field %FU
geofence.status
boolean
Geofence entered status
Data field %GF
gnss.antenna.short.circuit.status
boolean
GNSS antenna short circuit status
Data field %SS
gnss.antenna.signal.timeout.status
boolean
GNSS antenna signal reception timeout status
Data field %SS
gnss.antenna.status
boolean
GNSS receiver antenna status
Data field %SS
gnss.fix.status
boolean
GNSS fix status
Data field %SF
gnss.status
boolean
GNSS receiver on/off status
Data field %SS
gprs.status
boolean
GPRS mobile network status
Data field %CG
gsm.cellid
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) base station ID
Data field %CE
gsm.home.network.event
boolean
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) home network registration event
Data field %CR
gsm.jamming.event
boolean
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal jamming detected
Data field %JD
gsm.lac
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) location area code
Data field %LC
gsm.mcc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) country code
Data field %CN
gsm.mnc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) code
Data field %CN
gsm.operator.code
string
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) operator code, which is MCC joined with MNC
Data field %CN
gsm.preferred.network.status
boolean
Preferred Mobile network (GSM, 3G, 4G, LTE, 5G, ...) status
Data field %PF
gsm.roaming.network.event
boolean
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) home roaming registration event
Data field %RO
gsm.signal.dbm
number
dbm
Strength of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal
Data field %RL
gsm.signal.level
number
percentage
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal strength level
Data field %GQ
gsm.sim.iccid
string
Integrated Circuit Card Id of SIM card of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...)
Data field %CD
gsm.sim.imsi
string
IMSI of SIM card of the Mobile network (GSM, 3G, 4G, LTE, 5G, ...)
Data field %CM
gsm.state.enum
number
Mobile network module state
Data field %GS
gsm.state.enum.description
string
Mobile network module state description
Data field %GS
harsh.acceleration.event
boolean
Harsh acceleration detected
Data field %HA
harsh.braking.event
boolean
Harsh braking detected
Data field %HB
harsh.cornering.event
boolean
Harsh cornering detected
Data field %HC
ibutton.code
string
Hexadecimal code of connected iButton
ident
string
Device unique identifier like serial number, IMEI, etc
idle.status
boolean
Vehicle is in idling state
Data field %DL
impact.event
boolean
Impact event
Data field %IP
main.power.low.status
boolean
Main power low status
Data field %PL
message.buffered.status
boolean
Black box message
Data field %DT
movement.status
boolean
Current movement state
Data field %MT
network.signal.rsrp
number
dbm
LTE reference signal received power (RSRP)
Data field %GR
obd.connected.status
boolean
OBDII device is connected to vehicle
Data field %OC
overspeeding.status
boolean
Overspeeding detected
Data field %SD
peer
string
IP:port from which device connecting to the channel
position.altitude
number
meters
Altitude value for position
Data field %AT
position.direction
number
degrees
Heading angle at position detection moment
Data field %HD
position.hdop
number
Horizontal dilution of precision
Data field %HP
position.latitude
number
degrees
Latitude coordinate value
Data field %LA
position.longitude
number
degrees
Longitude coordinate value
Data field %LG
position.satellites
number
Quantity of satellites used to calculate coordinates for given position information
Data field %GP,
Data field %SA
position.speed
number
km/h
Instant speed at position detection moment
Data field %VS
position.timestamp
number
seconds
Timestamp when coordinates where calculated
position.valid
boolean
Is position information accurate and valid for given timestamp
Data field %GP
protocol.id
number
ID of protocol
report.reason
number
Transmission reason code
Data field %RD
segment.max.acceleration
number
g
Maximum acceleration value that occurred on the segment
Data field %GV
segment.max.braking.acceleration
number
g
Maximum braking acceleration value that occurred on the segment
Data field %GV
segment.max.cornering.acceleration
number
g
Maximum cornering acceleration value that occurred on the segment
Data field %GV
segment.max.engine.load.level
number
percentage
Maximum engine load percentage on segment
Data field %EL
segment.max.engine.rpm
number
rpm
Maximum engine RPM on segment
Data field %RP
segment.max.position.speed
number
km/h
Maximum speed on segment
Data field %SM
segment.max.throttle.pedal.level
number
percentage
Maximum throttle pedal push level on segment
Data field %TR
segment.max.vertical.acceleration
number
g
Maximum vertical acceleration value that occurred on the segment
Data field %GV
send.timestamp
number
seconds
Message send timestamp
Data field %ST
sensor.humidity
number
percentage
Humidity sensor value, i.e. relative air humidity level
Data field %HT
sensor.temperature
number
celsius
Temperature sensor value
Data field %HT,
Data field %TP
server.connection.status
boolean
Server connection status
Data field %CS
server.timestamp
number
seconds
Timestamp when server received a message
sim.card.state
number
SIM card state. Protocol specific numeric value
Data field %SR
tilt.angle
number
degree
Tilt angle
Data field %TL
timestamp
number
seconds
Message timestamp
Data field %RT
timestamp.key
number
Message timestamp in seconds with message sequence number appended as the value fractional part. Used to distinguish between several messages that have the same timestamp.
total.acceleration
number
Total acceleration for x, y and z axis
Data field %JF
towing.event
boolean
Towing event detected
Data field %TW
trip.engine.motorhours
number
hours
Engine hours for current trip
Data field %WH
vehicle.mileage
number
km
Total calculated mileage
Data field %EO,
Data field %OD
vehicle.vin
string
VIN of vehicle
Data field %VN
wifi.mac.address
string
WiFi MAC address
Data field %MA
Properties
Custom command
custom
Send custom command via connection or over SMS
text: Text payload
Set output 2 to be ON for 3 seconds, OFF for 2 seconds, for 5 times
{"text":"AT$OUTC=2,1,30,20,4"}