szekla
Posts: 1
Joined: Sat Sep 22, 2012 3:33 pm
Location: Poland
Contact: Website

gps not working

Sat Sep 22, 2012 3:52 pm

Hello everyone

I cannot get cgps display GPS output
I have installed gpsd, gpsd-clients, python-gps packages
I am using holux m 215 gps receiver that identifies itself with lsusb as 10c4:ea60 Cygnal Integrated Products, Incorporated. cp210xUart bridge
when I look up the dev catalogue there is a file called @gps0
therefore I try to run
pi@raspberrypi:~$ sudo gpsd /dev/gps0 -F /var/run/gpsd.sock

then I try
pi@raspberrypi:~$ cgps -s
sadly there is no communication with GPS. After a second or so, there is a timeout message from cgps.
Any ideas?

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: gps not working

Wed Sep 26, 2012 4:30 pm

only time I used a gps with linux I used setty on the /dev/tty-gps-or-whatever
then was able to cat the data off the /dev/ttygpsow
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

pjac
Posts: 11
Joined: Tue Apr 17, 2012 3:41 pm

Re: gps not working

Mon Oct 22, 2012 10:47 pm

I found restarting gpsd could help - this was using a USB-serial Microsoft GPS-360 dongle (blog post).

cdaaawg
Posts: 4
Joined: Tue Jan 08, 2013 6:42 am

Re: gps not working

Wed Jan 09, 2013 7:12 pm

I get the same timeout problem when running cgps. Also, xgps doesn't seem to be receiving data from gpsd. However, when I run

Code: Select all

gpsmon /dev/ttyUSB0
correct time and location data is displayed.

sonicvanajr
Posts: 1
Joined: Wed Apr 24, 2013 4:15 am

Re: gps not working

Wed Apr 24, 2013 4:18 am

The trick to this is to pass the "-n" flag to gpsd.

-n
Don't wait for a client to connect before polling whatever GPS is associated with it. Some
RS232 GPSes wait in a standby mode (drawing less power) when the host machine is not
asserting DTR, and some cellphone and handheld embedded GPSes have similar behaviors.
Accordingly, waiting for a watch request to open the device may save battery power. (This
capability is rare in consumer-grade devices and nonexistent in USB GPSes which lack a DTR
line.)

lyonzy
Posts: 1
Joined: Sat May 25, 2013 2:29 pm

Re: gps not working

Sat May 25, 2013 2:31 pm

@sonicvanajr you're a genius - works a charm :)

thijsjek
Posts: 23
Joined: Mon Jun 03, 2013 8:35 pm

Re: gps not working

Sat Jun 22, 2013 7:18 pm

sonicvanajr wrote:The trick to this is to pass the "-n" flag to gpsd.

-n
Don't wait for a client to connect before polling whatever GPS is associated with it. Some
RS232 GPSes wait in a standby mode (drawing less power) when the host machine is not
asserting DTR, and some cellphone and handheld embedded GPSes have similar behaviors.
Accordingly, waiting for a watch request to open the device may save battery power. (This
capability is rare in consumer-grade devices and nonexistent in USB GPSes which lack a DTR
line.)
Hey Sonicvanajr,

It helped me too, Thanks a lot!

paddi2013
Posts: 24
Joined: Wed Jul 17, 2013 4:30 am

Re: gps not working

Thu Jul 25, 2013 7:05 am

sonicvanajr wrote:The trick to this is to pass the "-n" flag to gpsd.
" $ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock "

Where exactly should I put the "-n" ? Please and thank you

User avatar
joan
Posts: 14362
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: gps not working

Thu Jul 25, 2013 7:51 am

paddi2013 wrote:
sonicvanajr wrote:The trick to this is to pass the "-n" flag to gpsd.
" $ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock "

Where exactly should I put the "-n" ? Please and thank you
Most programs don't care about the order of options.

Use

man gpsd

to check if gpsd does.

paddi2013
Posts: 24
Joined: Wed Jul 17, 2013 4:30 am

Re: gps not working

Mon Jul 29, 2013 7:48 am

thx man, appreciate it :)

BuryMisiek
Posts: 1
Joined: Sat Dec 21, 2013 11:07 am

Re: gps not working

Sat Dec 21, 2013 11:11 am

For me that fix didn't help. If i try to:
gpsd /dev/ttyUSB0 -n -N
I'm getting
gpsd:ERROR: can't create IPv6 socket
gpsd:SHOUT: vendor/product match with 091e:0003 not found
gpsd:ERROR: PPS ioctl(TIOCMIWAIT) failed: 25 Inappropriate ioctl for device
gpsmon works fine and I'm getting data. Some ideas about that ?

