mDNS integration

Ankit, on 20 July 2015

This is a progress report for my GSoC project on GPS Sharing.

What's done since the last blog post?

mDNS in Android is to be used for service broadcast, the service is supposed to be named as <hostname>-nmea-tcp-<accuracy_nick>. The accuracy_nick will be a string, defining the accuracy of the source. The accuracy nicks can be found in Geoclue's public api. An example of service name could be geoclue-nmea-tcp-exact. The service type of the broadcasted service is nmea.tcp at port number 10110 in local domain.

Geoclue's Network NMEA source discovers services with _nmea._tcp service type in the local domain. The Network NMEA source keeps a list of services sorted by their accuracy levels (highest first). Whenever a client connects to geoclue, it checks for the service with highest accuracy level and tries to connect with it, which then starts the flow of NMEA GGA sentences from android device.


Note: This a work in progress and is not yet available in the main repository. Android application source can be accessed here. And Geoclue patches here.


EDIT:

Instead of using service name for sharing accuracy with Geoclue, we are now using mDNS TXT records for sharing accuracy of the device.