To get battery percentage of the device in ZX303 using GT06 protocol

Ambadi 5 years ago

Hello there,
How can I get battery percentage in ZX303 using GT06 protocol? As of now, battery percentage is shown as 1183% and it remains constant. Other feature like location etc are correctly read but battery percentage is not changing. Can anyone help me to solve this issue?

Anton Tananaev5 years ago

Do you have logs and protocol documentation?

Ambadi 5 years ago

Hi Anton,
The protocol used here is Zhongxun Locator Communication Protocol. The log file is given below. Please check it

2020-11-24 00:05:26  INFO: [5f673a26] connected
2020-11-24 00:05:26  INFO: [5f673a26: 5023 < 42.109.151.150] HEX: 78780d010359339075469021470d0a
2020-11-24 00:05:26  INFO: [5f673a26: 5023 > 42.109.151.150] HEX: 7878050146904e6a0d0a
2020-11-24 00:05:27  INFO: [5f673a26: 5023 < 42.109.151.150] HEX: 787801570d0a
2020-11-24 00:05:27  INFO: [5f673a26: 5023 > 42.109.151.150] HEX: 7878055778785ca40d0a
2020-11-24 00:05:47  INFO: [5f673a26: 5023 < 42.109.151.150] HEX: 787807130b4708195d0d0a
2020-11-24 00:05:47  INFO: [5f673a26: 5023 > 42.109.151.150] HEX: 7878051347087f5e0d0a
2020-11-24 00:05:47  INFO: [5f673a26] id: 359339075469021, time: 2020-11-23 12:20:27, lat: 10.40361, lon: 76.11193, course: 117.0
2020-11-24 00:09:48  INFO: [5f673a26] disconnected
2020-11-24 00:09:48  WARN: No SMTP configuration found
2020-11-24 00:10:20  INFO: [14c873cd] connected
2020-11-24 00:10:20  INFO: [14c873cd: 5023 < 42.109.151.150] HEX: 78780d010359339075469021470d0a
2020-11-24 00:10:20  INFO: [14c873cd: 5023 > 42.109.151.150] HEX: 7878050146904e6a0d0a
2020-11-24 00:10:21  INFO: [14c873cd: 5023 < 42.109.151.150] HEX: 787801570d0a
2020-11-24 00:10:21  INFO: [14c873cd: 5023 > 42.109.151.150] HEX: 7878055778785ca40d0a
2020-11-24 00:10:41  INFO: [14c873cd: 5023 < 42.109.151.150] HEX: 787807130b4708195c0d0a
2020-11-24 00:10:41  INFO: [14c873cd: 5023 > 42.109.151.150] HEX: 7878051347087f5e0d0a
2020-11-24 00:10:41  INFO: [14c873cd] id: 359339075469021, time: 2020-11-23 12:20:27, lat: 10.40361, lon: 76.11193, course: 117.0
2020-11-24 00:14:41  INFO: [14c873cd] disconnected
2020-11-24 00:14:41  WARN: No SMTP configuration found
2020-11-24 00:15:15  INFO: [8ad58983] connected
Anton Tananaev5 years ago

Would need documentation.

Ambadi 5 years ago

Hi Anton,

please find the below link for the protocol documentation.

https://drive.google.com/drive/folders/1WPWLa0nMQsPSAF_yk48cadq9C2JCntnE?usp=sharing

Anton Tananaev5 years ago

"Access Denied"

Ambadi 5 years ago
Anton Tananaev5 years ago

You are using wrong port. Your device is using Topin protocol.

Ambadi 5 years ago

Ok thank you, Can you please mention which port I need to use? Now I am using port 5023

JackCutter5 years ago

There is a problem with your length field.

78780d010359339075469021470d0a
7878 is the start bits
0d is the length field which is 13 in decimal. There are only 10 bytes following instead of 13 before the 0d0d stop bits. My guess is because your ID number is expected to be 12 bytes maybe? Normally a IMEI is 15 bytes but maybe there are using an ID instead. Yours seems to be 9 bytes long. 03 59 33 90 75 46 90 21 47. With the log in packet signified by the 0x01 and a 9 byte ID number the count should be 0a or (10 in decimal), not the 0d or (13 in decimal) that is showing in your log.

JackCutter5 years ago

hex: 03 59 33 90 75 46 90 21 47 is decimal: 03 89 51 144 117 70 144 33 71

Alein4 years ago

Hi, I have this same problem. Can someone help me to decode ID of ZX303? I use 5199 port but in logs I see

2021-02-25 14:09:37  INFO: [bf52f828: h02 < 185.135.2.81] HEX: 78780d0103593390770334325a0d0a
2021-02-25 14:10:04  INFO: [bf52f828: h02 < 185.135.2.81] HEX: 787807135b5a0819640d0a
2021-02-25 14:10:26  INFO: [bf52f828: h02 < 185.135.2.81] HEX: 78780817210225021333001f9ed42cb048c83a355022384a001aa15cddc04ce894f6e194524c90f6528c561450de473266a8f053d8473266a8ff54c83a351c233055020104060c437f6c500c439c0550000d0a

H02? It should be Topin ?

Anton Tananaev4 years ago

It's definitely not H02.

Alein4 years ago

So how to fix it?

Alein4 years ago

When I connect to the demo server GPS tracker it is working fine on port 5023, but for my traccar server, I have still h02.

2021-02-26 20:40:29  INFO: [d269e583: h02 < 37.47.129.199] HEX: 787807135d5a0819640d0a
2021-02-26 20:40:50  INFO: [d269e583: h02 < 37.47.129.199] HEX: 78780817210225035841e894f699aa643d001f9ed42cb048001aa15cddc048c83a355022384ae894f6e194524b90f6528c56144fd8473266a8ff51de473266a8f051050104060c437f6c500c438d25500c439c05500c437f6b5a0c438caf5a000d0a

Why it is recognize as h02? How to fix it?