To check decoding I would need corresponding HEX samples and protocol documentation. As for "hs", it's probably also from some documentation.
Hi,
Please find the details below :
{"charge":true,"ignition":false,"in2":1,"panic":0,"out2":0,"hs3":1,"fuel":22,"distance":144.9,"totalDistance":1137941.3,"motion":true}
DEBUG: [0ADA53F8: 5002 < 106.78.210.238] HEX: 283031393335383730343236304252303031383037323541323330302e303935374e30373233352e32373438453033322e3431323039323138372e35383030313130303136364c3030304439373739292018-07-25 12:09:59 WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:69 < *:34 < *:96 < ...)
2018-07-25 12:09:59 INFO: [0ADA53F8] id: 019358704260, time: 2018-07-25 12:09:21, lat: 23.00160, lon: 72.58791, speed: 17.5, course: 87.6
2018-07-25 12:09:59 WARN: Empty address
{"charge":true,"ignition":true,"in2":1,"panic":0,"out2":0,"fuel":350,"odometer":890952,"distance":89.49,"totalDistance":1137885.89,"motion":true}
DEBUG: [0ADA53F8: 5002 < 106.78.210.238] HEX: 283031393335383730343236304252303031383037323541323330302e303839334e30373233352e33303831453033342e343132313131323237322e383630313130303135454c303030443938343829
2018-07-25 12:11:17 WARN: Geocoding failed - Empty address - GeocoderException (JsonGeocoder:69 < *:34 < *:96 < ...)
2018-07-25 12:11:17 INFO: [0ADA53F8] id: 019358704260, time: 2018-07-25 12:11:12, lat: 23.00149, lon: 72.58847, speed: 18.6, course: 272.9
2018-07-25 12:11:17 WARN: Empty address
2018-07-25 12:11:18
Download Protocol documentation from following link :
https://we.tl/3GdiwH3kUz
First message doesn't match provided documentation.
Hello,
The actual concern is not with "hs3" parameter but ignition and motion.
You can go through provided HEX code for your reference as you can see there is ignition FALSE even when motion is TRUE. I don't know how this is happening.
Please help me out for this situation.
I can help you only if correct protocol documentation is provided, or official explanation from device vendor on why it doesn't match.
Hello,
I tried to decoded hexcode in Traccar hex decoder as per below and find both hex return ignition (ACC) as true. However in positions table I got the wrong value.
283031393335383730343236304252303031383037323541323330302e303935374e30373233352e32373438453033322e3431323039323138372e35383030313130303136364c303030443937373929
019358704260BR00180725A2300.0957N07235.2748E032.412092187.58001100166L000D9779
As per the protocol document 8th digit from "L" considered as Ignition (i.e. 01100166
)
283031393335383730343236304252303031383037323541323330302e303839334e30373233352e33303831453033342e343132313131323237322e383630313130303135454c303030443938343829
019358704260BR00180725A2300.0893N07235.3081E034.4121112272.860110015EL000D9848
(i.e. 0110015E
)
In first example why are you using 01100166
and not 00110016
?
Hi,
According to document if we count 8 characters from L than we are getting 01100166 string.
OK, please break down whole message into separate fields according to the documentation.
Hello,
The following is decoded hex code and it's break down:
019358704260BR00180725A2300.0957N07235.2748E032.412092187.58001100166L000D9779
019358704260
- DeviceIDBR00
180725
- TimeA
- The availability of GPS data2300.0957
- LatitudeN
- Latitude indicator07235.2748
- LongitudeE
- Longitude indicator032.4
- Longitude indicator120921
- Time87.580
- Orientation01100166
- IO StateL
- Milepost000D9779
- Mile data
The problem was with orientation field. I have fixed it:
https://github.com/traccar/traccar/commit/42cc50d51a5eda8f8de787a3230b8591b62d62b8
Hello Tananaev,
Thank you for your assistance.
I have gone through fixed file in same protocol. May I know where I need to put "src/org/traccar/protocol/Tk103ProtocolDecoder.java" file in my traccar server (linux) ?
Please guide me through on the same. I am using Traccar 3.17 Version as of now.
You need to compile the server. You can't simply replace a file.
Can you please guide how to compile it with intellij idea for linux server and which file need to replace after compile ?
i am using tk103 protocol. i am getting igntion false even when motion is true and speed is more than 1.
This is only happens when Odometer is not receiving from protocol (hs3 attribute is there instead of odometer)
i.e.
{"charge":true,"ignition":false,"in2":1,"panic":0,"out2":0,"hs3":1,"fuel":22,"distance":144.9,"totalDistance":1137941.3,"motion":true}
Below case it's working fine.
i.e.
{"charge":true,"ignition":true,"in2":1,"panic":0,"out2":0,"fuel":350,"odometer":890952,"distance":89.49,"totalDistance":1137885.89,"motion":true}
And also I want to know what is the attribute "hs3" ?
Please help me to sort out the issue.