TK905 goes online/offline continuosly

Fabio Rossi7 years ago

Hello, my devices go online and offline continuosly. The problem is:

2018-01-04 13:41:07  INFO: [1CF1793C] id: 9051069113, time: 2018-01-04
13:41:06, lat: 41.95729, lon: 12.56048, speed: 0.5, course: 0.0
2018-01-04 13:41:37 DEBUG: [1CF1793C: 5093 < 5.169.166.218] HEX:
5b53472a393035313036393131332a303042352a55442c3034303131382c31323431333
62c412c34312e3935373335362c4e2c31322e3536303533372c452c312e313239372c30
30302c312c30362c37302c3130302c302c35302c30303030303030302c362c312c32323
22c312c3530312c31333634332c3133392c36303131332c34303331352c3133392c3234
3635332c33393238352c3133372c3530312c34303136372c3133342c36303131332c363
439392c3133322c36303131332c31313637382c3133322c2c30305d
2018-01-04 13:41:37  WARN: [1CF1793C] error - For input string: "13*0"
- NumberFormatException (... < WatchFrameDecoder:37 < ...)
2018-01-04 13:41:37  INFO: [1CF1793C] disconnected

It seems the device send invalid data frames but also other devices (of
my friends), models TK915 and TK905 give same results. It is impossible
to change device protocol implementation.

Is there a server-side solution to avoid this? It could be sufficient to ignore this kind of exception.

Best Regards.

GregoryO7 years ago

Hi,

I got the same.. 2 days ago
https://www.traccar.org/forums/topic/tk915-watch-proto-keeps-bouncing-device-offlineonline/

In order to solve that I modified traccar source code and usining that.

Fabio Rossi7 years ago

I'm reading your post right now. Can you give me your patched and compiled jar?
I'm using the dockerized version of traccar and it's not so simple to patch it by myself.
Thank you!
Fabio

GregoryO7 years ago

Sure here we go: https://we.tl/5fLEeAwX7p
just replace it in default /opt/traccar/...

Fabio Rossi7 years ago

Thank you! I'try it and give you feedback as soon as possible,
Bye!

Fabio Rossi7 years ago

it works!!!! Thank you guy!!!
Bye,
Fabio

Sean7 years ago

Hi Gregory I downloaded you File

Backed up my old traccar-server jar file in the main traccar folder, and replaced with your one, restarted traccar software and when i go to my URL. I appear to have blank screen no login window

when I remove your file and paste my old one back in the folder and restart all works well

I am using the latest ver of traccar 3.15 on windows

is yours windows or linux?

Thank you

GregoryO7 years ago

@Sean,
I'm on Linux. Maybe compilation for Windows is different and maybe the jar is different too.
Here you can find the modification I made: https://pastebin.com/d8ZLs5wt (this is git diff)

It should not affect UI at all (imho) because it's only a change in Watch proto frame decoder.

Sean7 years ago

@GregoryO
Thank you for your reply, thats more likely the reason for your file not working for me, as due to running windows here,

Thank also for the link to the modification, though I would not know where to start with modding the JAR file, so I would need someone who has done this already, to upload, as you did.

If there is anyone may be able to help? with a Jar file with this modification already done, that would be kind enough to share?

Thanks to all

GregoryO7 years ago

@Sean, you can try like that

  1. JAR is normal zip file. Unzip my jar, then locate the file called org/traccar/protocol/WatchFrameDecoder.class - extract it.
  2. Take your JAR and change the WatchFrameDecoder.class to mine.
  3. save or pack such modified jar/zip. Try it.
Sean7 years ago

@Gregory0
ok will have a go

THANK YOU

Sean7 years ago

@Gregory0
The jar file is not seen as zip file, I even renamed it as a ZIP file

No Luck

GregoryO7 years ago

ok drop the file here https://wetransfer.com/ and send the link. I will try to modify the jar with my file tomorrow . ./Gregory

Sean7 years ago

@Gregory Wetransfer will not allow me to upload the file, looking me to sign-up to an upgraded account to do so.

With yourself and @Fabio Rossi both looking this file modified to stop the TK unit on and off line, Surly these is more than just the two of you and me, that would want this feature.

If I could kindly ask if any other members reading this that have this modified Jar file for windows working for 64-bit windows, like to share it PLEASE

@Anton may i ask question please, I know as far back as 3.10 the TK units stayed online for like 9 minutes and did not go on off every few seconds like they now do on 3.14 and 3.15, was this modification not already added to the 3.15 software upgrade? or was yourself not aware of this?

Thank you to @Gregory and @Anton and all members of the forum

Anton Tananaev7 years ago

@Sean, I don't understand your question. It's not a server issue. Device sends data in wrong format, as I already explained.