Device last position id does not get updated

Victor Butler5 years ago

Hi Anton,

Need a bit of advice on the following issue with a Teltonika device:
The device sends the HEX with the GPS coordinates, however the positionid in tc_devices table does not get always updated. The correct latitude and longitude, however, are always being updated in the tc_positions tabe.
So what we finally get is the correct device route but with wrong last location. Example below.

This is the HEX, which gets the last location updated:

2020-05-30 16:41:00  INFO: [316d68e2: teltonika < 149.62.204.90] HEX: 005ecafe0117000f3836373036303033383735353631338e010000017265cec830000de1a96f196fb18d0000000000000000000009000600ef0000f00000500000150400c80300450300020042308500430f9700010010084693780000000001
2020-05-30 16:41:00  INFO: [316d68e2: teltonika > 149.62.204.90] HEX: 00050000011701
2020-05-30 16:41:01  INFO: [316d68e2] id: 867060038755613, time: 2020-05-30 16:39:10, lat: 42.67503, lon: 23.28928, course: 0.0`

and this is the following HEX, containing GPS coordinates but the last location is not being updated:

2020-05-30 16:47:58  INFO: [316d68e2: teltonika < 149.62.204.90] HEX: 00e4cafe0118000f3836373036303033383735353631338e020000017265d6b770000de1a96f196fb18d0000000000000000420010000600ef0000f00000500000150500c800004502000700b5000000b6000000422ea80018000000430f97000d00ff000f03e8000300c700000000001008469378000c000e057b000000000000017265d6da98000de1a96f196fb18d0000000000000000420010000600ef0000f00000500100150400c800004502000700b5000000b6000000423ab50018000000430f97000d00ff000f03e8000300c700000000001008469378000c000e057c0000000002
2020-05-30 16:47:58  INFO: [316d68e2: teltonika > 149.62.204.90] HEX: 00050000011802

I assume this has something to do with the HEX parsing: The the first HEX contains an additional log entry which is missing from the next one. Not sure why this additional lo entry is missing though.
What do you think the reason is?

Thank you!