Author Topic: gpsd - Linux GPS realtime daemon  (Read 5462 times)

andygates

  • Peroxide Viking
gpsd - Linux GPS realtime daemon
« on: 18 March, 2009, 10:13:40 pm »
I'm toying with running JOSM with the realtime GPS and surveyor plugins, because I am a colossal nerd.  Windows XP, eTrex Venture CX.

Ulf says get cygwin, then run it and play "guess the COM port"... so, cygwin is got, and gpsd is started - it looks to have found the GPS on COM4 but stuff connected to the daemon don't find owt...

C:\cygwin\bin>gpsd -b -N -D 2 /dev/com4
gpsd: launching (Version 2.37)
gpsd: listening on port 2947
gpsd: Unable to start ntpshm.  gpsd must run as root.
gpsd: running with effective group ID 513
gpsd: running with effective user ID 1006
gpsd: opening read-only GPS data source at '/dev/com4'
gpsd: speed 9600, 8N1
gpsd: garmin_gps not active.
gpsd: gpsd_activate(0): opened GPS (4)
gpsd: Received terminating signal 2. Exiting...
gpsd: closing GPS=/dev/com4 (4)


...and then gpspipe just gives:

C:\cygwin\bin>gpspipe.exe -w
GPSD,X=1237411404.723875,I=unknown,
GPSD,W=1


(the other COM ports 1-8 all give this:
gpsd: opening read-only GPS data source at '/dev/com6'
gpsd: device open failed: No such file or directory - retrying read-only
gpsd: read-only device open failed: No such file or directory
gpsd: GPS device /dev/com6 nonexistent or can't be read
)

Schoolboy error or am I in intractable nerd-fu land?  Halp!
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #1 on: 18 March, 2009, 11:13:33 pm »
I thought USB appeared as COM-alikes?  I stand corrected.  Arse.  :)
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

inc

Re: gpsd - Linux GPS realtime daemon
« Reply #2 on: 19 March, 2009, 08:30:59 am »
Andy, I have tried a few times to get gpsu working without luck, it is in Linux with XGPS, the daemon is running but it doesn't see the Garmin either through the psudo serial-usb /dev/ttyUSB0 or ( with that blacklisted) the better gpsbabel USB software. it should also work with Viking but doesn't. I was just playing and didn't spend a lot of time on it as I don't have any real use for knowing the position of my computer.

