Watch protocol data not getting processed

skyking5 years ago

I am receiving correctly formatted watch protocol data from tracker:

[3G*2104134718*00A1*UD_WCDMA,161019,104721,A,43.373281,N,71.157701,W,22.0,327.173,294.628,22,13,88,0,0,00000000,1,1,310,410,23999,132013696,13,1,Home2,60:45:cb:cb:34:68,-88,7.955632]

I assume server only processes out of incoming data: Date, Time, Lat, Lon, Speed, Course and drops the rest?

Not receiving any errors in log but also not getting any data in Device Status or position on map

I am seeing this in the log every 5 minutes right after server sends LK command:

id: 2104134718, time: 1969-12-31 19:00:00, lat: 0.00000, lon: 0.00000, course: 0.0

skyking5 years ago

and here is actual hex input

watch < 107.242.116.97] HEX: 5b33472a323130343133343731382a303041312a55445f5743444d412c3136313031392c3133343933382c412c34332e3337333336372c4e2c37312e3135373631352c572c32322e302c3335302e3230362c3237392e3731372c31372c32382c37392c302c302c30303030303030302c312c312c3331302c3431302c32333939392c3133323031333639362c32382c312c486f6d65322c36303a34353a63623a63623a33343a36382c2d39332c382e3236333836355d
skyking5 years ago

Tracker is sending out all position reports with UTC time zone even though it is set in the tracker correctly. Is this why the server isn't processing the location data? Some time mismatch? (4 hours later than actual time here in US EDT).

Anton Tananaev5 years ago

Traccar is expecting UTC time.

skyking5 years ago

I figured time wasn't an issue.

But why isn't the data getting stored and displayed when data string is 'watch' protocol format with good data?

No errors in log.

Thanks.

skyking5 years ago

I reset database files and started from scratch.

Still receiving valid data from tracker but not showing up in Device Status or on Map so server not accepting data or creating a db record but no error in log file either.

[3G*2104134718*009F*UD_WCDMA,171019,004735,A,43.373385,N,71.157894,W,22.0,337.373,305.036,20,5,52,0,0,00000000,1,1,310,410,23999,132013696,5,1,Home2,60:45:cb:cb:34:68,-72,6.620659]

I'm at a complete loss as to how to get this working.

Anton Tananaev5 years ago

I suspect this message type is not supported yet.

skyking5 years ago

But everything up to and including the 23999 is standard watch protocol format. After 23999 data is WiFi related but I assumed server was only interested in date, time, lat, lon, direction, speed.

skyking5 years ago

watch procotol v1.7_C formatted:

171019 date
004735 time (UTC)
A valid position
43.373385,N Lat
71.157894,W Lon
22.0 speed
337.373 direction
305.036 alt
20 satellites
5 GSM signal
52 battery level

everything else not required (pedometer, steps, terminal, wifi)

so if this is standard watch protocol, how come nobody else with watch protocol device is having issues?

Very frustrating. And yes I read all manuals and most previous threads in forum but found no solution.

Anton Tananaev5 years ago

Added support for this new message type.

skyking5 years ago

Thank you. I was going to look at the code to see if I could do it even though I never learned java (I started with dBase II and III in the 80s and then php in the 90s with some c++. I will download server and install again and test.

skyking5 years ago

Do you plan to rebuild distro files (linux_x64) or do I need to git source files and copy ./traccar/src/main/java/org/traccar to /opt/traccar/web and run in debug.html as described under build?

skyking5 years ago

Instead of loading complete source and running debug.html is there a way through config to run the compressed distro file but refer to WatchProtocolDecoder.java (so I can just put that updated file in the web folder)?

That would be an excellent way to do small patches without rebuilding distro files or having to git and run complete source tree.

Once changes are incorporated into next distro and installed, you could comment out the referral line in config and use complete compressed file again.

skyking5 years ago

I went ahead and followed the 'Build traccar from source via command line' and created a new app.min.js

Pretty easy...

skyking5 years ago

Running server with revised protocol file, server is still ignoring data stream - no database record and no map position and Device Status blank.

[3G*2104134718*00A0*UD_WCDMA,171019,145349,A,43.373545,N,71.157635,W,22.0,261.496,272.88,19,21,99,0,0,00000000,1,1,310,410,23999,132013697,21,1,Home2,60:45:cb:cb:34:68,-64,6.594864]