Gt06 Protocol Stops Working When an Invalid Message is Sent

zzmyers4 years ago

I am running the Gt06 protocol and I have a new tracker which sometimes sends reports to the server that do not match the Gt06 protocol. When this happens, the remaining messages from the tracker do not get processed until a new session is started. Any idea what I can do to handle this so the incorrect message is filtered out? Or is there another way to fix it? I have the source code, so I can fix directly in the source as needed.

Here is the log for the device in question -- line 13 is the bad message which then causes the remaining messages to stop processing:

2020-07-04 21:39:07	 INFO:	[55005673]	 connected
2020-07-04 21:39:08	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d0103596001081900270002c4ad0d0a
2020-07-04 21:39:08	DEBUG:	[55005673:	 82 > 91.87.217.75] HEX: 787805010002eb470d0a
2020-07-04 21:39:13	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a13000607000200032b7a0d0a
2020-07-04 21:39:13	DEBUG:	[55005673:	 82 > 91.87.217.75] HEX: 787805130003cae30d0a
2020-07-04 21:39:13	 INFO:	[55005673]	 id: 359600108190027, time: 2020-07-04 05:32:26, lat: 34.10203, lon: -118.32674, speed: 0.0, course: 100.0
2020-07-04 21:41:09	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152909c803a8a3a40cb1f4f0003cbc01369a874f7a570f0004bfeb0d0a
2020-07-04 21:41:09	DEBUG:	[55005673:	 82 > 91.87.217.75] HEX: 787805120004e4800d0a
2020-07-04 21:41:09	 INFO:	[55005673]	 id: 359600108190027, time: 2020-07-04 21:41:09, lat: 34.10199, lon: -118.32732, speed: 0.0, course: 188.0
2020-07-04 21:42:14	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020005a8790d0a
2020-07-04 21:42:14	DEBUG:	[55005673:	 82 > 91.87.217.75] HEX: 787805130005afd50d0a
2020-07-04 21:42:14	 INFO:	[55005673]	 id: 359600108190027, time: 2020-07-04 21:41:09, lat: 34.10199, lon: -118.32732, speed: 0.0, course: 188.0
2020-07-04 21:43:51	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 2a48512c3335393630303130383139303032372c56342c574b4d4423
2020-07-04 21:43:52	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152b34c803a8a3740cb1f3e0003c8301369a874f768c10000607980d0a
2020-07-04 21:44:22	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152c16c803a8a3800cb1f490003c8301369a874f7a570f0007d39e0d0a
2020-07-04 21:44:52	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152c34c803a8a3800cb1f4a0003c8301369a874f7a570f0008f3a30d0a
2020-07-04 21:45:14	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002000962150d0a
2020-07-04 21:45:21	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002000a508e0d0a
2020-07-04 21:45:28	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002000b41070d0a
2020-07-04 21:45:34	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152d16c803a8a3800cb1f4c0003c8301369a874f7a570f000ca3b10d0a
2020-07-04 21:45:35	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205060002000d35800d0a
2020-07-04 21:45:41	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206060002000e0b660d0a
2020-07-04 21:45:47	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002000f07230d0a
2020-07-04 21:45:55	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020010ef550d0a
2020-07-04 21:46:02	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152d34c803a8a3800cb1f4d0003c8301369a874f7a570f001115a00d0a
2020-07-04 21:46:02	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342050600020012ddf60d0a
2020-07-04 21:46:09	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060600020013c0020d0a
2020-07-04 21:46:19	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060600020014b4bd0d0a
2020-07-04 21:46:25	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060600020015a5340d0a
2020-07-04 21:46:32	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152e16c803a8a3940cb1f550003c9a01369a874f7a570f00167cdb0d0a
2020-07-04 21:46:33	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002001797970d0a
2020-07-04 21:46:39	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020018631d0d0a
2020-07-04 21:46:51	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002001972940d0a
2020-07-04 21:46:57	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002001a400f0d0a
2020-07-04 21:47:03	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152e34c803a8a3940cb1f550003c9a01369a874f7a570f001b0c9c0d0a
2020-07-04 21:47:04	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002001c29440d0a
2020-07-04 21:47:10	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002001d34b00d0a
2020-07-04 21:47:17	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002001e062b0d0a
2020-07-04 21:47:23	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002001f1bdf0d0a
2020-07-04 21:47:29	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152f16c803a8a3bc0cb1f640003c7201369a874f7a570f002066fd0d0a
2020-07-04 21:47:30	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342050500020021c3220d0a
2020-07-04 21:47:36	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020022fdc40d0a
2020-07-04 21:47:42	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020023ec4d0d0a
2020-07-04 21:47:48	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002002498f20d0a
2020-07-04 21:47:55	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002002585060d0a
2020-07-04 21:48:02	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704152f34c803a8a3c40cb1f630003ccb01369a874f7a570f00265e410d0a
2020-07-04 21:48:03	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342050500020027a6140d0a
2020-07-04 21:48:10	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020028529e0d0a
2020-07-04 21:48:17	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002002943170d0a
2020-07-04 21:48:23	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002002a7df10d0a
2020-07-04 21:48:30	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704153016c803a8a3bc0cb1f5e0003ccb01369a874f7a570f002b15040d0a
2020-07-04 21:48:31	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002002c18c70d0a
2020-07-04 21:48:37	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002002d05330d0a
2020-07-04 21:48:43	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002002e3bd50d0a
2020-07-04 21:48:52	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002002f26210d0a
2020-07-04 21:48:58	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020030ce570d0a
2020-07-04 21:49:05	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704153034c803a8a3bc0cb1f5e0003ccb01369a874f7a570f0031017d0d0a
2020-07-04 21:49:05	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342050500020032e1380d0a
2020-07-04 21:49:12	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d0103596001081900270033e4a70d0a
2020-07-04 21:49:18	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134206050002003488730d0a
2020-07-04 21:49:24	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d010359600108190027003581910d0a
2020-07-04 21:49:30	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020036ab610d0a
2020-07-04 21:49:37	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d0103596001081900270037a2830d0a
2020-07-04 21:49:43	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704153116c803a8a3bc0cb1f5e0003ccb01369a874f7a570f00386c5a0d0a
2020-07-04 21:49:44	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a13420505000200395feb0d0a
2020-07-04 21:49:50	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d010359600108190027003a79660d0a
2020-07-04 21:49:59	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002003b7cf90d0a
2020-07-04 21:50:06	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d010359600108190027003c1c500d0a
2020-07-04 21:50:14	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704153134c803a8a3e00cb1f580003d0901369a874f7a570f003d378c0d0a
2020-07-04 21:50:14	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002003e2b540d0a
2020-07-04 21:50:21	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d010359600108190027003f2ecb0d0a
2020-07-04 21:50:27	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060600020040a01c0d0a
2020-07-04 21:50:33	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d0103596001081900270041b4320d0a
2020-07-04 21:50:39	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78781f12140704153216c803a8a3e00cb1f560003d0901369a874f7a500f0042cdbd0d0a
2020-07-04 21:50:40	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a134205050002004383360d0a
2020-07-04 21:50:46	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780d0103596001081900270044e39f0d0a
2020-07-04 21:50:52	DEBUG:	[55005673:	 82 < 91.87.217.75] HEX: 78780a1342060500020045ea7d0d0a
2020-07-04 21:55:52	 INFO:	[55005673]	 timed out
2020-07-04 21:55:52	 INFO:	[55005673]	 disconnected

--zzmyers

Anton Tananaev4 years ago

Looks like you are not using latest version of Traccar. I would recommend starting with upgrading to the latest code.

zzmyers4 years ago

You are correct. I am on 3.10. I tried to upgrade to 4.8 following the instructions, but it did not convert my existing data -- it only created new tables. I have a lot of data as I am running 6000 devices and have millions of rows in the positions tables and the events table. So I have to work out how to do this as I cannot just take the system offline. I will need to be able to do a rapid swap to the new server.

I guess I could set up the 4.8 server in parallel to my 3.10 server and migrate the data. Unless you have a better method.

zzmyers4 years ago

OK, I have the latest version up and running in parallel to my old setup. I also had the manufacturer correct his firmware so it is not sending these additional messages. I will continue testing with the latest version of Traccar and hopefully will have no further issues.