Re: gpsd - Linux GPS realtime daemon
« Reply #3 on: 19 March, 2009, 01:50:00 pm »
I think you'll find that the problem is the lack of any recognisable output, rather than the lack of a connection.
GPS that are intended to send positions to other devices send a position in a standard NMEA format every second, along with other data items such as number of satellites in view, position quality etc. I'd guess that an Etrex isn't doing this - I've never seen it mentioned in such specs as I've seen (given that I don't have one).

Get a 60CSx instead?
This does have a serial/NMEA output as well as the USB.
A cheaper alternative would be one of the small receivers that someone was talking about attaching to his cat. Bluetooth may be easier than USB.

vorsprung

  • Opposites Attract
    • Audaxing
Re: gpsd - Linux GPS realtime daemon
« Reply #4 on: 19 March, 2009, 03:20:06 pm »
I think you'll find that the problem is the lack of any recognisable output, rather than the lack of a connection.
GPS that are intended to send positions to other devices send a position in a standard NMEA format every second, along with other data items such as number of satellites in view, position quality etc. I'd guess that an Etrex isn't doing this - I've never seen it mentioned in such specs as I've seen (given that I don't have one).

Get a 60CSx instead?
This does have a serial/NMEA output as well as the USB.
A cheaper alternative would be one of the small receivers that someone was talking about attaching to his cat. Bluetooth may be easier than USB.


Garmin serial/USB protocol (garmin) might be of interest

I think that trying to get a usb serial to work on cygwin would be not a very productive use of your time

Try booting an Ubuntu CD as "live" and see how you get on

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #5 on: 19 March, 2009, 03:38:06 pm »
That'd have to be persistent to be worth using - otherwise it's "woo, desktop" sans the stuff I want the GPS for: JOSM / Surveyor.
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

vorsprung

  • Opposites Attract
    • Audaxing
Re: gpsd - Linux GPS realtime daemon
« Reply #6 on: 19 March, 2009, 04:19:34 pm »
That'd have to be persistent to be worth using - otherwise it's "woo, desktop" sans the stuff I want the GPS for: JOSM / Surveyor.

Install on a USB stick maybe?
I did this the other day, it works great

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #7 on: 19 March, 2009, 04:57:39 pm »
I did it the other week and it was hell ;)
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

Re: gpsd - Linux GPS realtime daemon
« Reply #8 on: 19 March, 2009, 07:25:58 pm »
I've had a look at ulf's gpsd page, and it looks to me like it's expecting the GPS receiver to send NMEA sentences.
Note the "NMEA Protocol" bits in red on the configuration diagram at the top.

Garmin GPS receivers which are USB only appear not to support the NMEA protocol. There are options for NMEA output on the menus for the older serial Etrexes (eg Summit), but there's nothing listed for the current USB Etrexes.

Summary:
It's not going to work unless you get a new GPS receiver.
It doesn't have to be an expensive one - I should think that any simple pure receiver like the I-GotU in this thread will do.

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #9 on: 19 March, 2009, 07:43:40 pm »
*cracks knuckles*

Right, let's see what alternatives there are...
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

inc

Re: gpsd - Linux GPS realtime daemon
« Reply #10 on: 19 March, 2009, 08:19:20 pm »

Garmin GPS receivers which are USB only appear not to support the NMEA protocol.

I have the 60CSx which is usb only and has NMEA output. I will give it a try with the gpsd daemon when I get a chance.

Re: gpsd - Linux GPS realtime daemon
« Reply #11 on: 19 March, 2009, 08:30:28 pm »

Garmin GPS receivers which are USB only appear not to support the NMEA protocol.

I have the 60CSx which is usb only and has NMEA output. I will give it a try with the gpsd daemon when I get a chance.
The 60CSx has separate serial and USB ports. The big 4-pin socket that the car power lead plugs into is the serial port. You should have got a serial lead which would have had bare wires at the other end. The question is whether it will put out NMEA on the USB port, or whether it's serial port only.

inc

Re: gpsd - Linux GPS realtime daemon
« Reply #12 on: 19 March, 2009, 08:39:19 pm »
According to the gpsu site Compatible GPSes it looks like it works through the usb and rs232.

Re: gpsd - Linux GPS realtime daemon
« Reply #13 on: 19 March, 2009, 09:08:53 pm »
...It doesn't have to be an expensive one - I should think that any simple pure receiver like the I-GotU in this thread will do.

Surprisingly, someone appears to have had a little success with this, see here.  A post right at the end says that you can get gpsd to use it as an NMEA data source.

Code: [Select]
sudo modprobe navman
sudo echo -n "0x0df7 0x0900" > /sys/bus/usb-serial/drivers/navman/new_id

...and then plug the device in.
Actually, it is rocket science.
 

inc

Re: gpsd - Linux GPS realtime daemon
« Reply #14 on: 19 March, 2009, 09:22:13 pm »
I don't know enough about it but I think gpsu will be using the kernel garmin_gps module, which is considered problematic by Robert Lipe the gpsbabel author  so I have it listed in /etc/modprobe.d/blacklist so I can use the gpsbabel usb setup which works fine with Viking and others. I have just tried the NMEA output on my unit without luck but don't know if it needs the RS232 outlet or the kernel garmin_gps module or both.

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #15 on: 19 March, 2009, 09:24:34 pm »
Got it!

GPSgate easily detects the GPS and creates a virtual COM port, then gpsd running under Cygwin picks it up perfectly.   JOSM picks up gpsd as soon as you start Capturing Track in the LiveGPS plugin, and the Surveyor plugin creates one-touch points in JOSM.  

If you have some Garmin models, then Garmin's own freebie Spanner will do the same.  But not for Etrexen (see http://en.wikipedia.org/wiki/Spanner_(Garmin_program) ).  If I find myself making use of GPSgate I'll probably even pay for it.  :thumbsup:

Now for some velcro on the laptop lid...
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

andygates

  • Peroxide Viking
Re: gpsd - Linux GPS realtime daemon
« Reply #16 on: 20 March, 2009, 09:59:00 am »
...what the hell did I do this *for*?  Lugging a lappy around is almost useless! ::-)
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

Re: gpsd - Linux GPS realtime daemon
« Reply #17 on: 20 March, 2009, 10:32:45 am »
...what the hell did I do this *for*?  Lugging a lappy around is almost useless! ::-)

Penance for using the word "lappy".

*bang*
"Yes please" said Squirrel "biscuits are our favourite things."