Adding QCDM messages to enable USB760 GPS

Aleksander Morgado aleksander at lanedo.com
Thu Nov 21 23:53:09 PST 2013


Hey Kevin!

> 
> I have a Verizon USB760 / Novatel Wireless MC760 CDMA modem which is
> able to support GPS location data internally with an updated firmware
> version. Under Windows it needs a companion app to enable the GPS
> functionality; once this is enabled I can see NMEA data coming out on
> another serial
> port. See: http://support.verizonwireless.com/support/devices/knowledge_base.html/30102
> 
> So far I have logged the QCDM traffic under Windows and isolated
> the messages to strictly what is needed to enable the GPS interface and
> keep it alive, and written a C program to simulate the Windows app's
> traffic. This app works but is an extreme hack (also, doesn't work with
> new versions of MM which actually take the QCDM ports and do more useful
> things with them...) I would like to incorporate this functionality
> properly into MM.
> 
> Pseudocode for the app as written which works:
> 
> * send QCDM keepalive packet to wake up the QCDM interface
> 
> char id_msg[] = { 0x0,0x78,0xf0,0x7e };
> 
> * sleep for 1 second, ignoring any reply but draining receive buffer
> like we actually read the data (after sending each command below as well)
> 
> * send what I think is the GPS enable packet:
> char K0d_msg_x18[] = { 
>     0x4b,0x0d,0x18,0x00,0x00,0x60,0xea,0x45,
>     0x00,0x00,0xe1,0x19,0x07,0x30,0x6e,0x42,
>     0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
>     0x0e,0xbd,0x7e
> };
> 
> * sleep for 1 second, again ignore replies
> 
> then loop forever, sending these:
> 
>     * first a QCDM keepalive packet (id_msg above)
> 
>     * sleep 500 ms
> 
>     * GPS keepalive packet?
>     char K0d_msg_x40[] = {
>         0x4b,0x0d,0x64,0x00,0x0a,0x00,0x01,0x01,
>         0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
>         0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xfa,
>         0xff,0xff,0xff,0xe9,0x03,0x00,0x00,0x00,
>         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
>         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
>         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
>         0x00,0x00,0x00,0x00,0x00,0x77,0x17,0x7e
>     };
> 
>     * sleep 500 ms
> 
> I don't have a clue about the data structure being passed to the modem.
> If you stop the loop repeating the messages, eventually after a period
> of time the GPS module will shutdown and NMEA traffic will stop.
> Unfortunately I have been throwing away the replies from the modem so
> I'm not exactly sure what the device is sending back; or how often the
> GPS keepalive packet should be sent, but I can try to hack these into
> ModemManager and get some better output.
> 
> I also have traces of the full connection log and network registration
> for a USB760 with --log-level=DEBUG: http://pastebin.com/XQvnRX1h
> 

Good, thanks; I added the USB760 to the list of known supported devices:
http://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices

> My thought is to add the existing opaque messages as-is into
> libqcdm commands then add a location setup section
> into plugins/novatel/mm-broadband-modem-novatel.c similar to how it is
> done in the option/..-hso.c driver... is that somewhat correct? I am
> very new to ModemManager's source.
> 

I'm not able to comment on the QCDM specific stuff as that is really
Dan's world, I have not played much with QCDM myself.

But regarding the integration in the Novatel plugin; yes, it would be
very similar to what the HSO plugin has, with one exception: in the HSO
plugin we know beforehand which is the serial port which will expose the
NMEA traces once GPS is enabled, and when we grab it we already mark it
as such (MM_PORT_TYPE_GPS). I'm not sure whether you can reliably know
in the Novatel devices which one will be that port. We may need an
additional step in this case which would, once GPS is enabled via QCDM
or AT, check all the non-AT serial ports that we detected and try one by
one to see which one has the NMEA traces in it (or something like that).


-- 
Aleksander


More information about the ModemManager-devel mailing list