My GL-X3000 arrived this week, and I tried to configure its GPS capabilities, since the 5G model contains a pretty nice multi-constellation GPS receiver.
The use-case for this is to make the receiver available on the local network via the gpsd protocol, so that it can be used by navigation software/hardware if needed. Of course it is not meant to replace a dedicated high precision GPS, but rather as a backup in case the main GPS fails.
It was surprisingly easy to get it configured, so I thought I’d share the steps I took, I’m curious to learn if others thing it is useful (and a “Enable GPS” page on the admin UI would actually be super nice )
Step 1: enable GPS on the 5G modem.
You can do this by sending manual commands on the admin page for the modem:
AT+QGPSCFG="autogps",1
AT+QGPS=1
This should turn on GPS autostart whenever the router reboots, as well as start GPS acquisition right away.
The GPS will start streaming NMEA sentences to /dev/mhi_LOOPBACK
right away.
Step 2: install and configure gpsd
You can install gpsd via the Plugins page below “Applications”
Then, just ssh into the router and configure it:
uci set gpsd.core.device='/dev/mhi_LOOPBACK'
uci set gpsd.core.listen_globally='1'
uci set gpsd.core.enabled='1'
/etc/init.d/gpsd enable
/etc/init.d/gpsd start
That was all I had to do to get a gpsd server enabled on the router’s local network. I tested this with nav software and got a 3D fix almost immediately, even though I was testing from inside a house.
gpsd
continued to work after a reboot as well.
Let me know if you think this is useful, and if there’s any chance this can be enabled in a future Admin panel option!
Extra credit:
You can also configure your GPS to output/use specific GNSS constellations (settings are saved in NVRAM):
# Enable Glonass, Galileo, Beidou NMEA sentence output
AT+QGPSCFG="glonassnmeatype",1
AT+QGPSCFG="galileonmeatype",1
AT+QGPSCFG="beidounmeatype",1
And you can enable/disable GNSS constellations using AT+QGPSCFG="gnssconfig"
:
- 0 is “only GPS”, 1 is “all on”, etc…