Device State frozen in time, after receiving corrupted date/time stamp

Anton Tananaev7 years ago

It's a standard feature, but it's disabled by default. If you want examples, search on forum and github.

marc7 years ago

For examples I searched on Traccar Forum https://www.traccar.org/forums/search/filter.future/

= three results asking for same info I'm looking for no response.

Then searched Github,
https://github.com/search?utf8=%E2%9C%93&q=%22filter.future%22&type=Repositories&ref=advsearch&l=&l=

  • only one result, irrelavent info.
Anton Tananaev7 years ago

This is what you need to add to the config file:

<entry key='filter.enable'>true</entry>
<entry key='filter.future'>3600</entry>
marc7 years ago

Ah, our posts just crossed!

I'd took a guess and pasted into traccar.xml:

    <entry key='filter.enable'>true</entry>
    <entry key='filter.future'>360</entry>

I'm trying to test it now by spoofing the tracker device using a Windows Hyperterm connected to the port for gps103, and sending the corrupt data

marc7 years ago

I'd just successfully tested the filter by spoofing the tracker signal (from another IP address) and sending the rogue data again. This resulted in the following entry in tracker-server.log


2017-04-11 23:07:47  INFO: Position filtered by Future filters from device: 359710040103591 with id: 30

This seems to have resolved the "Device State frozen in time" problem.

marc7 years ago

A bit more about using the filter.future > {seconds} to filter out corrupted messages.

To make filter behaviour predictable ensure the GPS device's timezone configuration is matched to the server timezone. Because the GPS location report data contains the time and date stamp that's compared with server local time.

When unmatched, this kind of message is received: (decoded gps103 example shown)

2017-04-17 12:42:36:  imei:359710040657075,tracker,1704171942,,F,141515.000,A,5153.3093,N,00026.2566,W,0.00,0;

GPS device is 7 hours ahead of server time, resulting in server.log entry:

2017-04-17 12:42:37  INFO: Position filtered by Future filters from device: 359710040657075 with id: 21

With a gps103 device the timezone configuration can be set with command:

**,imei:xxxxxxxxxxxxxxxx,I,hr

where xxxxxxxxxx is the device imei number and hr is the time zone number 0 to +12 to -12 hours. For instance:

**,imei:xxxxxxxxxxxxxxxx,I,1
**,imei:xxxxxxxxxxxxxxxx,I,-7
**,imei:xxxxxxxxxxxxxxxx,I,4

Another thing to be aware of is the effect of altering the matching of timezones while connected to server. I don't know enough about effects other than to restart the server after making changes.

Anton Tananaev7 years ago

I would recommend setting up UTC timezone on the device, not server timezone.

marc7 years ago
I would recommend setting up UTC timezone on the device, not server timezone.

Question. On the Traccar server's filter.future function, which timezone is referenced when testing the incoming message from device? Is it system time the Traccar server runs on, or is it UTC?

I'm wondering should the server ideally need to be on UTC. My 'server' is a portable (laptop) computer behind a home wifi router.

Anton Tananaev7 years ago

It doesn't matter what timezone the server is. It doesn't have to be UTC.

marc7 years ago

I've found if GPS device timezone is configured ahead of server timezone then the filter.future function discards every incoming message from that device.

Anton Tananaev7 years ago

That makes sense to me.