- A Voyager's Companion

usb gps cannot get fix
Page 1 of 1

Author:  kenkoknz [ 26 Jan 2013, 15:43 ]
Post subject:  usb gps cannot get fix

I installed navigatrix on a vaio laptop (dual boot). In my haste, during the installation, there was a message (I did not take particular note of the exact msg, but I think is something about a newer version of some program), I just click ok and installation was completed ok.
However I just cannot get gps fix on cpn. The program recognised the gps, just cannot get any fix, almost as if it is looking at the wrong region.

If I reboot from the windows partition and use memory map (a navigation program for windows) the gps works good, hence eliminating hw issues.

Would appreciate if anyone can assist.
New Zealand

Author:  Moe [ 26 Jan 2013, 21:53 ]
Post subject:  Re: usb gps cannot get fix

Let's find out where the data is not getting through.

Since we don't know what happened, we'll start at the beginning.

With the gps plugged in the easiest surefire method is to look to xgps

From the terminal execute:


...or if you're shy;
Manta> Navigation> GPS Satellites

I know it''s really an eagle ray, but I just like "Manta" better....

This will give you something like this:
xgps_020.png [ 63.15 KiB | Viewed 17912 times ]

as you see the the application is picking up the data from the gpsd, and the signal shadow from the building on the southwest side.

If you have something similar, with or with signal shadow, the gpsd is doing it thing.

You can check other applications, and will get the same result gpsmon, cgps; or shy people: Manta> Navigation> GPS Panel. They all do the same thing.

If you have data at this point we'll go to the next.

OpenCPN. Open the Tool menu and then the GPStab. If you still have OpenCPN 2.5 it will looks like:
ocpn_toolbox_gps.png [ 60.85 KiB | Viewed 17912 times ]

OpenCPN read the data from Network LIBGPS if you select something other it will fight with the gpsd...and loose.

For funzies tick the Show GPS NMEA data box to see if the NMEA sentences stream by.

The data speed setting is not important.

Check those out. If you have installed another version of OpenCPN then there might be some additional configuration.

Let me know how it goes.

Author:  BruceS [ 27 Jan 2013, 00:31 ]
Post subject:  Re: usb gps cannot get fix

OK, while we're on this subject, how come in the opencpn app the display won't show satellites? (Dashboard)
It shows co-ords & direction etc.
I think it's while only when it's in opencpn in Navigatrix because if I'm in Windoze & open OpenCPN it's OK.

Author:  Moe [ 27 Jan 2013, 01:09 ]
Post subject:  Re: usb gps cannot get fix

The interface that OpenCPN has with the gpsd (through Network LIBGPS) does not parse the data supplied by the gpsd....and/or the Dashboard plugin doesn't parse the data.

It is my understanding the folks at OpenCPN are working to make their interface more compliant with gpsd, but right now it's pretty; time, etc. Satellite signal strength and ephemeris goes well as time being overlooked in the Dashboard.

The "real" gpsd interface that OpenCPN has, from 3.02 on down, is for an older version of gpsd. There's finger pointing about a mismatch with claims that one eats the data the other says that they are not looking in the right place.

If you want satellite ephemeris, signal strenght, and dilution of precision calculations there's xgps; gpsmon; cgps even gippy ( Manta> Navigation> GPS Panel ) will provide Horizontal Dilution Of Precision and the number of satellites used....go figure.

Author:  Moe [ 27 Jan 2013, 01:57 ]
Post subject:  Re: usb gps cannot get fix

Bruce, for funzies I ran a test.

