RPi dominate /dev/ttyAMA0 as default serial console
Vi /etc/inittab
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
to:
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
edit /etc/default/gpsd and modify the DEVICES as you want
# Default settings for gpsd.
# Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
# change the options.
START_DAEMON="true"
GPSD_OPTIONS=""
DEVICES="/dev/ttyAMA0"
USBAUTO="true"
GPSD_SOCKET="/var/run/gpsd.sock"
It only starts working after gpsd attempts 4800, 9600, 19200 then finally 38400
Solved by
stty speed 115200 </dev/ttyAMA0
Run
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
Result
xgpscgps
First, you need to run gpsd with ur GPS module
connected by TTY serial, gpsd /dev/ttyAMA0
connected by USB, gpsd /dev/ttyUSB0