Opened 14 years ago

Last modified 14 years ago

#2786 new bug

Live GPS tracking: add support for garmin USB devices

Reported by: dr Owned by: mhugent
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: C++ Plugins Version: Trunk
Keywords: gps, tracking Cc: dr, timlinux
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: yes

Description

Subj. Garmin 60Csx is connected through Spanner (http://en.wikipedia.org/wiki/Spanner_%28Garmin_program%29). In Bob Bruce's GPS tracking plugin all works fine, but not in Live GPS tracking.

Change History (22)

comment:1 by timlinux, 14 years ago

Cc: timlinux added
Owner: changed from timlinux to mhugent

Probably more one for Marco as he implemented the part that does the nmea connection logic.

Regards

Tim

comment:2 by pcav, 14 years ago

Summary: Live GPS tracking does not detected GPSLive GPS tracking does not detect GPS

comment:3 by mhugent, 14 years ago

Hard to reprocude without a 60Csx. To which drive is the virtual serial port of spanner mapped? Does this path appear in the combo box of the gps widget (GPS device port->path to serial device. Maybe it is already enough to add this path to the autodetection list?

comment:4 by lutra, 14 years ago

I also have problems with a 60c while the gpstools work fine. I'll try do further tests.

comment:5 by mhugent, 14 years ago

Awaiting user input: set

comment:6 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:7 by lutra, 14 years ago

Summary: Live GPS tracking does not detect GPSLive GPS tracking: add support for USB devices and nmea format

It seems that usb devices are not supported by design(?) Nevertheless the usb devices work fine (out of the box) with the standard QGIS gps tools, under both Linux (at least Ubuntu) and Windows.

Can the code be reused to support USB devices in the "live gps tracking" tool?

A nmea device can be simulated with the "gpsfake" tool (together with "gpspipe"):

https://www.rigacci.org/wiki/doku.php/tecnica/gps_cartografia_gis/fake_gps

The trick works, tested with the Bob Bruce's GPS tracking plugin.

By the way, Bob Bruce's GPS tracking plugin works also under Linux, regardless it is announced to work just under Windows.

in reply to:  7 ; comment:8 by jef, 14 years ago

Summary: Live GPS tracking: add support for USB devices and nmea formatLive GPS tracking: add support for garmin USB devices

Replying to lutra:

It seems that usb devices are not supported by design(?) Nevertheless the usb devices work fine (out of the box) with the standard QGIS gps tools, under both Linux (at least Ubuntu) and Windows.

Serial devices (including usbserial devices and serial bluetooth) speaking NMEA are supported. Garmin use an other USB protocol.

in reply to:  8 comment:9 by lutra, 14 years ago

Platform: WindowsAll

Serial devices (including usbserial devices and serial bluetooth) speaking NMEA are supported. Garmin use an other USB protocol.

right, sorry for that. Nevertheless usb Garmin units are supported in gps tools, so I hope it will not be too painful to add the support in the "live gps tracking" tool.

comment:10 by macho, 14 years ago

Hi! I can provide a Garmin 60CSx for the Hackfest. I have easy access to one - I guess if the 60CSx is working all other Garmins should work too. Any interest?

comment:11 by lutra, 14 years ago

I can bring my 60c too.

comment:12 by jef, 14 years ago

r14331 adds gpsd support. My garmin etrex HCx now works via GPSD (using the garmin_gps kernel module).

in reply to:  12 ; comment:13 by lutra, 14 years ago

Replying to jef:

r14331 adds gpsd support. My garmin etrex HCx now works via GPSD (using the garmin_gps kernel module).

Hi Jurgen,

I would like to see if it works with my Garmin unit, but I'm not sure what has to be used in the new "device" field when choosing "connect to gpsd".

Please note that if in the above field is written a string that contains a ":" then clicking on "connect" causes qgis to crash

Fatal: ASSERT: "gpsParams.size() == 3" in file /home/gio/qgis/qgis_trunk/src/core/gps/qgsgpsdetector.cpp, line 146
Aborted

in reply to:  11 comment:14 by jef, 14 years ago

Replying to lutra:

I can bring my 60c too.

Unfortunatly my etrex legend hcx doesn't work with spanner, but it does with GPSgate. Which probably doesn't make a difference as far as QGIS is concerned.

With r14339 all COM ports including the software one should be found and not only the "real" ones. The hcx now works on Windows for me, too.

in reply to:  13 ; comment:15 by jef, 14 years ago

Replying to lutra:

I would like to see if it works with my Garmin unit, but I'm not sure what has to be used in the new "device" field when choosing "connect to gpsd".

GPSD doesn't support windows. But you could connect to a remote gpsd on windows. You enter the host, port and device (the latter can be left empty, if the gpsd only listens to one GPS) of the remote gps daemon. No colons required. Still r14340 fixes the assertion.

in reply to:  15 ; comment:16 by lutra, 14 years ago

Replying to jef:

Replying to lutra:

I would like to see if it works with my Garmin unit, but I'm not sure what has to be used in the new "device" field when choosing "connect to gpsd".

GPSD doesn't support windows.

I never mentioned windows, in fact I use Linux (Ubuntu)

You enter the host, port and device (the latter can be left empty, if the gpsd only listens to one GPS) of the remote gps daemon.

so this should work out of the box on Linux? my 60c unit seems that is not connecting, or maybe I'm just doing something wrong.

in reply to:  16 ; comment:17 by jef, 14 years ago

Replying to lutra:

GPSD doesn't support windows.

I never mentioned windows, in fact I use Linux (Ubuntu)

Ok. Sorry. The original poster did.

so this should work out of the box on Linux? my 60c unit seems that is not connecting, or maybe I'm just doing something wrong.

No, you need to setup gpsd first - which works with my hcx. I suppose it does with the 60c, too. With gpsd you can have multiple clients...

in reply to:  17 ; comment:18 by lutra, 14 years ago

No, you need to setup gpsd first - which works with my hcx. I suppose it does with the 60c, too. With gpsd you can have multiple clients...

Ok, I see now the kind of possibilities that gpsd offers, but I still cannot make it work. I checked the gpsd docs and a few other tutorials so I'm sure I'm missing something (tested also with xgps). Can you give any insight? I'm sure this will be useful too for the future 1.6 documentation.

Nevertheless I hope there will room to add the support for garmin usb devices as in the gps tools, it will be more straightforward for direct gps-to-qgis connections.

in reply to:  18 comment:19 by lutra, 14 years ago

Ok, I see now the kind of possibilities that gpsd offers, but I still cannot make it work. I checked the gpsd docs and a few other tutorials so I'm sure I'm missing something (tested also with xgps). Can you give any insight? I'm sure this will be useful too for the future 1.6 documentation.

Nevertheless I hope there will room to add the support for garmin usb devices as in the gps tools, it will be more straightforward for direct gps-to-qgis connections.

thanks in advance.

in reply to:  18 ; comment:20 by jef, 14 years ago

Replying to lutra:

Ok, I see now the kind of possibilities that gpsd offers, but I still cannot make it work. I checked the gpsd docs and a few other tutorials so I'm sure I'm missing something (tested also with xgps). Can you give any insight? I'm sure this will be useful too for the future 1.6 documentation.

Getting the hcx to work with GPSD was relatively easy. Loading the garmin_gps kernel module with modprobe created a /dev/ttyUSBn, which could be accessed with gpsd. Both xgps and qgis could in turn access gpsd on host localhost on port 2947.

http://ubuntuforums.org/showthread.php?t=1022921 suggest that accessing the 60c should be as easy.

Nevertheless I hope there will room to add the support for garmin usb devices as in the gps tools, it will be more straightforward for direct gps-to-qgis connections.

The gps tools also only interfaces with gpsbabel and doesn't directly access any GPS devices. I don't think we should duplicate the efforts of GPSD and/or gpsbabel.

in reply to:  20 comment:21 by lutra, 14 years ago

Getting the hcx to work with GPSD was relatively easy. Loading the garmin_gps kernel module with modprobe created a /dev/ttyUSBn, which could be accessed with gpsd. Both xgps and qgis could in turn access gpsd on host localhost on port 2947.

ok, got it finally. Thanks a lot for the hint.

Just one question: I cannot see any info about the position of the satellites and the intensity of the signal. Is this supposed to work or it will not work in any case with Garmins?

The gps tools also only interfaces with gpsbabel and doesn't directly access any GPS devices. I don't think we should duplicate the efforts of GPSD and/or gpsbabel.

Well depends. See above. If the lack of info about signal and sat position is because of Garmin units then forget about it. If with gpsbabel this features will work then maybe will be worth the effort.

comment:22 by lutra, 14 years ago

another problem: without removing first the garmin_gps kernel module the connection with gpsbabel (and the gps tools) will not work anymore.

Note: See TracTickets for help on using tickets.