GPS compatible modems.
David McCullough
david.mccullough at accelecon.com
Thu Dec 18 02:54:05 PST 2014
Marc Murphy wrote the following:
> This is all working well with the MC7710 and the MU609. I have an app to use the dbus i/f and enable/disable the modem and get NMEA traces.
>
> I do see a difference in operation though between the Sierra and the Huawei.
>
> In the app I have written I have a context that gets the modem info over dbus and configures it to give GPS;
>
> ctx->modem = mm_object_peek_modem (MM_OBJECT (modems->data));
>
> ctx->object = MM_OBJECT (modems->data);
>
> ctx->modem_location = mm_object_get_modem_location (ctx->object);
>
>
> if (mm_modem_get_state (mm_object_peek_modem (ctx->object)) < MM_MODEM_STATE_ENABLED) {
> gboolean result;
> g_printerr ("error: modem not enabled yet... lets try and enable it\n");
>
> g_debug ("enabling modem...");
> if(mm_modem_enable_sync (ctx->modem, NULL, &error))
> g_debug ("enabled modem...");
> }
> mm_modem_location_setup_sync (ctx->modem_location,
> sources,
> mm_modem_location_signals_location (ctx->modem_location),
> NULL,
> &error);
>
> Once it is all set up then I request the location
>
> mm_modem_location_get_full_sync (ctx->modem_location,
> &location_3gpp,
> &location_gps_nmea,
> &location_gps_raw,
> &location_cdma_bs,
> NULL,
> &error);
>
> And extract the NMEA trace I am interested in.
>
> With the Sierra each 5 second poll of the location info I see the NMEA trace is updating as I can see the time increasing:
> Took 9.000000 seconds to find modem
> Took 1 seconds to enable modem
> Got location $GPRMC,091806.0,A,XXXXXXXXXXXXXXXXXXXXXXX,,,A*44
>
> Took 160 seconds to get lock
> Got location $GPRMC,091811.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*40
>
> Got location $GPRMC,091816.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*40
>
> Got location $GPRMC,091821.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*47
>
> With the Huawei each 5 second poll of the location info I see the NMEA trace is static:
I think when I setup the Huawei code I hardcoded the command to the modem
to only send updates every 30 seconds. There is no update-now option IIRC
and 30 seconds seemed like a fair enough compromise.
Look for "^WPDFR=65535,30" in plugins/huawei/mm-broadband-modem-huawei.c.`
> error: modem not enabled yet... lets try and enable it
> Took 21.500000 seconds to find modem
> Took 1 seconds to enable modem
> Got location $GPRMC,092239.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*7C
>
> Took 55 seconds to get lock
> Got location $GPRMC,092240.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*7C
>
> Got location $GPRMC,092240.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*7C
>
> Got location $GPRMC,092240.0,A, XXXXXXXXXXXXXXXXXXXXXXX,,,A*7C
>
> If I keep killing and running the app it will update the location each time. It is almost as if I have to kill the dbus context and start again for each fetch of location.... is this the way it is intended to be used or is there an issue here ?
I have no idea about this, this is all at a higher level than the
Huawei code, unless you are just hitting the 30 second thing ?
Cheers,
Davidm
> -----Original Message-----
> From: Aleksander Morgado [mailto:aleksander at aleksander.es]
> Sent: 03 December 2014 07:42
> To: Marc Murphy
> Cc: Dan Williams; Yegor Yefremov; David McCullough; modemmanager-devel at lists.freedesktop.org
> Subject: Re: GPS compatible modems.
>
> On Tue, Dec 2, 2014 at 10:10 PM, Marc Murphy <marcmltd at marcm.co.uk> wrote:
> > Thanks for the feedback, now to write the app to get the NMEA from the MM dbus instead of the ttyUSB.
>
> For the Huawei MU609 you'll see that the modem also reports "unmanaged GPS" capabilities in ModemManager. That means that you can use ModemManager to just start/stop GPS, and still read NMEA traces yourself with another application through the TTY (i.e. ModemManager won't parse and expose NMEA traces).
>
> The Sierra MC7710 could do this, but right now it defaults to use QMI for everything (i.e. no TTY with NMEA traces involved at all).
>
> --
> Aleksander
> https://aleksander.es
--
David McCullough, david.mccullough at accelecon.com, Ph: 0410 560 763
More information about the ModemManager-devel
mailing list