[RFC] Unmanaged GPS setup / location source

Aleksander Morgado aleksander at aleksander.es
Wed Jul 2 03:38:50 PDT 2014

On Fri, Jun 27, 2014 at 10:51 AM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> I've been asked whether it would make sense to allow having
> ModemManager control the status of the GPS module in a device, *but*
> leaving the tty where the NMEA traces are dumped untouched. This would
> allow to integrate with other standard GPS applications which read
> from a tty, while leaving MM the control over when to enable/disable
> the GPS module.
> Any comments on this?
> I have a draft implementation (mmcli commands not yet done) already in
> the 'aleksander/gps-unmanaged' branch in upstream git, where I just
> define a new MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED source. When this
> source is enabled, GPS module is started but the GPS tty is not used.
> Of course, the implementation also forbids trying to enable unmanaged
> and raw/nmea GPS at the same time. Also, currently only done for
> Option/HSO (the only plugin which does GPS over a tty for now). I may
> add GPS support for Cinterion one of these days as well.

I just merged this; with support for both Option/HSO and Cinterion
PHS8 devices. The new unmanaged GPS support can be controlled with

$ mmcli --location-enable-gps-unmanaged
$ mmcli --location-disable-gps-unmanaged

If you want to also know which is the tty which will have the NMEA
traces, you can get that from the Ports property in the Modem
interface, looking for the port marked as 'GPS'; e.g.:
    ports: 'wwp0s29u1u2i4 (net), ttyUSB1 (gps), ttyUSB2 (at), ttyUSB3
(at), cdc-wdm1 (qmi)'

Modems supporting GPS but *not* providing a tty where to read NMEA
traces from (e.g. QMI modems with PDS service) should *not* expose the
GPS_UNMANAGED location source in the Capabilities property of the
Location interface.

Of course, the unmanaged GPS support needs to be enabled per-plugin as
well, so that the NMEA tty is not controlled when enabling/disabling
the specific source; see e.g:



More information about the ModemManager-devel mailing list