[URGENT] Which decoder I need to decode this hex data??

Mohiuddin Shakil7 years ago

I am using traccar to get data from my GPS device. I am getting this when i connect my device to the traccar server.

2018-06-07 00:01:41 INFO: [44191B4C] connected
2018-06-07 00:01:41 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 7878251612060612000fc3028d91e809b292b60005540901d601521d0066cf100603020200010a730d0a
2018-06-07 00:01:43 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78780d0108600160204180390002b9030d0a
2018-06-07 00:01:43 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120011c0000000000000000000000000000000000000000003cf760d0a
2018-06-07 00:01:44 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120012c3028d91e809b292b600055401d601521d0066cf0004e0fc0d0a
2018-06-07 00:01:45 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120013c3028d91e809b292b600055401d601521d0066cf000578bc0d0a
2018-06-07 00:01:46 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120014c3028d91e809b292b600055401d601521d0066cf0006ef6b0d0a
2018-06-07 00:01:47 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120015c3028d91e809b292b600055401d601521d0066cf0007772b0d0a
2018-06-07 00:01:48 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f12120606120016c3028d91e809b292b600055401d601521d0066cf00081d960d0a
2018-06-07 00:01:53 DEBUG: [44191B4C: 5013 < 119.30.38.156] HEX: 78781f1212060612001bc3028d91e809b292b600055401d601521d0066cf0009dcdc0d0a

can anyone please tell me which protocol's decoder should i use to decode this hex data?? I used the Hex Decoder in traccar but it's not decoding into proper string on that. If it's a binary protocol then how can i test if the data coming from my device is valid or not? Please let me know at your convenient time.

P.S. I'm using S112U tracker from SEEWORLD

Thanks in Advance

Anton Tananaev7 years ago

It's GT06 protocol, port 5023.

Mohiuddin Shakil7 years ago

Thanks a lot mate for the fast response. God bless :)

Mohiuddin Shakil7 years ago

I have another question, if you don't mind me asking. I was trying to decode this hex data in Gt06ProtocolDecoder class from the test package. But it's saying java.lang.AssertionError: position is null. Is this because of my hex data is corrupted or something like that?
I used this for decoding

Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(new Gt06Protocol());
verifyPosition(decoder, binary("7878251612060612000fc3028d91e809b292b60005540901d601521d0066cf100603020200010a730d0a"));

Thanks in advance.

Anton Tananaev7 years ago

No, you are missing login message.

Mohiuddin Shakil7 years ago

Can you please explain, sir? I mean what's the login message suppose to be? I am sorry for asking this novice question but am new to traccar.

Anton Tananaev7 years ago

First message device sends is login message, so decoder expects it first.

Mohiuddin Shakil7 years ago

So, is there any way for me to decode it in using the test package for testing? i mean when i check the log there's no login message particularly. From the beginning of it, it sends the hex data when connected to the traccar server. What i was using in the test run was the first hex data that came from the device to the server log. Shouldn't it be the one containing the login information or login message?

Thanks for all the fast responses, sir. Really appreciate it.

Anton Tananaev7 years ago

If you look at the unit tests, the first message there IS login for that very reason. Your device should send login first, but if it doesn't there is no way to identify the device, so it sounds like device issue.

Mohiuddin Shakil7 years ago

Here's the full log when i was trying to get data from my tracker on 5023 port.

