traccar / traccar

Traccar GPS Tracking System
https://www.traccar.org
Apache License 2.0
5.32k stars 2.6k forks source link

Teltonika AT2000 protocol support #2662

Closed bpali closed 7 years ago

bpali commented 7 years ago

Hello Anton

The AT2000 (Asset Tracker) device protocol from Teltonika is not yet supported by Traccar

I've tested one device (set it up to transmit to port 5027) and here's a log sample

2016-12-08 08:20:59  INFO: [60D72CAE] connected
2016-12-08 08:21:00 DEBUG: [60D72CAE: 5027 < 94.44.21.135] HEX: 01012f0000000000000000000000000000333537343534303731363237353938e5c33b1f62981737db27f40eac78e3131303a02563ceddfa6f40e900cf5ec51a
2016-12-08 08:21:16  INFO: [60D72CAE] disconnected
2016-12-08 08:21:17  INFO: [0B957EAB] connected
2016-12-08 08:21:19 DEBUG: [0B957EAB: 5027 < 94.44.21.135] HEX: 01012f00000000000000000000000000003335373435343037313632373539384dab181fa0e0ff055fc7420d1af362157f4403d9aeb55ae127869e1c9700ef09
2016-12-08 08:21:36  INFO: [0B957EAB] disconnected

I have the protocol official specifications attached and if you could be so kind to implement them in the near future would be really great.

Teltonika AT2000 Protocols v1.1 dated 2016.06.15.pdf

Thanks in advance and keep in touch.

tananaev commented 7 years ago

