paulmandal / atak-forwarder

Forwards packets to/from ATAK over an off-grid communication layer
MIT License
404 stars 42 forks source link

Stale Meshtastic nodes not filtered out #67

Closed a-f-G-U-C closed 3 years ago

a-f-G-U-C commented 4 years ago

The Meshtastic devices keep a persistent list of known nodes, for many days after a node was last seen (even across node reboots - I don't actually know an easy way to take a node off that list). The firmware does, however, provide a lastSeen timestamp in the NodeInfo object to enable a user to determine a node’s freshness and handle it accordingly.

Currently the atak-forwarder plugin appears to pick up this known nodes list on a wholesale basis and without accounting for freshness. As a result, nodes that have been stale for several days can be displayed side-by-side with online nodes, with no ability to discriminate between these cases, causing information pollution.

Suggestion

Define a freshness limit in software (somewhere between 10-30 minutes) and filter out stale nodes on this basis.

paulmandal commented 4 years ago

This should fix it: https://github.com/paulmandal/atak-forwarder/pull/69

Sorry I haven't been around much this week, super busy at work. I am going to be working on Play Store assets and getting everything else ready for signing by the TAK Product Center in the next couple of days.

a-f-G-U-C commented 3 years ago

Thanks for fixing, and don't worry about the delays. I hope all is good at work.

I think the fix was successful in filtering the stale node noise, however now I had one case of an active standalone node that didn't get picked up at all! I didn't get a chance to check the source (will do later today), but: are you still querying the node list from the device at all, or are you relying 100% on transition events?

Asking because this may explain my observation - a pre-existent, unmoving node wouldn't generate transition events and would therefore remain completely undetected by the plugin - which is probably not what we want.

a-f-G-U-C commented 3 years ago

~Yes, issue confirmed. Static non-TAK nodes are not being picked up at the moment.~

a-f-G-U-C commented 3 years ago

This could be just an unfortunate coincidence with a Meshtastic-device issue occurring around the same time. See https://github.com/meshtastic/Meshtastic-device/issues/506

For now, please disregard my previous comment.

a-f-G-U-C commented 3 years ago

closing - not a real issue