I installed the MC7455 module to my Computer and now I can connect to the Internet by mobile broadcom. But, how can I read out the received NMEA GPS data on Ubuntu?
Which device in /dev/ is the gps receiver? Do I need to activate the gps functionality?
Assuming the normal, non MBIM configuration the /dev/ttyUSB devices will enumerate in the following order.
/dev/ttyUSB0 - Diagnotics Monitoring (DM) port
/dev/ttyUSB1 = GPS NMEA port
/dev/ttyUSB2 - AT commands
The NMEA port might have frames coming out of it on power up, this does not necessarily mean the GPS is running and you will need to turn it on using the appropriate commands.
Hi Matt, thank you for the technical note. Which program do I need for sending the described commands for enabling GPS? As far as I understood I only need a serial terminal program, but I don’t know the serial settings (baudrate, parity, etc.) of the MC7455 module. Could you please serve these Information?
For Linux minicom is kind of the standard terminal (sudo apt-get install minicom), for Windows there are lots of options but teraterm is a pretty good one which is free. Since it is USB the serial comms parameters are irrelevant, USB takes care of these automatically so it can be set to anything.
The EM7455 I got from Lenovo was preconfigured with these GPS settings, which looks like sane defaults to me - allowing the GPS to be turned off when not in use:
But this mode requires “something” to write “$GPS_START” to the NMEA serial port to actually activate it (this is a well-known Qualcomm thingy from the past). I believe the GobiSerial driver might take care of that if you were using it? But if you use the distro default qcserial driver, then you need some userspace application to write the command to the serial port. It’s as simpe as echo’ing to the port, but doing that manually is of course a hassle.
What I do, is using gpsd with a primitive hook script:
root@miraculix:/tmp# cat /etc/gpsd/device-hook
#!/bin/sh
# $Id: device-hook,v 1.2 2016/07/09 19:26:07 bjorn Exp $
#
# gpsd will not poll a device before it is opened, at which time this script is called
# This means that we can unconditionally add the GPS without wasting any power, It
# will be activated when the first client connects to gpsd, and this script is called
#
# gpsd will also deactivate the port after some inactivity period
# figure out the parent usb device
USBDEV=`ls -l "$1" |sed -ne 's!^c......... [0-9]* [^ ]* [^ ]* \([0-9]*\), \([0-9]*\) .*!/sys/dev/char/\1:\2/device/../..!p'`
# silently ignore any non-USB ports
if [ ! -r "$USBDEV/idVendor" ] || [ ! -r "$USBDEV/idProduct" ]; then
exit 0
fi
VID=`cat "$USBDEV/idVendor"`
PID=`cat "$USBDEV/idProduct"`
case "$2" in
ACTIVATE)
CMD=START
;;
*)
CMD=STOP
;;
esac
case "$VID:$PID" in
"1199:9071" |\
"1199:9079" )
echo \$GPS_$CMD >"$1"
;;
*)
;;
esac
exit 0
This way, you can just fire up any application using gpsd, like gpspipe, xgps, foxtrotgps etc, and gpsd will automatically enable and disable the MC7455 GPS as required. Nice power savings combined with easy usage.
You also need to make the NMEA port available to gpsd of course. I do that automatically with a couple of udev rules (abusing the fact that Sierra always use USB interface number 2 for the GPS NMEA port):
Since you got this unit from Lenovo you really need to go back to them for this I had assumed it was a standard unit but PC OEM ones are special and have to be supported through the PC manufacturer.
That was me, not RightFred who asked the original question. I don’t think Lenovo offer any MC7455 modules anyway
Sorry, wasn’t my intention to hijack this thread by mentioning Lenovo. I’ll be more careful the next time, referring only to the MC7455 modules I got from Sierra. It’s just so much more convenient to test on the device inside my laptop