A direct connection between OpenCPN and the GPS provides the data.
Through Network LIBGPS (OpenCPN's method of connecting to gpsd) data disappears.

In the OpenCPN beta 3.1.1something where they open a proper port to listen to the gpsd, time and the number of satellites appear in the Dashboard (and Moonphase works), but still no ephemeris and signal strength. You decide.

Author:  kenkoknz [ 28 Jan 2013, 02:28 ]
Post subject:  Re: usb gps cannot get fix

Hi Moe,
Thanks for your quick response.
I loaded the panel and captured the nmea sentences, so obviously the gps is talking to the sw ok:


The last sentence does not seems normal,
any clues; what does mode:0 and "ept" means?

Author:  Moe [ 28 Jan 2013, 03:12 ]
Post subject:  Re: usb gps cannot get fix

It tells me that at 06:30UTC you weren't getting a position fix.

I don't know if that was because it was coming online from a cold start or if there's something going on....or not going on as the case maybe.

0=no mode value yet seen, 1=no fix, 2=2D, 3=3D

When you have a fix the mode will be 2 or 3

ept is an estimated timestamp error (time in seconds with 95% confidence). Present if time is present.

The gps will also do the same for the x,y,z the later case it's epv for vertical.

The gps will also kick out "dilution of percision" calculations (gdop; tdop ; vdop; xdop; ydop; hdop; pdop ) so we can all go wild.

So I don't make a mess in explaining, and confuse myself in the process, if you're curious check out wikipedia. When I was getting my feet wet I found the following URL to be helpful.

But the real question...after the gps has been running do you get a fix in any of the applications?

Author:  kenkoknz [ 28 Jan 2013, 04:24 ]
Post subject:  Re: usb gps cannot get fix

hi Moe,
As I mentioned before in the windows partition, the chart plotter application "memory map" works with the gps before; However when I retried as u suggested, the gps took a long time to get a fix.
I think I might found the root of the problem; seems to be a strange hw fault with the usb port (psu?). What I did was to connect a usb hub and connect the gps via the hub and for the first time the gps works with navigatrix & cpn.
This is quite crazy as the usb on the laptop always works with other devices. I can only assume that the gps is very sensitive to the usb's voltage as the usb hub has its own supply. strange it works with other devices though & the usb was delivering nmea sentences, just not getting fix. I will do a bit more investigation. Thanks for all your suggestions. Might have to try on another laptop! Always good to get somewhere!

Author:  Moe [ 28 Jan 2013, 07:22 ]
Post subject:  Re: usb gps cannot get fix

It could be a number of things. Frequently, where there is a problem, it revolves around a hotplug issue.

When you plug in the gps it creates an event. This starts a series of activities. The gps is assigned a 'port' ( /dev/ttyUSBX ....where X is a sequence). Ideally, the first thing becomes 0; the next becomes 1; if I plug in something else it becomes /dev/ttyUSB2...and so on.

The gpsd picks up on this event and begins a protocol exchange with the newly assigned gizmo. If it is a gps the gpsd hangs on to it validates and ships. It will do this until the cows come home.

When the gps is unplugged the gpsd waits a respectable amount of time for additional data and then moves on looking for the next gps to send data.

If no gps is re-attached then nothing happens. But if another gps is attached the process starts over again.

The new device is assigned a location (/dev/ttyUSB-whatever) in the sequence of devices already assigned.

The problem come with assigning things in sequence. 1, 2, 3 things might have been removed...or they might just be very very very quiet. Computers don't know anything.

If something hasn't been removed (but quiet) there will be a what's a dumb computer to do?

It follows a set of rules. If there is not a response after a period of time it can reuse an on old number.

If that time has not will increment to the next higher number. The cool kids call this port hopping.

Now, lets take a look at two situations; 1) Someone plugs;unplugs; and replugs a gps before this time has lapsed. 2) there's a short, or loose USB connector that makes/breaks the connection just like some monkey repeatedly plugging and unplugging that thing sticking out the side.

The location of that gps will increment to the next number in the sequence and continue increment in sequence if that time period has not lapsed.

Take a look at the following screenshot. You will see that the gps is attached to /dev/ttyUSB14
xgps_027.png [ 68.56 KiB | Viewed 17894 times ]

I have only 3 USB ports, so I must have a monkey....or a short.

Some client applications hang tough and can reconnect when the gpsd picks up the *new* gps...others have to be restarted, or told to make another attempt to receive data.

Humour me and my little monkey and conduct an experiment....

Fire up xgps (Manta> Navigation> GPS Satelllites) and see what happens. It is a fairly robust client that can roll with the punches.

It takes a few seconds for the gpsd to become acquainted so bear that in mind. Swapping faster than 0.75 second just grinds everything to a halt and it is possible to lock up xgps..just restart it.

If you don't have a monkey you'll have to do the work yourself but un/plug a few times. Watch what happens. When you get some data streaming give it a little wiggle.

Let me know how it goes, and if it was just a waste of time.

Author:  kenkoknz [ 28 Jan 2013, 15:38 ]
Post subject:  Re: usb gps cannot get fix

Hi Moe,
Just like the way you explain things, you make it so easy to understand. I will see if I can get the monkey to plug & unplug the gps a few times and to check the voltage on the usb socket and the usb sockets! ha ha ha...This would also make sense if there is an inttermittent connection between the gps dongle and the laptop.
If you visit NZ, drop us a line, will show u around.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group