It is supported (see https://github.com/tananaev/traccar/commit/04f33e6ba29b3a73a65b081d2a8b6ac3e0e0ebee).

bpali commented 7 years ago

I made a build from source with maven, updated tracker-server.jar and lib/*, updated config file and device settings and still doesn't work

2016-12-08 14:39:13  INFO: [9099F57E] connected
2016-12-08 14:39:15 DEBUG: [9099F57E: 5128 < 94.44.23.122] HEX: 01012f0000000000000000000000000000333537343534303731363237353938d74dcd195c521a246fb00f16346c7f001919957babc40f84152b60ddeb7ab47a
2016-12-08 14:39:30  INFO: [9099F57E] disconnected
2016-12-08 14:39:31  INFO: [5EBE4AD4] connected
2016-12-08 14:39:32 DEBUG: [5EBE4AD4: 5128 < 94.44.23.122] HEX: 01012f0000000000000000000000000000333537343534303731363237353938e7d3fc250caba4065f685f2584fd7936e3a4c6ebffed68e9cc105fa963c4c273
2016-12-08 14:39:48  INFO: [5EBE4AD4] disconnected
2016-12-08 14:39:49  INFO: [34265334] connected
2016-12-08 14:39:51 DEBUG: [34265334: 5128 < 94.44.23.122] HEX: 01012f0000000000000000000000000000333537343534303731363237353938136b871da8885c26fb6a1e2350fdae07dc1c9b3ab577de4399bbf72b15fd589d
2016-12-08 14:40:08  INFO: [34265334] disconnected
2016-12-08 14:43:37  INFO: [D890BF22] connected
2016-12-08 14:43:38 DEBUG: [D890BF22: 5128 < 94.44.171.96] HEX: 01012f0000000000000000000000000000333537343534303731363237353938cfb79a2c57119237df9b3c1b6777002720d715ce842efa65ecdb089f28887635
2016-12-08 14:43:54  INFO: [D890BF22] disconnected
2016-12-08 14:43:55  INFO: [AD0FFF0E] connected
2016-12-08 14:43:56 DEBUG: [AD0FFF0E: 5128 < 94.44.171.96] HEX: 01012f00000000000000000000000000003335373435343037313632373539389a0d1710b465c12d9e69f413285a5d3eeb56cb76b53170be6c7844c4f5b06ce2
2016-12-08 14:44:12  INFO: [AD0FFF0E] disconnected
2016-12-08 14:44:13  INFO: [9C7DD65F] connected
2016-12-08 14:44:14 DEBUG: [9C7DD65F: 5128 < 94.44.171.96] HEX: 01012f0000000000000000000000000000333537343534303731363237353938e2c2bd183c81e91b06fde82730aa341f2345a0c8157f626adce20bebb718cc8a
2016-12-08 14:44:30  INFO: [9C7DD65F] disconnected

any ideas?

tananaev commented 7 years ago

I have fixed the issue. Please try again.

bpali commented 7 years ago

Thanks for the fix.

Made a test and there is a last update time now (until the fix there was no last update time) but still position and attributes are not decoded

here's a log sample

2016-12-09 01:09:43  INFO: [43942CFE] connected
2016-12-09 01:09:45 DEBUG: [43942CFE: 5128 < 94.44.162.42] HEX: 01012f00000000000000000000000000003335373435343037313632373539380f799215de25862c39993b2c18ce5f11a26c1673ea9c6a2701fa557153e35fa1
2016-12-09 01:09:45 DEBUG: [43942CFE: 5128 > 94.44.162.42] HEX: 00000001000000000000000000000000
2016-12-09 01:09:47  INFO: [43942CFE] disconnected
2016-12-09 01:09:47  INFO: [155B5038] connected
2016-12-09 01:09:49 DEBUG: [155B5038: 5128 < 94.44.162.42] HEX: 01012f0000000000000000000000000000333537343534303731363237353938a5530325ccb68c36514eaf2f52821d2679665c94c81bab9e756cb3a7e036abf8
2016-12-09 01:09:49 DEBUG: [155B5038: 5128 > 94.44.162.42] HEX: 00000001000000000000000000000000
2016-12-09 01:09:51  INFO: [155B5038] disconnected
2016-12-09 01:09:51  INFO: [EA4E0761] connected
2016-12-09 01:09:53 DEBUG: [EA4E0761: 5128 < 94.44.162.42] HEX: 01012f0000000000000000000000000000333537343534303731363237353938c125f606b4b2d203cb12723ac2903e0c614d35fbf6db2a4be2f32ce61ccb017c
2016-12-09 01:09:53 DEBUG: [EA4E0761: 5128 > 94.44.162.42] HEX: 00000001000000000000000000000000
2016-12-09 01:09:55  INFO: [EA4E0761] disconnected

Seems like communication is not completed

Teltonika AT2000 Protocols v1.1 dated 2016.06.15.pdf

Take a look at the documentation link above

tananaev commented 7 years ago

Please try now.

bpali commented 7 years ago

Same behaviour, position not decoded.

2016-12-09 10:19:38  INFO: [72C54FCF] connected
2016-12-09 10:19:40 DEBUG: [72C54FCF: 5128 < 94.44.38.31] HEX: 01012f0000000000000000000000000000333537343534303731363237353938b94f4a2098daf91625c24e268885ad36e0ab296ebd169f2b6b78db8240da98d1
2016-12-09 10:19:40 DEBUG: [72C54FCF: 5128 > 94.44.38.31] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2016-12-09 10:19:57  INFO: [72C54FCF] disconnected
2016-12-09 10:19:58  INFO: [6AE689B7] connected
2016-12-09 10:19:59 DEBUG: [6AE689B7: 5128 < 94.44.38.31] HEX: 01012f0000000000000000000000000000333537343534303731363237353938bf13a810e0e9160747ebba309091853bfbd7fe1429bc0a63e8f2edf364ac9da2
2016-12-09 10:19:59 DEBUG: [6AE689B7: 5128 > 94.44.38.31] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2016-12-09 10:20:16  INFO: [6AE689B7] disconnected
2016-12-09 10:20:17  INFO: [D7C3B5A0] connected
2016-12-09 10:20:18 DEBUG: [D7C3B5A0: 5128 < 94.44.38.31] HEX: 01012f0000000000000000000000000000333537343534303731363237353938fd69713214ebdc06370d9e00382321163759e4e3e625894d4801f280476af99c
2016-12-09 10:20:18 DEBUG: [D7C3B5A0: 5128 > 94.44.38.31] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2016-12-09 10:20:35  INFO: [D7C3B5A0] disconnected
tananaev commented 7 years ago

I don't see any more problems. Response message matches ACK packet from the documentation.

bpali commented 7 years ago

I was preparing to reopen the issue but I've seen you recent work on the subject

Will test it on my server right away and give you feedback.

Thank you very much for your work.

P.S. you could have mentioned in you commit messages above that it addresses issue #2662

bpali commented 7 years ago

Yesterday I received a demo server from Teltonika with source code included and I attached it here for documentation if needed Teltonika AT2000 Demo server.zip

tananaev commented 7 years ago

Let me know if there are any more issues with AT2000.

bpali commented 7 years ago

Will do but I'm still trying to make the server work from source code

I have a clean 3.9 server working

but no data for any vehicles on my server get in since (the logs are not appended by anything beside what's above)

bpali commented 7 years ago

Any ideas why? Is it enough to just overwrite /opt/traccar/tracker-server.jar with what I get in target folder after I mvn package?

tananaev commented 7 years ago

If there is nothing else in the logs, it means that server doesn't receive any data from your device.

bpali commented 7 years ago

Update on the AT2000 protocol while tested on newly released traccar 3.10

As it can be seen from the log below the position is decoded but it trows some errors

2017-02-13 11:24:14  INFO: [A06EC973] connected
2017-02-13 11:24:21 DEBUG: [A06EC973: 5128 < 94.44.144.63] HEX: 01012f0000000000000000000000000000333537343534303731363237353938dfad701419d94f3e97132613c0cd9112dab05ec4761c557ff2f79979614ca50c
2017-02-13 11:24:21 DEBUG: [A06EC973: 5128 > 94.44.144.63] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:24:21 DEBUG: [A06EC973: 5128 > 94.44.144.63] HEX: 88000000000000000000000000000000
2017-02-13 11:24:23 DEBUG: [A06EC973: 5128 < 94.44.144.63] HEX: 893f000000000000000000000000000083aec3d666b9e3de98dd62014640a17eb02f70e1ace45083cde4dcedf9a784de25cfd920413c59d177ed2ce26b0b85453516e86347e53b900375f1df1c44b62e
2017-02-13 11:24:23 DEBUG: [A06EC973: 5128 > 94.44.144.63] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:24:24  WARN: Incorrect string value: '\xC5\x91nyi ...' for column 'address' at row 1 - SQLException (... < QueryBuilder:473 < DataManager:296 < DefaultDataHandler:27 < ...)
2017-02-13 11:24:24  INFO: [A06EC973] id: 357454071627598, time: 2017-02-13 11:23:29, lat: 47.52805, lon: 19.09629, speed: 1.2, course: 108.4
2017-02-13 11:34:34  INFO: [F929BC4B] connected
2017-02-13 11:34:35 DEBUG: [F929BC4B: 5128 < 94.44.50.37] HEX: 01012f00000000000000000000000000003335373435343037313632373539382874da3bcf49a201bbac963087e1e20c44601e3d94af0e25a361422391716e29
2017-02-13 11:34:35 DEBUG: [F929BC4B: 5128 > 94.44.50.37] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:34:35 DEBUG: [F929BC4B: 5128 > 94.44.50.37] HEX: 88000000000000000000000000000000
2017-02-13 11:34:38 DEBUG: [F929BC4B: 5128 < 94.44.50.37] HEX: 893f000000000000000000000000000050fd65d4eba097f9322bc2990988742cb0f7831115e3c287b6fb5d1767bc80cfda903908d143d640dc641b2e5b79682924017f0d4c29ed65ed572066c07a78a5
2017-02-13 11:34:38 DEBUG: [F929BC4B: 5128 > 94.44.50.37] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:34:38  WARN: Incorrect string value: '\xC5\x91nyi ...' for column 'address' at row 1 - SQLException (... < QueryBuilder:473 < DataManager:296 < DefaultDataHandler:27 < ...)
2017-02-13 11:34:38  INFO: [F929BC4B] id: 357454071627598, time: 2017-02-13 11:33:35, lat: 47.52803, lon: 19.09624, speed: 0.0, course: 13.2
2017-02-13 11:34:55  INFO: [F929BC4B] disconnected
2017-02-13 11:34:56  INFO: [BED38E4A] connected
2017-02-13 11:34:57 DEBUG: [BED38E4A: 5128 < 94.44.50.37] HEX: 01012f00000000000000000000000000003335373435343037313632373539388b57ec3a6ec7e3310a1ceb0a70fd751b8f2e7be6df1d6dcd80129f66fff0ea1c
2017-02-13 11:34:57 DEBUG: [BED38E4A: 5128 > 94.44.50.37] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:34:57 DEBUG: [BED38E4A: 5128 > 94.44.50.37] HEX: 88000000000000000000000000000000
2017-02-13 11:35:01 DEBUG: [BED38E4A: 5128 < 94.44.50.37] HEX: 89000000000000000000000000000000
2017-02-13 11:35:01 DEBUG: [BED38E4A: 5128 > 94.44.50.37] HEX: 0001000000000000000000000000000000000000000000000000000000000000
2017-02-13 11:35:01  WARN: [BED38E4A] error - NullPointerException (... < At2000ProtocolDecoder:107 < ExtendedObjectDecoder:58 < ...)
2017-02-13 11:35:01  INFO: [BED38E4A] disconnected

Please take a look

tananaev commented 7 years ago

Fixed NullPointerException issue. Other warning have nothing to do with AT2000 decoder. You have some problem with saving address in the database. Possibly encoding issue.

SaidMarar commented 7 years ago

@bpali where i can find the latest version of telonika FMxxxx protocols ... v2.10 it is outdated

bpali commented 7 years ago

@SaidMarar you should kindly ask teltonika lads about their newest documentation. I only have what I already posted here.