gpsd depends on blacklisted garmin_gps module

Bug #388917 reported by ceg
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gpsd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: gpsd

Other apps seem to avoid the garmin_gsm kernel module for usb devices and access those devices using the hotplug USB subsystem, instead of the device created by garmin_gsm.

Revision history for this message
Bernd Zeimetz (bzed) wrote :

The garmin_gps module should provide the necessary tty to talk to the garmin gps. The garmin_gps module is loaded by udev, there is nothing gpsd can do against that. I'm not sure if some standard usb-serial converter module works with garmin gpsr - but thats still nothing that could be changed in gpsd. The udev rules from gpsd only look at the hardware informations from the usb device - and they're not affected by the module which takes care of it. Udev just runs the gpsd rules if there is a devices files created for a matching device.

Changed in gpsd (Ubuntu):
status: New → Invalid
summary: - gpsd depends on blacklisted garmin_gsm module
+ gpsd depends on blacklisted garmin_gps module
Revision history for this message
ceg (ceg) wrote :

I am sorry I don't understand what you are talking about.

On my ubuntu 9.04 system there is certenly no garmin_gsm module loaded when connecting the device.

Plus I need to manually mount an usbfs and put add some udev line.

I don't know how is anyone suppost to know about this marble when you make the bugreport for gsmd disappear from launchpad? This took me just too long.

Revision history for this message
ceg (ceg) wrote :

can't it be tagged 9.04?

Changed in gpsd (Ubuntu):
status: Invalid → New
Revision history for this message
ceg (ceg) wrote :

Full workaround to use garmin USB device in 9.04:

in /etc/modprobe/blacklist.conf:
#blacklist garmin_gps

The udev rule to add:
#cat /etc/udev/rules.d/51-garmin.rules
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"

The Filesystem to mount:
/etc/fstab:
none /proc/bus/usb usbfs 0 0

#sudo modprobe garmin_gps

#gpsd /dev/gps

Revision history for this message
Bernd Zeimetz (bzed) wrote : Re: [Bug 388917] Re: gpsd depends on blacklisted garmin_gps module

ceg wrote:
> I am sorry I don't understand what you are talking about.
>
> On my ubuntu 9.04 system there is certenly no garmin_gsm module loaded
> when connecting the device.

The module is called garmin_gps, *not* garmin_gsm.

> Plus I need to manually mount an usbfs and put add some udev line.
> I don't know how is anyone suppost to know about this marble when you
> make the bugreport for gsmd disappear from launchpad? This took me just
> too long.

s/gsmd/gpsd/

I start to think your problem is that /proc/bus/usb is deprecated in Ubuntu, so
gpsd fails to use its own garmin driver?

--
 Bernd Zeimetz Debian GNU/Linux Developer
 GPG Fingerprints: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79
                   ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F

Changed in gpsd (Ubuntu):
status: New → Confirmed
Revision history for this message
ceg (ceg) wrote :

You might want to set it to fix commited, if this is the case?

But then if garmin_gps is loaded by udev rules, wont't it again break other packages that use usb: to fetch trackdata from the device?

Revision history for this message
Bernd Zeimetz (bzed) wrote :

The problem is that gpsd won't work without the garmin_gps module, on the other side other packages should work with the module... so in fact we have three bugs here:

- garmin_gps is blacklisted (could you file an appropriate bug against the package which provides the blacklist?)
- garmin_gps should work as a usual usb<>serial adapter.
- gpsd needs to stop messing with /proc/bus/usb - http://developer.berlios.de/bugs/?func=detailbug&bug_id=13467&group_id=2116

Revision history for this message
ceg (ceg) wrote :

For the workaround, it is better to leave garmin_gps blacklisted (stadard) so that it wont be loaded during boot, and just "sudo modprobe garmin_gps" and "gpsd /dev/gps" when you need gpsd. (For gpsdrive, tangoGPS etc.).

Revision history for this message
Bernd Zeimetz (bzed) wrote :

Could you give me the output of
ls -ld /sys/module/garmin_gps/drivers/* /sys/module/garmin_gps/drivers/*/*
/sys/module/garmin_gps/drivers/*/*/*

Thanks,

Bernd
--
 Bernd Zeimetz Debian GNU/Linux Developer
 GPG Fingerprints: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79
                   ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F

Revision history for this message
ceg (ceg) wrote :

Blacklisting garmin_gps is not a bug. It allows apps to use libusb instead.

