Adding QCDM messages to enable USB760 GPS

Kevin Baker kbaker+nm at gmail.com
Thu Nov 21 22:53:17 PST 2013


Hi all,

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

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.

Thanks in advance for any help, and thanks for all the work
on ModemManager!!!

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20131122/a110f2cc/attachment-0001.html>


More information about the ModemManager-devel mailing list