TK905-4GSA watch protocol decode error

uioi3 years ago

I'm in the U.S. . I have used the traccar Android client APP for years. But due to the battery life of an andoid phone, recently, I want to use a battery-powered GPS tracker with my own server.

I bought a few different models from Amazon and most of them do not work with my SIM car. I guess that is because most of these devices only support 2G GPRS. The only working device is called TKSTAR TK905-4GSA, which is claimed to support 4G network. My SIM card works with the device that it can receive and reply SMS config commands.

After config the correct server IP and ports, my server can receive data from the device, but can't decode it:

2021-10-25 16:46:21  INFO: [1426197e: watch < 166.205.209.193] HEX: 5b53472a393035393035363134332a303035312a55442c3235313032312c3230343535392c412c34312e34363538332c4e2c3038312e35333232352c572c302e302c3334302c302c30302c38302c38302c302c35302c30303030303030302c302c312c2c2c2c30305d
2021-10-25 16:46:21  WARN: [1426197e] error - For input string: "" - NumberFormatException (... < WatchProtocolDecoder:148 < *:254 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)

The HEX can be decoded by using the hex to text decoder to

[SG*9059056143*0051*UD,251021,204559,A,41.46583,N,081.53225,W,0.0,340,0,00,80,80,0,50,00000000,0,1,,,,00]

I did some research before posting in this forum. Seems the problem is the device sent the wrong length of the message so the decoder refuses to decode the data after the message length. Some people provided a revised source code for the decoder. But since I'm using the home assistant traccar addon. I'm not sure how to replace the source code.

Is there any work around for this particular device? Seems I can't find any other device in the U.S. market.

Anton Tananaev3 years ago

Are you using the latest version of Traccar?

uioi3 years ago

The Traccar home assistant addon is 0.13.1 which is up to date but not sure how if the addon uses the latest version of Traccar.

You reminded me. I just changed the server to demo server 4 104.237.9.196. Will you help me take a look at the log? The ID is 9059056143. Thanks.

Anton Tananaev3 years ago

Does it work on demo? Do you get any data or device shows as offline?

uioi3 years ago

It shows online but no location information. From the server's log, it can be either decoding error or sometimes the device send short message without location data.

uioi3 years ago

I installed the latest Traccar on a Linux machine, but still get the same decode error:

2021-10-25 15:34:11  INFO: [dcbe0423: watch < 166.205.209.195] HEX: 5b53472a393035393035363134332a303035332a55442c3235313032312c3232333430382c412c34312e34363530302c4e2c3038312e35333132382c572c302e3932362c3030302c302c30302c37302c37302c302c35302c30303030303030302c302c312c2c2c2c30305d
2021-10-25 15:34:11  WARN: [dcbe0423] error - For input string: "" - NumberFormatException (... < WatchProtocolDecoder:146 < *:253 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)
Anton Tananaev3 years ago
uioi3 years ago

Thank you. Will try and report back.

uioi3 years ago

confirm this works. When will you include it in the next realease?

Anton Tananaev3 years ago

Don't have any specific date yet.