Bug #236682 "garmin_gps.ko assumes you're using usbfs" exists.

Revision history for this message
Bernd Zeimetz (bzed) wrote :

ceg wrote:
> Blacklisting garmin_gps is not a bug. It allows apps to use libusb
> instead.
>
> Bug #236682 "garmin_gps.ko assumes you're using usbfs" exists.

*sigh*
The whole garmin stuff is a large piece of crap with thanks to garmin as they
don't want to open their protocol...

Best thing is probably to switch the gpsr to NMEA and just use that...

--
 Bernd Zeimetz Debian GNU/Linux Developer
 GPG Fingerprints: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79
                   ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F

Revision history for this message
ceg (ceg) wrote :
Download full text (6.2 KiB)

Here is the output:

#ls -ld /sys/module/garmin_gps/drivers/* /sys/module/garmin_gps/drivers/*/* /sys/module/garmin_gps/drivers/*/*/*

lrwxrwxrwx 1 root root 0 2009-06-18 16:18 /sys/module/garmin_gps/drivers/usb:garmin_gps -> ../../../bus/usb/drivers/garmin_gps
lrwxrwxrwx 1 root root 0 2009-06-18 16:18 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0 -> ../../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1:1.0
-r--r--r-- 1 root root 4096 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bAlternateSetting
-r--r--r-- 1 root root 4096 2009-06-18 13:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bInterfaceClass
-r--r--r-- 1 root root 4096 2009-06-18 13:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bInterfaceNumber
-r--r--r-- 1 root root 4096 2009-06-18 13:45 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bInterfaceProtocol
-r--r--r-- 1 root root 4096 2009-06-18 13:45 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bInterfaceSubClass
-r--r--r-- 1 root root 4096 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/bNumEndpoints
lrwxrwxrwx 1 root root 0 2009-06-18 13:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/driver -> ../../../../../../bus/usb/drivers/garmin_gps
lrwxrwxrwx 1 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/ep_02 -> usb_endpoint/usbdev2.2_ep02
lrwxrwxrwx 1 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/ep_81 -> usb_endpoint/usbdev2.2_ep81
lrwxrwxrwx 1 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/ep_83 -> usb_endpoint/usbdev2.2_ep83
-r--r--r-- 1 root root 4096 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/modalias
drwxr-xr-x 2 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/power
lrwxrwxrwx 1 root root 0 2009-06-18 15:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/subsystem -> ../../../../../../bus/usb
-r--r--r-- 1 root root 4096 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/supports_autosuspend
drwxr-xr-x 4 root root 0 2009-06-18 13:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/ttyUSB0
-rw-r--r-- 1 root root 4096 2009-06-18 15:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/uevent
drwxr-xr-x 5 root root 0 2009-06-18 15:44 /sys/module/garmin_gps/drivers/usb:garmin_gps/2-1:1.0/usb_endpoint
--w------- 1 root root 4096 2009-06-18 16:18 /sys/module/garmin_gps/drivers/usb:garmin_gps/bind
lrwxrwxrwx 1 root root 0 2009-06-18 16:18 /sys/module/garmin_gps/drivers/usb:garmin_gps/module -> ../../../../module/garmin_gps
drwxr-xr-x 2 root root 0 2009-06-18 16:18 /sys/module/garmin_gps/drivers/usb:garmin_gps/module/drivers
drwxr-xr-x 2 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/module/holders
-r--r--r-- 1 root root 4096 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/module/initstate
drwxr-xr-x 2 root root 0 2009-06-18 16:19 /sys/module/garmin_gps/drivers/usb:garmin_gps/module/notes
drwxr-xr-x 2 root root 0 2009-06-18 16:19 /sys/module/garmin_gp...

Read more...

Revision history for this message
ceg (ceg) wrote :

> Best thing is probably to switch the gpsr to NMEA and just use that...

Even if my device supported it, I would think it would not help with setting up the USB conectivity.

With

1) the udev rule to apply correct permissions to usb device (that shoud come installed with some default init package)
2) The usbfs mounted to /proc/bus/usb and
3) the garmin_gps module loaded

aquisition of the current position works.

Revision history for this message
ceg (ceg) wrote :

>>Best thing is probably to switch the gpsr to NMEA and just use that...
>Even if my device supported it, I would think it would not help with setting up the USB conectivity.

Got it, garmin usb binary format is diffrent from garmin serial binary.
Cornfiming: "large piece of crap" and forerunners do not provide NMEA output.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.