Skip to content

GPS Configuration

Configure the GPS Device Service Daemon Connection

Before starting the GPS Device Service, a GPS daemon must be running. The device service can connect to a daemon running on either the same host or a different host.

Linux comes with a daemon called gpsd that can process the information delivered by a GPS device. To install gpsd use the command:

sudo apt-get install gpsd

To start the GPS daemon locally, complete the following steps:

  1. First, stop the GPS daemon to ensure that it is not already running or connected to an unintended device using the following commands:

    sudo systemclt stop gpsd
    sudo systemctl stop gpsd.socket
    
  2. Check that the GPS daemon port is not in use, using the following command, replacing <gpsd_port> with the port number of your GPS daemon. The default port number is usually 2947.

    netstat -aon | grep <gpsd_port>
    

    The result is empty if the port is not in use.

  3. Ensure the GPS daemon has privileges to attach to the device using the following command. Replace </dev/tty> with the address of your GPS device on the host.

    sudo chmod 777 </dev/tty>
    
  4. Start the GPS daemon, using the following command. Replace </dev/tty> with the address of your GPS device on the host.

    gpsd -N -n -G </dev/tty> -D1
    
  5. Check that the GPS daemon port is now in use using the following command, replacing <gpsd_port> with the port number of your GPS daemon.

    netstat -aon | grep <gpsd_port>
    
  6. With the GPS daemon running, the GPS Device Service driver configuration must be set to point to this daemon.

    • To do this, you must create a local copy of the docker-compose.yml before starting the GPS Device Service. This is described in Docker Compose Files.

    • Once you have created a local file, you can update the environment section in the device-gps entry as described in the following table:

    Environment Variable Description
    Driver_GpsdHostname The IP address of the host running the GPS daemon. When not specified, the default is 0.0.0.0
    Driver_GpsdPort The port that the GPS daemon is running on. When not specified, the default is 2947
    Driver_GpsdMode The connection type to the GPS daemon. When not specified, the default mode is nopoll
    • Set to poll to maintain a constant connection with the GPS daemon
    • Set to nopoll to connect to the GPS daemon only to obtain the result of a GET request and then disconnect

    • Edge Xpert should then be started from the directory containing your local docker-compose file.
Back to top