H02 protocol: altitude with i-Trac A1X

Bloedhond7 years ago

Good day,

I have a i-Track A1X device, which seems to be similar to the ST-902 from Sinotrack. It uses the H02 protocol on port 5013. Generally it seems to work ok so far, having not yet tested it extensively.

Reporting is good, but I cannot work out why the Altitude is being reported as 0 m

No language indicated, so no syntax highlighting. 
But let's throw in a tag.

hex data from device in tracker-server.log file:

2a48512c363032383031333436382c56312c3231353531362c412c323630342e333131302c532c30323831352e303737352c452c3030302e30382c3030302c3132303131382c46464637424246462c3635352c30312c30303136342c323232343223

which translates to:

*HQ,6028013468,V1,215516,A,2604.3110,S,02815.0775,E,000.08,000,120118,FFF7BBFF,655,01,00164,22242#

The H02 protocol is dealt with Link in the source code (line 324 on deals with the altitude) but unfortunately source code is above my ability - I can program on a HP calculator and that is about where it ends.

If anybody can shed light on this matter I would appreciate it.

Kind regards

Bloedhond7 years ago

Oops, my bad!

I just see now the protocol documentation is available on this great site as well as on the github page - I should have studied that before posting. I will revert back if I find the answer, so in the interm please do not spend time and effort to assist on this matter!

Kind regards

Anton Tananaev7 years ago

I believe H02 protocol doesn't support altitude, so it's always zero.

Bloedhond7 years ago

Yes, you are right. It is not mentioned once in the protocol documentation.

H02ProtocolDecoder.java reserves a variable for altitude in line 195 and seems to try and parse altitude in line 324, which confused me. I presume that is to maintain compatibility acrossdifferent protocols. As I do not know Java I guess I should not presume anything at all ;)

Anton Tananaev7 years ago

OK, looks like it's supported for some versions of the protocol, but your device doesn't report it.