How to connect a USB GPS receiver with myServer
1. Plug in the GPS receiver
After plugging in a GPS / GNSS receiver through the Raspberry Pi USB port, your GPS should be automatically configured. To verify, type the below command.
ls /dev/tty*
You will see the “/dev/ttyACM0” has been created automatically. To further verify if the GPS has been bound to this folder. please type
sudo cat /dev/ttyACM0
The GPS input stream show similar to the below
If you can see the above, which means your GPS receiver works with your Linux computer.
2. Install gpsd
The next step of installation is to bind the “gpsd” daemon to the GPS receiver so that the applications running on Raspbian can access the GPS receiver through the “gpsd” daemon.
The purpose of “gpsd”.
“gpsd” is used to connect applications with the GPS receiver hardware. It manages USB GPS devices so the applications don't have to. In Raspbian, if you set up the “gpsd” properly with GPS receivers hardware, most GPS location aware applications can get the GPS data by calling “gpsd”. Furthermore, “gpsd” shares the GPS receiver for all applications running on this Raspberry PI machine..
To install GPSD, type
sudo apt install gpsd
3. Make gpsd available on boot.
To make gpsd automatic startup on boot, update the /etc/default/gpsd file a below
Make sure
GPSD_OPTIONS="/dev/ttyACM0"
is included in the gpsd config file.
Restart the RaspberryPI, the new setting will take effect.
4.Test gpsd with xgps (optional)
If you are confident the GPS is already working properly, just skip this section.
Now the GPS signal should be available for applications. It is not mandatory but good to confirm that. It can be tried by a tool called “xgps”. XPGS is included in the gpsd-clients package.
To Install gpsd-clients, type
sudo apt install gpsd-clients
After gpsd-clients has been installed, type
xgps
xgps should look similar to this, when the GPS signal is available:
5. Ready to serve.
Now your GPS applications can make use of gpsd to acquire GPS data. Congratulations!
We have tested the below USB GPS/GNSS receivers
work with this instruction. They can be purchased from gpswebshop.com
Configuring the GPS myServer driver
Download and install the GPS driver from myServer's Software Updater.
Select "Add Device" from the Driver Command Testing list.
Example of the command configured:
GPS|AddDevice~GPS1~/dev/ttyACM0~9600,8,n,1~Equipment
The GPS data should then start populating myServer variables in the "sensor_" itemClass
sensor_2_course_latitude
sensor_2_course_longitude
sensor_2_course_speed_mph