Last active
January 21, 2019 00:19
-
-
Save RezhaBlue/a9ac6a0a961566edc6267368e6ffc871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install packages for gps | |
sudo apt-get -y install gpsd gpsd-clients python-gps | |
# set device name and socket name and path | |
sudo sed -i -e "s#^\(DEVICES=\).*#\1"\""$(find /dev/serial/by-id -type l -name \*Silicon\*)"\""#" -e 's#^\(GPSD_OPTIONS=\).*#\1"-F /var/run/gpsd.socket"#' /etc/default/gpsd | |
# reconfigure gpsd svc | |
sudo dpkg-reconfigure gpsd | |
# start gpsd svc | |
# sudo gpsd /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 -F /var/run/gpsd.socket | |
sudo systemctl enable gpsd.socket | |
sudo systemctl start gpsd.socket | |
# ta-dah! | |
sudo systemctl restart gpsd | |
# DEBUG: | |
# cgps -s | |
# cat /dev/ttyUSB0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment