On Tue, Aug 05, 2008 at 12:37:48AM +0200, Giuseppe Sacco wrote: > On Tue, 5 Aug 2008 00:28:29 +0200 Aurelien Jarno <[EMAIL PROTECTED]> wrote: > [...] > > So it seems it can't open the devices. The corresponding code in libusb > > is: > > > > fd = open(filename, O_RDWR); > > if (fd < 0) { > > fd = open(filename, O_RDONLY); > > if (fd < 0) { > > if (usb_debug >= 2) > > fprintf(stderr, "usb_os_find_devices: Couldn't open %s\n", > > filename); > > > > So either it is a bug in the kernel, either udev creates the wrong > > devices. Running "strace lsusb" will most probably give the answer. > > strace shows > 11584 fstat64(3, {st_mode=S_IFDIR|0755, st_size=180, ...}) = 0 > 11584 getdents(3, /* 9 entries */, 4096) = 144 > 11584 open("/dev/bus/usb/003/007", O_RDWR) = -1 ENOENT (No such file or > directory) > 11584 open("/dev/bus/usb/003/007", O_RDONLY) = -1 ENOENT (No such file or > directory) > 11584 open("/dev/bus/usb/003/006", O_RDWR) = -1 ENOENT (No such file or > directory) > 11584 open("/dev/bus/usb/003/006", O_RDONLY) = -1 ENOENT (No such file or > directory) > > but those files are there. (Strange thing: old files aren't deleted when > device is unplugged.)
The fact that the files are there doesn't mean they are usable, they also have to be known by the kernel. > [EMAIL PROTECTED]:~$ ls -l /dev/bus/usb/003/00* > crw-rw---- 1 root root 189, 0 2008-08-05 08:07 /dev/bus/usb/003/001 > crw-rw-r-- 1 root scanner 189, 1 2008-08-04 18:33 /dev/bus/usb/003/002 > crw-rw---- 1 root root 189, 2 2008-08-04 19:11 /dev/bus/usb/003/003 > crw-rw---- 1 root root 189, 3 2008-08-04 19:11 /dev/bus/usb/003/004 > crw-rw-r-- 1 root scanner 189, 4 2008-08-04 19:13 /dev/bus/usb/003/005 > crw-rw---- 1 root root 189, 5 2008-08-04 23:55 /dev/bus/usb/003/006 > crw-rw---- 1 root root 189, 6 2008-08-04 23:55 /dev/bus/usb/003/007 > > major 189 is USB, as shown from: > > [EMAIL PROTECTED]:~$ grep 189 /proc/devices > 189 usb_device > What is strange is that the minor should be (bus * 128) + device. This is not the case here. Try to manually create the device node with mknod according to this formula to see if it works. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]