Pure Daft

GPSd, Navilock and Kubuntu

01 Jan 2010

I have a Navilock NL-454US USB GPS which I’ve been trying to connect to my Eee which is running Kubuntu Netbook Edition.

To get it working, I’ve used help from a few sources (here):

HOWTO get it working:

Install the GPS driver and testing program (xgps):

sudo aptitude install gpsd gpsd-clients

Plug in the USB GPS. Find it’s location on the system:

dmesg | grep tty
...
[xxx.xxx] usb 6-1: pl2303 converter now attached to ttyUSB0

When you plug in the USB, it starts GPSd, but not correctly. We have to stop the process and start it again. To stop:

sudo kill -SIGINT `pgrep gpsd`

Attempt to start GPSd, try in debugging mode to ensure it is working:

gpsd -n -N -D3 /dev/ttyUSB0
gpsd: launching (Version 2.39)
gpsd: listening on port gpsd
gpsd: Unable to start ntpshm.  gpsd must run as root.
gpsd: successfully connected to the DBUS system bus
gpsd: running with effective group ID 1000
gpsd: running with effective user ID 1000
gpsd: opening GPS data source at '/dev/ttyUSB0'
gpsd: speed 57600, 8N1
gpsd: Navcom: sent command 0x1c (Test Support Block)
gpsd: Navcom: sent command 0x20 (Data Request) - data block id = ae at rate 00
gpsd: Navcom:
sent command 0x20 (Data Request) - data block id = 86 at rate 0a
gpsd: garmin_gps Linux USB module not active.
gpsd: no probe matched...
gpsd: gpsd_activate(1): opened GPS (5) [pauses ~20s]
gpsd: speed 4800, 8N1
gpsd: Navcom: sent command 0x1c (Test Support Block)
gpsd: Navcom: sent command 0x20 (Data Request) - data block id = ae at rate 00
gpsd: Navcom: sent command 0x20 (Data Request) - data block id = 86 at rate 0a [pauses for ~20s]

This last section repeats four times, testing different speeds, each time pausing for 20s. It then starts cycling through as a server. Or, instead of a 20s pause it does not continue beyond this line and hangs*.

When I Ctrl+C to stop gpsd then reissue the command to start it, sometimes it does not come back again (stopping at * above), and sometimes it does. I cannot see any pattern to when it does or does not work, so I guess it’s something out of my control. To get it to restart, I kill the server, replug the USB, and continue from the kill above.

If it is working, run xgps to view the GPS and satellite data.

Now that I know it takes around 80s for the server to start, I can start it in non-debug mode and use xgps to ensure the server is running. Ctrl+C in the debugging window if it is running. Run the simple command: gpsd /dev/ttyUSB0.

Run xgps and wait (around 80s in my case) for the satellites to display. If they don’t, either start from kill above, or replug the USB and
kill.</div>