Version 1 (modified by trac, 7 years ago) ( diff )


For a more general overview of our GPS modules, please see our Main GPS Page for more information.

Hardware Mappings

Please see this page for which serial port the GPS is on

OpenWrt GPS configuration and GPSD

OpenWrt supports the popular opensource gpsd application:

The configuration for gpsd is stored in /etc/config/gpsd and accessible via uci:

uci show gpsd

One must configure the following.

  1. The port is typically 2947 but can be changed if desired
  2. device is where the GPS chip is mapped on the board, please see the Hardware Mappings above
  3. To test gpsd from an external computer, you will need to set the listen_globally variable to true. Modify it using a editor like vi or uci commands.

Example output:

root@OpenWrt:/# uci show gpsd

gpsd is a service and therefore can be started and stopped with the standard commands.

/etc/init.d/gpsd start

To verify the GPS data output, you can cat the serial port that the GPS is mapped on. For example, on the GW2388, the GPS is mapped to COM2 port (ttyS2): Please view product manual for correct port or Hardware Mappings above

Note: Ventana may spit out binary OSP mode

root@OpenWrt:/# stty -F /dev/ttyS2 4800 ;# set baudrate to 4800bps, also possibly 9600
root@OpenWrt:/# cat /dev/ttyS2


You can also install a gpsd client such as xgps and test it via an external PC.

Example shown below has a Gateworks board at on the network. A Linux Desktop PC is running at and has xgps installed:


No image "xgps.png" attached to OpenWrt/GPS

For a Windows client, please search on Google and refer to the gpsd page where it lists:

Applications that presently use gpsd include pyGPS, gpsdrive, Kismet, GPSdrive, gpeGPS, position, roadmap, roadnav, navit, viking, tangogps, foxtrot, opencpn, obdgpslogger, geohist, LiveGPS, geoclue, qlandkartegt, gpredict, OpenCPN, gpsd-navigator, gpsd-ais-viewer, and firefox/mozilla.

Hardware-specific init scripts

Some hardware may require configuration each time you boot that you likely want place in an init-script. For example:

  • specific AT commands to enable/configure NMEA mode
  • software controlled USB steering (for boards that route USB to front-panel by default but need to have USB routed to PCIe slot for a PCIe USB modem with GPS support)

Option Globetrotter GTM671WFS

The Option Globetrotter modules combine multiple features into a single device. The GPS module on supported devices has a serial port to control/configure the GPS and another serial port to obtain data from the GPS. By default the data port does not display NMEA messages and must be enabled with the following AT commands:


An OpenWrt init script can be created for performing this on bootup. Here we add a UCI configuration ctrl_device to the gpsd configuration to describe the configuration serial port:

  • create and enable a gps init script
    cat << EOF > /etc/init.d/option_gps_init
    #!/bin/sh /etc/rc.common
    # Copyright (C) 2009
    boot() {
        config_load gpsd
        config_get ctrl_device core ctrl_device
        [ "\$ctrl_device" ] || exit
        logger -t "gps" "Initializing GPS on \$ctrl_device"
        echo -e -n "AT_OGPSMODE=1\015" > \$ctrl_device
        echo -e -n "AT_OGPS=2\015" > \$ctrl_device
    chmod +x /etc/init.d/option_gps_init
    /etc/init.d/option_gps_init enable
  • specify UCI config used by the init script above:
    uci set gpsd.core.device=/dev/ttyHS1
    uci set gpsd.core.ctrl_device=/dev/ttyHS2
    uci set gpsd.core.enabled=true
    uci commit
  • and make sure gpsd is enabled on boot:
    /etc/init.d/gpsd enable
Note: See TracWiki for help on using the wiki.