Skip to content

nmea-source: Fixes and improvements

Maciej S. Szmigiero requested to merge (removed):nmea-source-fixes into master

This MR contains a few fixes and improvements for the Network NMEA source.

First, some network NMEA sources (like, for example, some Android phones with the "Share GPS" app) use '\r' as their NMEA sentence delimiter.

Let's support this delimiter for the Network NMEA source together with the more common '\n' (or any combination of these).

Second, currently only Modem-GPS is supported as a provider of a location to submit to MLS. Let's also allow Network NMEA as such source if Modem-GPS is disabled in the config (to ease the implementation until !68 fixes the relevant code and maybe provides support for multiple concurrent submission providers).

Third, fix a few things in this source:

  • Try to reconnect a broken Avahi client each time the source is started so a restarted or late-started Avahi daemon won't cause this source to stop working,

  • Try to reconnect to a network NMEA service if its connection drops for any reason (they are often provided by mobile phones which are known for having aggressive network connection management to save power),

  • Don't add duplicate Avahi services to the service candidates list,

  • Fix a few memory leaks and random bugs.

Tested under Valgrind.

Merge request reports