Device error or possibly unsuitable protocol?

Daniel Retief7 years ago

Dear Anton,

First of all, I must applaud you for this amazing initiative! and thanks for sharing it with the world.

I have Chinese no name brand GPS trackers, I was able to get them working but it seems to be intermittent.

When it works the Log I receive is as follows:

2018-11-03 07:26:38  INFO: [5EAD8156] connected
2018-11-03 07:26:38 DEBUG: [5EAD8156: 5015 < 168.167.136.210] HEX: 7e0102000e018603127808020d61757468656e7469636174696f6ee47e
2018-11-03 07:26:38 DEBUG: [5EAD8156: 5015 > 168.167.136.210] HEX: 7e800100050186031278080001020d0102006f7e
2018-11-03 07:26:43 DEBUG: [5EAD8156: 5015 < 168.167.136.210] HEX: 7e02000028018603127808020e00000000000c00070176ea3c018c613503cc00f8007a18110309263801040000115d300111310110aa7e
2018-11-03 07:26:43  INFO: [5EAD8156] id: 018603127808, time: 2018-11-03 01:26:38, lat: -24.57043, lon: 25.97714, speed: 13.4, course: 122.0
2018-11-03 07:28:43  INFO: [5EAD8156] timed out
2018-11-03 07:28:43  INFO: [5EAD8156] disconnected

Then when it doesn't work I get this:

2018-11-03 07:04:00  INFO: [158FBE18] connected
2018-11-03 07:04:02 DEBUG: [158FBE18: 5015 < 168.167.136.209] HEX: 7e0102000e01860312780801f661757468656e7469636174696f6e1c7e
2018-11-03 07:04:02 DEBUG: [158FBE18: 5015 > 168.167.136.209] HEX: 7e80010005018603127808000101f6010200977e
2018-11-03 07:04:04 DEBUG: [158FBE18: 5015 < 168.167.136.209] HEX: 7e0704002d01860312780801f7000101002800000000000c00070176ec1f018c628903ce000000af18110305590301040000108a30010631010c5c7e
2018-11-03 07:06:04  INFO: [158FBE18] timed out

I have tried decoding the HEX but I just get gibberish that I cant make sense of.

I am currently using the protocol 5015, I have attached the document that contains all the protocol information of the device, as I am not sure if it maybe is just an issue that the device isn't supported.

protocol information

Thanks in advance
And I hope I am not wasting your time
Kind regards
Daniel

Anton Tananaev7 years ago

I think you are using correct protocol and port.

Daniel Retief7 years ago

Do you think I should maybe change settings on the GPS because not every time the GPS communicates does it send GPS co-ordinates (see Below):

2018-11-10 03:20:19 DEBUG: [AD3FA1FA: 5015 < 41.74.48.15] HEX: 7e0102000e018603125894030061757468656e7469636174696f6e547e
2018-11-10 03:20:19 DEBUG: [AD3FA1FA: 5015 > 41.74.48.15] HEX: 7e8001000501860312589400010300010200df7e
2018-11-10 03:20:21 DEBUG: [AD3FA1FA: 5015 < 41.74.48.15] HEX: 7e02000028018603125894030100000000000c00070176ec0a018c628c03ca000000bb18111011202101040000102830011231010cd27e
2018-11-10 03:20:21  INFO: [AD3FA1FA] id: 018603125894, time: 2018-11-10 03:20:21, lat: -24.57089, lon: 25.97748, speed: 0.0, course: 187.0
2018-11-10 03:20:30 DEBUG: [AD3FA1FA: 5015 < 41.74.48.15] HEX: 7e0704002d0186031258940302000101002800000000000c00070176ebf1018c62a703d60000015418111008012101040000102830011131010be47e
2018-11-10 03:20:48  INFO: [AD3FA1FA] disconnected
2018-11-10 03:20:50  INFO: [BF9BC151] connected
2018-11-10 03:20:52 DEBUG: [BF9BC151: 5015 < 41.74.48.15] HEX: 7e0102000e018603125894030361757468656e7469636174696f6e577e
2018-11-10 03:20:52 DEBUG: [BF9BC151: 5015 > 41.74.48.15] HEX: 7e8001000501860312589400010303010200dc7e
2018-11-10 03:20:55 DEBUG: [BF9BC151: 5015 < 41.74.48.15] HEX: 7e0704002d0186031258940304000101002800000000000c00070176ebf1018c62a703d60000015418111008015101040000102830011131010b927e
...
2018-11-10 04:14:41  INFO: [F58D6600] timed out
2018-11-10 04:14:41  INFO: [F58D6600] disconnected
2018-11-10 04:14:46  INFO: [2A924AF7] connected
2018-11-10 04:14:48 DEBUG: [2A924AF7: 5015 < 41.74.48.9] HEX: 7e0102000e018603125894033561757468656e7469636174696f6e617e
2018-11-10 04:14:48 DEBUG: [2A924AF7: 5015 > 41.74.48.9] HEX: 7e8001000501860312589400010335010200ea7e
2018-11-10 04:14:51 DEBUG: [2A924AF7: 5015 < 41.74.48.9] HEX: 7e0704002d0186031258940336000101002800000000000c00070176ec00018c62c203ce0000011c18111008552101040000102830011131010e427e
2018-11-10 04:16:51  INFO: [2A924AF7] timed out
2018-11-10 04:16:51  INFO: [2A924AF7] disconnected
2018-11-10 04:16:57  INFO: [7305DB9D] connected
2018-11-10 04:16:58 DEBUG: [7305DB9D: 5015 < 41.74.48.11] HEX: 7e0102000e018603125894033761757468656e7469636174696f6e637e
2018-11-10 04:16:58 DEBUG: [7305DB9D: 5015 > 41.74.48.11] HEX: 7e8001000501860312589400010337010200e87e
2018-11-10 04:17:01 DEBUG: [7305DB9D: 5015 < 41.74.48.11] HEX: 7e0704002d0186031258940338000101002800000000000c00070176ec00018c62c203ce0000011c18111008575101040000102830011131010e3e7e
Anton Tananaev7 years ago

