Thread: [Gpsbabel-misc] Still no conection in Ubuntu Gutsy
Brought to you by:
robertl
From: Christoph E. <ce...@ch...> - 2007-10-27 20:02:07
|
Hi, seems as CONFIG_USB_SUSPEND still annoys gpsbabel users in Ubunty Gutsy. Or can anyone provide success stories? Anyone a workaround that does not require recompiling the kernel? BTW: The hack with while true; do sleep 1; lsusb; done did not work for me. Best regards, ce |
From: Josef K. <Jos...@we...> - 2007-11-02 23:48:15
|
Hi, since many weeks I try to get a connection to my Garmin device (Forerunner= 305). I tried it already on several XP-computers. Now I started to read o= ut data with my Ubuntu computer (Version 7.10 Gutsy). I did everything as described in http://www.gpsbabel.org/os/Linux=5FHotplug.= html. Here is the result when I try to communicate with the Garmin device: $ uname -a Linux LinuxErde 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686= GNU/Linux $ gpsbabel -i garmin -f usb: -o gpx -F blah.gpx Could not start session in a reasonable number of tries. $ gpsbabel -i garmin -f usb:-1 0 3345700067 484 Forerunner305 Software Version 2.70 $ gpsbabel -i garmin -f usb:-1 Unable to sync with Garmin USB device in 25 attempts. $ gpsbabel -i garmin -f usb: -o gpx -F blah.gpx Unable to sync with Garmin USB device in 25 attempts. $ gpsbabel -i garmin -f usb: -o gpx -F blah.gpx Segmentation fault (core dumped) $ gpsbabel -i garmin -f usb:-1 Could not start session in a reasonable number of tries. $ gpsbabel -i garmin -f usb:-1 Unable to sync with Garmin USB device in 25 attempts. $=20 The device seems to respond with different answers on the same request. Does anybody have an idea what the reason for that behaviour could be=3F Josef =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Jetzt neu! Sch=FCtzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos testen. http://www.pc-sicherheit.web.de/startseite/=3Fmc=3D022220 |
From: Christoph E. <ce...@ch...> - 2007-11-03 00:04:15
|
Hi, does https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/114565 help? At least it worked on my Gutsy installation. BTW: garmin_gps is blacklisted per default on Gutsy, so removing this module manually shouldn't be necessary. Best regards, ce |
From: Josef K. <Jos...@we...> - 2007-11-04 09:30:25
|
Grrr. I still can not set up a connection. Doing the proposed modifications havn= 't changed much. $ gpsbabel -D9 -i garmin -f usb: -o gpx -F test.gpx I get sometimes data. But it ends with=20 Unable to establish USB syncup Most of the time the response is: GPSBabel Version: 1.3.3=20 usb=5Fset=5Fconfiguration failed, probably because kernel driver '' is blocking our access to the USB device. For more information see http://www.gpsbabel.org/os/Linux=5FHotplug.html At the moment I do not know what to do next. Josef =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Jetzt neu! Sch=FCtzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos testen. http://www.pc-sicherheit.web.de/startseite/=3Fmc=3D022220 |
From: Robert L. <rob...@gp...> - 2007-11-04 21:47:36
|
On 11/4/07, Josef Krammer <Jos...@we...> wrote: > usb_set_configuration failed, probably because kernel driver '' > is blocking our access to the USB device. > For more information see http://www.gpsbabel.org/os/Linux_Hotplug.html Others have reported success with Gutsy. I recently summarized that thread into that page and reorganized it somewhat. There are two key steps: 1) Ensuring the kernel driver isn't being loaded. 2) Tweaking the device permissions of the dev node created by hotplug. If the command runs as root, then you're good with the first one and need to focus on the second one. Since there are conflicting reports on the syntax needed on Gutsy, some tinkering may be required. Please do report which of the two succeeds for you. Libusb has debugging traces, but they're not terribly helpful. Here's what I'd to so see if the hotplug stuff is working right. $ strace gpsbabel -D1 -i garmin -f usb:-1 2>&1 | less Look for the last occurrence of open. (libusb attempts to open a sequllion nodes; most of which will fail. You'll know you have the right one when it's followed bby the DEVFS_SETCONFIGURATION.) On my Fedora system, I see: getdents(3, /* 0 entries */, 4096) = 0 close(3) = 0 open("/dev/bus/usb/004/003", O_RDWR) = 3 ioctl(3, USBDEVFS_SETCONFIGURATION, 0xbfcdb294) = 0 ioctl(3, USBDEVFS_CLAIMINTERFACE, 0xbfcdb294) = 0 If I look at that dev node, I see that it does indeed have the 0666 perms that I want. That's why I can access my device as a mere user instead of root. $ ls -al /dev/bus/usb/004/003 crw-rw-rw- 1 root root 189, 386 2007-11-04 15:42 /dev/bus/usb/004/003 If you don't see rw-rw-rw here (0666) you're getting hung up on step 2, fixing hotplug perms. |
From: Christoph E. <ce...@ch...> - 2007-11-04 22:08:41
|
Hi, > 1) Ensuring the kernel driver isn't being loaded. it's blacklisted by default on Gutsy. > 2) Tweaking the device permissions of the dev node created by hotplug I'm still confused about hotplug and udev. Is hotplug still needed as udev exists? Best regards, ce |
From: Robert L. <rob...@gp...> - 2007-11-04 22:45:34
|
Thanx. I've inclued the tidbit about it not needing blacklist. > > 2) Tweaking the device permissions of the dev node created by hotplug > > I'm still confused about hotplug and udev. Is hotplug still needed as udev > exists? You must fix the permissions for the device to be accessible to non-root users. |
From: Robert L. <rob...@gm...> - 2007-11-07 05:11:46
|
I'm doing some tinkering with Gutsy right now. On 11/4/07, Josef Krammer <Jos...@we...> wrote: > Grrr. > I still can not set up a connection. Doing the proposed modifications havn't changed much. > > $ gpsbabel -D9 -i garmin -f usb: -o gpx -F test.gpx > I get sometimes data. But it ends with > Unable to establish USB syncup This is exactly the symptom I got when I assumed the garmin_gps driver was not being loaded. On the server edition, at least, the garmin_gps driver is not blacklisted. If you can do a 'dmesg | grep -i garmin' and the last thing you see don't contain words like "deregistering" and "disconnected", then you have not successfully blacklisted the garmin_gps driver. confirm with 'lsmod'. I'll condense this into http://www.gpsbabel.org/os/Linux_Hotplug.html once I have my head around this more. |
From: Andrew S. <and...@pa...> - 2007-10-28 00:16:19
|
On Sat, 27 Oct 2007 22:01:42 +0200 Christoph Eckert <ce...@ch...> wrote: > Hi, > > seems as CONFIG_USB_SUSPEND still annoys gpsbabel users in Ubunty Gutsy. Or > can anyone provide success stories? Anyone a workaround that does not require > recompiling the kernel? > Oh, I've just been rejoicing that it seems to be working now... (Kubuntu Gutsy 7.10) $ uname -a Linux starman 2.6.22-14-generic #1 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64 GNU/Linux $ gpsbabel -i garmin -f usb:-1 0 3320361950 292 GPSMap60CX Software Version 3.50 If I try the example on the gpsbabel web page: $ gpsbabel -i garmin -f usb: -o gpx -F blah.gpx I get a correct GPX file created, and my GPS beeps on transfer complete. Andrew |
From: Christoph E. <ce...@ch...> - 2007-10-28 09:11:07
|
Hi, > Oh, I've just been rejoicing that it seems to be working now... thanks a bunch for the info. > (Kubuntu Gutsy 7.10) Same. First I do rmmod garmin_gps ERROR: Module garmin_gps does not exist in /proc/modules to ensure it is not present. > $ uname -a > Linux starman 2.6.22-14-generic #1 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64 > GNU/Linux Slightly different: $ uname -a Linux Grandevitesse 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i= 686=20 GNU/Linux > $ gpsbabel -i garmin -f usb:-1 > 0 3320361950 292 GPSMap60CX Software Version 3.50 =46ails: $ gpsbabel -i garmin -f usb:-1 usb_set_configuration failed, probably because kernel driver '' is blocking our access to the USB device. > If I try the example on the gpsbabel web page: > =A0 > $ gpsbabel -i garmin -f usb: -o gpx -F blah.gpx > > I get a correct GPX file created, and my GPS beeps on transfer complete. OK, won't work, see above. Anyway, great to hear that it works for you.=20 Can anyone provide a hint where I can start my search locating the problem? Best regards, ce |
From: Robert L. <rob...@gm...> - 2007-10-28 16:53:10
|
> rmmod garmin_gps > ERROR: Module garmin_gps does not exist in /proc/modules > to ensure it is not present. I wonder if they've made this module static. Does dmesg show anything about the Garmin driver? How about /proc/tty/drivers? > $ gpsbabel -i garmin -f usb:-1 > usb_set_configuration failed, probably because kernel driver '' > is blocking our access to the USB device. The other reason a usb_set_configuration could fail would be some other user space program (including another GPSBabel) has control of the device. It's not like there's a large corpus of code that knows how to control these things, so if it's not the kernel driver, perhaps it's some hotplug thingy trying to be helpful and grabbing all the USB devices so it can hand them out to something else. I hope that's not the case, but given the thrash in Linux hotplug in recent years it would not shock me. |
From: Christoph E. <ce...@ch...> - 2007-10-28 17:32:16
|
Argh, > $ gpsbabel -i garmin -f usb:-1 > 0 3320361950 292 GPSMap60CX Software Version 3.50 thanks to a hint (you know who you are :) I played again et voil=E0, it see= ms to=20 be a permission problem: root@Grandevitesse:# gpsbabel -i garmin -f usb:-1 0 3314030161 292 GPSMap60CX Software Version 3.50 Interesting. Anyone a clue on what file/device to try a chmod first? Thanks & best regards, ce |
From: Christoph E. <ce...@ch...> - 2007-10-28 18:33:29
|
Hi, > Anyone a clue on what file/device to try a chmod first? OK, I know some more details now, but have no solution yet. The following stuff worked well on my previously used Gentoo system: /etc/hotplug/usb.usermap did not exist on Gutsy (which surprised me as all systems I know get shipped with a well prefilled file). So I created it and entered # Garmin garmin 0x0000 0x091e 0x0003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 The 0x0003 is for the Gpsmap as grepped from lsusb (could be mentioned by the docs BTW). Then I created the garmin script in /etc/hotplug/usb/garmin and entered the commands as recommended by http://www.gpsbabel.org/os/Linux_Hotplug.html I made the script executable, but it does not seem to run. I even added a line like echo "foo" > /tmp/garminfound to it (outside the if statement) but I do not get any file in /tmp The next thing I tried was lsusb | grep -i garmin Bus 003 Device 031: ID 091e:0003 Garmin International GPSmap (various models) and then chmod 0777 /proc/bus/usb/003/031 ls -l /proc/bus/usb/003/031 -rwxrwxrwx 1 root root 57 2007-10-28 19:17 /proc/bus/usb/003/031 But when I try to run gpsbabel -i garmin -f usb:-1 as user, I still get the error message. As root, I can access the device. I'm now a bit stuck as my knowledge about the usb subsystem and the various permissions are very limited. Anyone here who knows the right place to search for more information? Best regards, ce |
From: Christoph E. <ce...@ch...> - 2007-10-28 18:00:05
|
Hi, > Anyone a clue on what file/device to try a chmod first? Before anyone else can say it, I'll better do it myself: RTFM :) : http://www.gpsbabel.org/os/Linux_Hotplug.html Cheers, ce |
From: Robert L. <rob...@gp...> - 2007-10-28 19:03:12
|
> Before anyone else can say it, I'll better do it myself: RTFM :) : > http://www.gpsbabel.org/os/Linux_Hotplug.html It's interesting that you can open the device but not set the config. Is the Ubuntu section in that doc enough if we add the word "Gutsy" to the "Dapper Drake" section? RJL |
From: Christoph E. <ce...@ch...> - 2007-10-28 19:03:11
|
Hi, see https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/114565 Was it possible to update http://www.gpsbabel.org/os/Linux_Hotplug.html accordingly? As the entry mentioned above might disappear one day, maybe it makes sense to simply copy the content over. Frankly, I'm really glad that I do not need to recompile a kernel for only changing one option :) . Best regards, ce |
From: Andrew S. <and...@pa...> - 2007-10-29 04:17:07
|
On Sun, 28 Oct 2007 18:32:15 +0100 Christoph Eckert <ce...@ch...> wrote: > Argh, >=20 > > $ gpsbabel -i garmin -f usb:-1 > > 0 3320361950 292 GPSMap60CX Software Version 3.50 >=20 > thanks to a hint (you know who you are :) I played again et voil=E0, it s= eems to=20 > be a permission problem: > root@Grandevitesse:# gpsbabel -i garmin -f usb:-1 > 0 3314030161 292 GPSMap60CX Software Version 3.50 >=20 > Interesting. Anyone a clue on what file/device to try a chmod first? >=20 > Thanks & best regards, >=20 > ce >=20 Yes, on my system I have altered the udev rules to allow Garmin access by u= sers: $ cat /etc/udev/rules.d/51-garmin.rules SYSFS{idVendor}=3D=3D"091e", SYSFS{idProduct}=3D=3D"0003", MODE=3D"666" Regards Andrew |
From: Robert L. <rob...@gp...> - 2007-10-29 16:05:03
|
> Yes, on my system I have altered the udev rules to allow Garmin access by users: > > $ cat /etc/udev/rules.d/51-garmin.rules > > SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666" > That's the solution in our doc that's been working on most of the Linux strains for the last three to four years. The syntax given on the Ubuntu list is similar, but different. https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/114565/comments/4 Can anyone answer authoritatively which versions of Ubuntu use each syntax? I'll update the doc, but until I'm clear on what to recommend, I can't write the words. |