Created attachment 154811 [details] libusb_get_device_list() example program FreeBSD rimwks 10.1-STABLE FreeBSD 10.1-STABLE #11: Mon Feb 9 04:52:35 MSK 2015 root@wks:/usr/obj/usr/src/sys/RIMWKSx64 amd64 # lsusb Bus /dev/usb Device /dev/ugen5.3: ID 8644:8003 Bus /dev/usb Device /dev/ugen3.3: ID 046d:082d Logitech, Inc. Bus /dev/usb Device /dev/ugen8.3: ID 09da:9090 A4 Tech Co., Ltd Bus /dev/usb Device /dev/ugen8.2: ID 04f2:0833 Chicony Electronics Co., Ltd Bus /dev/usb Device /dev/ugen3.2: ID 1058:1042 Western Digital Technologies, Inc. Bus /dev/usb Device /dev/ugen5.2: ID 05e3:0732 Genesys Logic, Inc. Bus /dev/usb Device /dev/ugen9.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen8.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen7.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen6.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen5.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen4.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen3.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen2.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000 Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000 (16 devs) # usbconfig list ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen2.1: <UHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen3.1: <EHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen4.1: <XHCI root HUB 0x1033> at usbus4, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen5.1: <XHCI root HUB 0x1912> at usbus5, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen6.1: <UHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen7.1: <UHCI root HUB Intel> at usbus7, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen8.1: <UHCI root HUB Intel> at usbus8, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen9.1: <EHCI root HUB Intel> at usbus9, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen5.2: <product 0x0732 vendor 0x05e3> at usbus5, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA) ugen3.2: <Elements 1042 Western Digital> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen8.2: <USB Keyboard CHICONY> at usbus8, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) ugen8.3: <USB Device A4TECH> at usbus8, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) ugen3.3: <HD Pro Webcam C920 vendor 0x046d> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen5.3: <product 0x8003 vendor 0x8644> at usbus5, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) (16 devs) # ./lsusb-libusb Bus 000 Device 001 0000:0000 Bus 001 Device 001 0000:0000 Bus 002 Device 001 0000:0000 Bus 003 Device 001 0000:0000 Bus 004 Device 001 0000:0000 Bus 005 Device 001 0000:0000 Bus 006 Device 001 0000:0000 Bus 007 Device 001 0000:0000 Bus 008 Device 001 0000:0000 Bus 009 Device 001 0000:0000 Bus 005 Device 002 05e3:0732 Bus 003 Device 002 1058:1042 Bus 008 Device 002 04f2:0833 Bus 008 Device 003 09da:9090 (14 devs)
Can you do "lsusb -vvv" ?
# lsusb -vvv > ./lsusbvvv.txt can't get debug descriptor: Input/output error can't get debug descriptor: Input/output error can't get device qualifier: Input/output error can't get debug descriptor: Input/output error can't get debug descriptor: Input/output error can't get debug descriptor: Input/output error can't get debug descriptor: Input/output error can't get device qualifier: Input/output error can't get debug descriptor: Input/output error can't get device qualifier: Input/output error can't get debug descriptor: Input/output error can't get debug descriptor: Input/output error
Created attachment 154824 [details] lsusb -vvv
Hi, I see that one of your devices has an error (cfg=255). Maybe it is a bit flaky: ugen5.3: <product 0x8003 vendor 0x8644> at usbus5, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) Can you check dmesg that none of your devices are repeatedly attaching and detaching? The test software you attached should return identical device lists like usbconfig does, except when device/target mode USB devices are present. These are not shown by libusb 0.1 or 1.0. See md=DEVICE (you only have md=HOST). --HPS
Bus /dev/usb Device /dev/ugen5.3: ID 8644:8003 - was connected later, after Bus /dev/usb Device /dev/ugen3.3: ID 046d:082d. problems start from 046d:082d. dmesg show only connect/disconnect that i do by hands. Devices list was identical until i move 046d:082d Logitech, Inc. from usb3 to usb2 port. Now i try move back, but problem still exist. PS: also i install new kernel but does not reboot now.
Can you ktrace both applications and see if you find any clues what is going on. Look for IOCTL errors. --HPS
... open("/dev/ugen3.4",O_RDWR,01) ERR#13 'Permission denied' ioctl(5,USB_READ_DIR,0xffffe4b8) = 0 (0x0) open("/dev/ugen3.3",O_RDWR,01) ERR#13 'Permission denied' open("/dev/ugen8.3",O_RDWR,01) ERR#13 'Permission denied' ... chmod -R 0777 /dev/usb fix problem. usbconfig and lsusb i am start as root, but test app as non root. sorry for noise.