2018-05-27 00:35:21  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2018-05-27 00:35:21  INFO: Java runtime name: Java HotSpot(TM) 64-Bit Server VM vendor: Oracle Corporation version: 25.77-b03
2018-05-27 00:35:21  INFO: Memory limit heap: 1810mb non-heap: 0mb
2018-05-27 00:35:21  INFO: Character encoding: Cp1252 charset: windows-1252
2018-05-27 00:35:21  INFO: Version: null
2018-05-27 00:35:28  INFO: Starting server...
2018-05-27 00:35:28  WARN: One of the protocols is disabled due to port conflict
2018-05-27 00:37:06  INFO: [3F4DA43A] connected
2018-05-27 00:37:06 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 7878251612051a122329c5026c58510c38aa560004000901d601521a004055100604020200012d7c0d0a
2018-05-27 00:37:07 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78780d010860016020909151000251e50d0a
2018-05-27 00:37:07  WARN: Unknown device - 860016020909151 (119.30.38.32)
2018-05-27 00:37:09 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12232bc00000000000000000000000000000000000000000033fb60d0a
2018-05-27 00:37:10 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12232cc5026c58510c38aa5600040001d601521a004055000495650d0a
2018-05-27 00:37:11 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12232dc5026c58510c38aa5600040001d601521a00405500050d250d0a
2018-05-27 00:37:12 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12232ec5026c58510c38aa5600040001d601521a0040550006adf40d0a
2018-05-27 00:37:13 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12232fc5026c58510c38aa5600040001d601521a004055000735b40d0a
2018-05-27 00:37:13 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122330c5026c58510c38aa5600040001d601521a0040550008da1b0d0a
2018-05-27 00:37:16 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122332c5026c58510c38aa5600040001d601521a0040550009d0110d0a
2018-05-27 00:37:26 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122401c5026c58510c38aa5600040001d601521a004055000a94340d0a
2018-05-27 00:37:36 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12240bc5026c58510c38aa5600040001d601521a004055000bf0320d0a
2018-05-27 00:37:46 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122415c5026c58510c38aa5600040001d601521a004055000c1a1c0d0a
2018-05-27 00:37:56 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12241fc5026c58510c38aa5600040001d601521a004055000d7e1a0d0a
2018-05-27 00:38:06 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122429c5026c58510c38aa5600040001d601521a004055000e0c3d0d0a
2018-05-27 00:38:16 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122433c5026c58510c38aa5600040001d601521a004055000fb4230d0a
2018-05-27 00:38:26 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122501c5026c58510c38aa5600040001d601521a004055001070ab0d0a
2018-05-27 00:38:36 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12250bc5026c58510c38aa5600040001d601521a004055001114ad0d0a
2018-05-27 00:38:46 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122515c5026c58510c38aa5600040001d601521a0040550012b8a70d0a
2018-05-27 00:38:56 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12251fc5026c58510c38aa5600040001d601521a0040550013dca10d0a
2018-05-27 00:39:06 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122529c5026c58510c38aa5600040001d601521a0040550014e8a20d0a
2018-05-27 00:39:16 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122533c5026c58510c38aa5600040001d601521a004055001550bc0d0a
2018-05-27 00:39:26 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122601c5026c58510c38aa5600040001d601521a0040550016f8510d0a
2018-05-27 00:39:36 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12260bc5026c58510c38aa5600040001d601521a00405500179c570d0a
2018-05-27 00:39:47 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122615c5026c58510c38aa5600040001d601521a0040550018fa310d0a
2018-05-27 00:39:56 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12261fc5026c58510c38aa5600040001d601521a00405500199e370d0a
2018-05-27 00:40:06 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122629c5026c58510c38aa5600040001d601521a004055001aec100d0a
2018-05-27 00:40:16 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122633c5026c58510c38aa5600040001d601521a004055001b540e0d0a
2018-05-27 00:40:26 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122701c5026c58510c38aa5600040001d601521a004055001c0c4f0d0a
2018-05-27 00:40:36 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12270bc5026c58510c38aa5600040001d601521a004055001d68490d0a
2018-05-27 00:40:46 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122715c5026c58510c38aa5600040001d601521a004055001ec4430d0a
2018-05-27 00:40:56 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a12271fc5026c58510c38aa5600040001d601521a004055001fa0450d0a
2018-05-27 00:41:06 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122729c5026c58510c38aa5600040001d601521a0040550020298d0d0a
2018-05-27 00:41:16 DEBUG: [3F4DA43A: 5023 < 119.30.38.32] HEX: 78781f1212051a122733c5026c58510c38aa5600040001d601521a004055002191930d0a
2018-05-27 00:43:42  INFO: [3F4DA43A] disconnected
2018-05-27 00:43:43  INFO: [00F36A7D] connected
2018-05-27 00:43:43 DEBUG: [00F36A7D: 5023 < 119.30.38.32] HEX: 78780d010860016020909151002270e70d0a
2018-05-27 00:43:43  WARN: Unknown device - 860016020909151 (119.30.38.32)
2018-05-27 00:51:16 DEBUG: [00F36A7D: 5023 < 119.30.38.32] HEX: 78781f1212051a123133c5026c58510c38aa5600040001d601521a0040550023fd1d0d0a
2018-05-27 00:51:28  INFO: [00F36A7D] disconnected
2018-05-27 00:51:29  INFO: [89C708FA] connected
2018-05-27 00:51:29 DEBUG: [89C708FA: 5023 < 119.30.38.32] HEX: 78780d010860016020909151002415d10d0a
2018-05-27 00:51:29  WARN: Unknown device - 860016020909151 (119.30.38.32)

Hope it helps to identify the problem.

Mohiuddin Shakil7 years ago

Oh I see. Thanks for the help :)

Anton Tananaev7 years ago

I can see that your device reports login message as the first one in most cases. Please do some research yourself before asking questions on forum.

Mohiuddin Shakil7 years ago

I am sorry for the hassle. Thanks for all the help.