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.) [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 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]