It's also possible that protocol is slightly different and server doesn't recognise some messages.

Daniel Retief7 years ago

Is there anything I could possibly do to fix this? Seems so strange to work at times, I also can't understand why the hex can't be decoded, it seems to show empty little boxes.

Anton Tananaev7 years ago

I don't think you can do anything about it. It's a binary protocol, so it can't be decoded into human readable text.

Daniel Retief7 years ago

Would it be possible to create a new protocol based on the document I shared above to correctly desipher the incoming information?

Daniel Retief7 years ago

Is there any other protocol that I could try?

Daniel Retief7 years ago

Not sure if the raw output helps?:

09:57:38.937898 IP li849-74.members.linode.com.5015 > 41.190.244.10.13751: Flags [F.], seq 455613255, ack 223510090, win 227, options [nop,nop,TS val 984635668 ecr 179873], length 0
        0x0000:  0000 0c9f f002 f23c 9104 0b18 0800 4500
        0x0010:  0034 97d2 4000 4006 f23c 8ba2 074a 29be
        0x0020:  f40a 1397 35b7 1b28 1b47 0d52 7e4a 8011
        0x0030:  00e3 b0db 0000 0101 080a 3ab0 5914 0002
        0x0040:  bea1
09:57:40.448746 IP li849-74.members.linode.com.5015 > 41.190.244.10.13751: Flags [F.], seq 0, ack 1, win 227, options [nop,nop,TS val 984637179 ecr 179873], length 0
        0x0000:  0000 0c9f f002 f23c 9104 0b18 0800 4500
        0x0010:  0034 97d3 4000 4006 f23b 8ba2 074a 29be
        0x0020:  f40a 1397 35b7 1b28 1b47 0d52 7e4a 8011
        0x0030:  00e3 b0db 0000 0101 080a 3ab0 5efb 0002
        0x0040:  bea1
...
Anton Tananaev7 years ago

I have tested messages from your logs and all of them work fine for me. Are you sure you are using latest official release of Traccar?

Daniel Retief7 years ago

You wont believe it but I am such a moron, I hadn't updated to the latest version, now everything is working flawlessly!

Thanks for all the help and I am so sorry for wasting your time

Thanks again and thanks for the amazing project you have shared!!

Daniel Retief7 years ago

Sorry one last thing, is it normal for the GPS to be sending the same time value?

2018-11-11 04:19:32  INFO: [2c856f0a: 5015 < 105.235.241.8] HEX: 7e0102000e018603125894004e61757468656e7469636174696f6e197e
2018-11-11 04:19:32  INFO: [2c856f0a: 5015 > 105.235.241.8] HEX: 7e800100050186031258940001004e010200927e
2018-11-11 04:19:35  INFO: [2c856f0a: 5015 < 105.235.241.8] HEX: 7e0704002d018603125894004f000101002800000000000c00070176ec12018c62bd03cb0000014d18111108415201040000111d30011231010c527e
2018-11-11 04:19:35  INFO: [2c856f0a] id: 018603125894, time: 2018-11-11 00:41:52, lat: -24.57090, lon: 25.97753, course: 333.0
2018-11-11 04:21:35  INFO: [2c856f0a] timed out
2018-11-11 04:21:35  INFO: [2c856f0a] disconnected
2018-11-11 04:21:38  INFO: [d0ebc288] connected
2018-11-11 04:21:40  INFO: [d0ebc288: 5015 < 105.235.241.8] HEX: 7e0102000e018603125894005061757468656e7469636174696f6e077e
2018-11-11 04:21:40  INFO: [d0ebc288: 5015 > 105.235.241.8] HEX: 7e80010005018603125894000100500102008c7e
2018-11-11 04:21:43  INFO: [d0ebc288: 5015 < 105.235.241.8] HEX: 7e0704002d0186031258940051000101002800000000000c00070176ec12018c62bd03cb0000014d18111108415201040000111d30011231010c4c7e
2018-11-11 04:21:43  INFO: [d0ebc288] id: 018603125894, time: 2018-11-11 00:41:52, lat: -24.57090, lon: 25.97753, course: 333.0
Daniel Retief7 years ago

I see in the database when it works the "hours" is positive vs when it doesnt work its negative e.g. "hours":-7276000

Daniel Retief7 years ago

I see when it works the Server time is the same as Device time and Fix Time, When it doesn't work I get the following, I assume this is an issue with GPS sending wrong times most of the time:

Server Time               | Device Time               | Fix Time 
2018-11-11 05:42:49 | 2018-11-11 01:25:52 | 2018-11-11 01:25:52
Anton Tananaev7 years ago

It's common for GPS to report old time when it doesn't have good satellite signal.