koza
Posts: 2
Joined: Thu Sep 18, 2014 6:11 pm

Re: gps not working

Sun Dec 13, 2015 2:46 pm

Hello Guys,

I know topic is old, but maybe I can help someone in the future.

I have USB GPS (HOLUX 215) and Raspbian. To make it work, I had to go through the following steps.

STEP 1:
Install drivers:

Code: Select all

sudo apt-get install gpsd gpsd-clients python-gps
STEP 2:
then run daemon gpsd

Code: Select all

sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock  
(not needed in my case! it was automatically added to the processes - you can check if it is a case in your case with ps -ef, also -n is not needed with USB)

and then

Code: Select all

cat /dev/ttyUSB0 
didn't return any results (nor my custom application in C).

STEP 3 - solution:
The solution is (after 5 hours of debugging...) that the serial port speed is not properly set. To set it, type:

Code: Select all

stty –F /dev/ttyUSB0 4800
Hope I will help someone with this small simple command :).

Greetings from windy Warsaw, Poland!

Koza

paulbirch
Posts: 5
Joined: Tue Jan 19, 2016 10:06 am

Re: gps not working

Tue Jan 19, 2016 10:18 am

Hi
Although old thread I get the same issue
BU 353 GPS via usb
gpsmon gives me lots of data

I have tried the -n flag and started undaemonized
pi@mrreese:/dev/serial $ sudo gpsd -n -N -D3 -F /var/run/gpsd.sock
gpsd:INFO: launching (Version 3.11)
gpsd:INFO: listening on port gpsd
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 110
gpsd:INFO: startup at 2016-01-19T10:12:46.000Z (1453198366)

when I start cgps -s on another terminal session gpsd gives me
gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.11","rev":"3.11-3","proto_major":3,"proto_minor":9}\x0d\x0a
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};\x0a
gpsd:CLIENT: => client(0): {"class":"DEVICES","devices":[]}\x0d\x0a{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}\x0d\x0a

cgps stops on the terminal after 4-5sec with
cgps: GPS timeout

and gpsd comes back with
gpsd:INFO: detaching ::1 (sub 0, fd 7) in detach_client

I have tried setting speed of ttyUSB to 4800 and other speeds

any help really appreciated

SonOfAMotherlessGoat
Posts: 690
Joined: Tue Jun 16, 2015 6:01 am

Re: gps not working

Wed Jan 20, 2016 6:55 am

What messages do you get if you increase debug level from 3 to 5?
Account Inactive

ayrton88
Posts: 2
Joined: Wed Feb 22, 2017 4:26 pm

Re: gps not working

Wed Feb 22, 2017 4:29 pm

Hello,

I have the same issue, I tried everything in this page but nothing really worked.
When I run the
sudo cat /dev/ttyUSB0 I dont get any data either

I have tried to connect it using the UART too, but that didnt help either.
Any ideas?

dloranger
Posts: 34
Joined: Wed Nov 02, 2016 1:56 am

Re: gps not working

Fri Jun 09, 2017 5:43 pm

I too was fighting with the GPS (mine comes through on the serial port), I could not get cgps -s, or gpsmon to see any birds.

Found this https://learn.adafruit.com/adafruit-ult ... i/use-gpsd
which has the following nuggets that got everything up and running for me

Code: Select all

sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.sockett
followed by relaunching gpsd with the settings you want

Code: Select all

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock


note I changed ttyAMA0 to use the "serial0" or "serial1" as recommended (forget where but I discovered that yesterday trying to figure out the serial port stuff) for compatibility between pi hardware revisions.

There is also this that describes using the PPS signal for higher accuracyhttps://forums.adafruit.com/viewtopic.p ... 60#p359668


hope this helps someone

PiNambiAgas
Posts: 1
Joined: Thu Mar 08, 2018 7:48 pm

Re: gps not working

Thu Mar 08, 2018 7:50 pm

Hello All,
Really needed help! cygnal integrated products GPS is always showing NO FIX!
pls help me out I got to do this

ripperon
Posts: 1
Joined: Tue Jan 22, 2019 3:03 am

Re: gps not working

Tue Jan 22, 2019 3:06 am

I can solve with this.
First take out the GPS on my window after that change the voltage from 3.3V to 5V and wait for connect to satelites
I did use the gpsmon for monitoring

Return to “HATs and other add-ons”