GM_Soulless
Posts: 4
Joined: Mon Feb 22, 2016 10:19 am

Issue: GlobalSat GPS Reciever w/ Raspbian

Mon Feb 22, 2016 10:45 am

Ok, I'm somewhat new to Raspbian, but trying to get something (which according to all sources should be simple) set up with my Raspberry Pi-
Linking a GPS reciever (a GlobalSat BU-353S4) with my Raspberry Pi. Followed instructions found on several other user's posts, however I'm repeatedly running into issues (despite trying to follow what other users tried with the same issues).
The issues:
-When I run the GPS receiver through the Win10 computer next to my Pi, it instantly starts outputting data, however while leaving the receiver in the same spot, plugged into the pi the command "cgps" ( with -s or without) gives NO FIX and goes to a GPS Timeout. This seems to happen no matter how long I leave the gps to wait for, and the LED on it is flashing, which according to the manual means it does have a fix.
-If I try -N -D 2 with my gpsd command (sudo gpsd /dev/ttyUSB0 -N -D 2 -F /var/run/gpsd.sock) I get :
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
I've tried the cycle of killall gpsd/restart ntp but it still just does the same two things mentioned above- no fix, and already in use.
-Also of note, if I try to cat the port (cat /dev/ttyUSB0) I do get what looks like co-ord data:
Image
https://anonm.gr/f9d7.png is the link for the image if it's a bit hard to see
But this somehow isn't being used...?
Anyone able to help? I'm getting rather frustrated here, have been going in circles for hours.

beampoweramp
Posts: 21
Joined: Fri Jan 05, 2018 10:05 pm

Re: Issue: GlobalSat GPS Reciever w/ Raspbian

Fri Jan 19, 2018 11:11 pm

first you have to install gpsd and gpsd-client
sudo apt-get install gpsd gpsd-clients python-gps

then plug in your GlobalSat GPS receiver.
check that it is recognized as ttyUSB0 by running ls /dev
you should see a device at ttyUSB0
or try ls /dev | grep USB to filter out only devices with the name USB

then run gpsmon /dev/ttyUSB0
gpsmon sets up as a nice graphical interface

there are two other programs that come with gpsd: cgps and xgps.
though sometimes the only way I can get these to work is to run the program first, then unplug and plug back in the usb device.
and when I do that, I USB device reassigns itself to /dev/ttyUSB1.

stty is supposed to work too, but I am having trouble with that one.
sudo stty -F /dev/ttyUSB0 ispeed 4800 && cat </dev/ttyUSB0
it puts put one character then quits.

by the way, I'm using a GlobalSat USB Dongle model no. ND-105C.

here's a simple Python script to display what's coming out the serial port

Code: Select all

import time
import serial

ser = serial.Serial(
   port='/dev/ttyUSB0',
   baudrate = 4800,
   parity=serial.PARITY_NONE,
   stopbits=serial.STOPBITS_ONE,
   bytesize=serial.EIGHTBITS,
   timeout=1
   )

while 1:
   x=ser.readline()
   print x

Return to “Troubleshooting”