TK103 - one device, two id's

blueman8 years ago

I have a device with TK103 protocol which is sending two different id's. Sometimes full IMEI, sometimes just a part.

I thought that every ignitation is switching the id, but not - now I see that even while driving the device is switching the id and suddenly sending other id's then a minute ago :/

What to do? It's a device issue and probably I cant do nothing with it.
But... how about write some simple cron job which will rewrite in mysql database a stored deviceid in positions table to other deviceid? That will be super easy for me, but the attributes column are different for records :/

atrribute column from first id:

{"status":"01000000","charge":true,"ignition":true,"odometer":282795,"ip":"94.254.224.101","distance":696.59,"totalDistance":327530.76}

attribute column from second id:

{"status":"01000000","charge":true,"ignition":true,"odometer":282795,"ip":"94.254.179.139","distance":6283.22,"totalDistance":245902.93}

the distance and totaldistance are different. Will it be a problem if I will change the deviceid?

Anton Tananaev8 years ago

You should probably provide some HEX message samples from your device. With full and partial IMEI.

blueman8 years ago

As you wish

2017-03-02 20:12:29  INFO: [09F924ED] id: 087073043162, time: 2017-03-02 20:12:30, lat: 50.30459, lon: 19.26857, speed: 36.0, course: 239.7
2017-03-02 20:12:59 DEBUG: [09F924ED: 5002 < 94.254.144.161] HEX: 283038373037333034333136324252303031373033303241353031382e313334314e30313931352e37343439453036382e383139313330303233392e343130313030303030304c303030343530414229
2017-03-02 20:12:59  INFO: [09F924ED] id: 087073043162, time: 2017-03-02 20:13:00, lat: 50.30224, lon: 19.26242, speed: 37.1, course: 239.4
2017-03-02 20:13:44  INFO: [71F5F1A3] connected
2017-03-02 20:13:44 DEBUG: [71F5F1A3: 5002 < 94.254.224.30] HEX: 283038373037333034333136324250303533353238383730373330343331363231373033303241353031372e393737354e30313931352e33333234453036362e363139313333303234322e363730313030303030304c303030343530414229
2017-03-02 20:13:44 DEBUG: [71F5F1A3: 5002 > 94.254.224.30] HEX: 283038373037333034333136324150303529
2017-03-02 20:13:45  INFO: [71F5F1A3] id: 352887073043162, time: 2017-03-02 20:13:30, lat: 50.29963, lon: 19.25554, speed: 36.0, course: 242.7
2017-03-02 20:13:45 DEBUG: [71F5F1A3: 5002 < 94.254.224.30] HEX: 283038373037333034333136324252303031373033303241353031372e393737354e30313931352e33333234453036362e363139313333303234322e363730313030303030304c303030343530414229
2017-03-02 20:13:45  INFO: [71F5F1A3] id: 352887073043162, time: 2017-03-02 20:13:30, lat: 50.29963, lon: 19.25554, speed: 36.0, course: 242.7
2017-03-02 20:13:59 DEBUG: [71F5F1A3: 5002 < 94.254.224.30] HEX: 283038373037333034333136324252303031373033303241353031372e383232374e30313931342e39323530453036332e343139313430303234312e323130313030303030304c303030343530414229
Anton Tananaev8 years ago

Why do you have both ids registered? Have you tried registering just 087073043162?

blueman8 years ago

First of all I didnt know the id of my device (the full imei didnt worked) - so in traccar config I set database.registerUnknown to a true and database.ignoreUnknown to a false. And I left the config values.

Anton Tananaev8 years ago

Try using just 087073043162.

blueman8 years ago

Just want to confirm that using the short imei with trailing zero is working like a harm.