Situation:
I have a bunch of USB webcams connected to a DIR-505 (OpenWrt Attitude Adjustment 12.09 / LuCI 0.11.1 Release (0.11.1)) for experimenting and making timelapse videos.

Problem:
Sometimes a cam gets stuck, so I wanted to try to reset the cam via usbreset. I could not reset this cam and got this error:

root@DIR-505-1:~# usbreset 001/023
No such device found

however, lsusb shows that the cam is present:

root@DIR-505-1:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 004: ID 0781:5571 SanDisk Corp.
Bus 001 Device 005: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 001 Device 006: ID 1a40:0201 TERMINUS TECHNOLOGY INC.
Bus 001 Device 007: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 008: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF
Bus 001 Device 009: ID 04a9:3110 Canon, Inc. EOS Digital Rebel XTi
Bus 001 Device 010: ID 2341:8036
Bus 001 Device 012: ID 04cc:1521 ST-Ericsson USB 2.0 Hub
Bus 001 Device 013: ID 0458:708c KYE Systems Corp. (Mouse Systems)
Bus 001 Device 021: ID 0c45:6340 Microdia
Bus 001 Device 022: ID 0c45:6340 Microdia
Bus 001 Device 023: ID 046d:0825 Logitech, Inc. Webcam C270 <<<------ reset doesn't work
Bus 001 Device 024: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 025: ID 045e:0779 Microsoft Corp.                       <<<------ reset works
Bus 001 Device 026: ID 045e:076d Microsoft Corp. LifeCam HD-5000
Bus 001 Device 027: ID 046d:0825 Logitech, Inc. Webcam C270

...and other cams can be reset:

root@DIR-505-1:~# usbreset 001/025
Resetting Microsoft® LifeCam HD-3000 ... ok

I noticed that none of my Logitech Webcams was listed by usbreset:

root@DIR-505-1:~# usbreset
Usage:
  usbreset PPPP:VVVV - reset by product and vendor id
  usbreset BBB/DDD   - reset by bus and device number
  usbreset "Product" - reset by product name

Devices:
  Number 001/001  ID 1d6b:0002  Generic Platform EHCI Controller
  Number 001/002  ID 1a40:0101  USB 2.0 Hub
  Number 001/003  ID 0403:6001  USB Serial Converter
  Number 001/004  ID 0781:5571  Cruzer Fit
  Number 001/006  ID 1a40:0201  USB 2.0 Hub [MTT]
  Number 001/007  ID 1a40:0101  USB 2.0 Hub
  Number 001/013  ID 0458:708c  USB_Camera
  Number 001/009  ID 04a9:3110  Canon Digital Camera
  Number 001/010  ID 2341:8036  Arduino Leonardo
  Number 001/021  ID 0c45:6340  USB 2.0 Camera
  Number 001/022  ID 0c45:6340  USB 2.0 Camera
  Number 001/025  ID 045e:0779  Microsoft® LifeCam HD-3000
  Number 001/026  ID 045e:076d  Microsoft® LifeCam HD-5000

Digging for the root cause, if found out, that this is not restricted to Logitech Webcams not being listed, but actually no device will be listed that comes without a product_name:

- none of my Logitech Webcams provide Manufacturer/Product in /proc/bus/usb/devices; instead, they have
a (unique?) serial number
- Targus USB Hub 04cc:1521 -> no Manufacturer/Product
- 1-wire USB Adapter DS9490R 04fa:2490 -> no Manufacturer/Product

I think I have tracked this error down to the following sections of usbreset.c
(https://dev.openwrt.org/browser/trunk/p … ?rev=32741)

99 static struct usbentry * parse_devlist(FILE *devs)

139    static void list_devices(void)

158 struct usbentry * find_device(int *bus, int *dev,
159                                  int *vid, int *pid,
160                                  const char *product)

Root Cause:
Something inside those functions of usbreset.c depends on the availability of at least the "Product" information, maybe also on "Manufacturer". Since this information is not available at many devices, usbreset fails to list and reset those devices.

That's what I found out until now, but from there on, I'm completely lost. I can neither program in C++ nor am I equipped with compilation skills...

Therefore my question:
Is there someone out there with a device w/o Manufacturer/Product listed in /proc/bus/usb/devices (e.g. a Logitech Webcam) who can confirm this error, possibly correct it and provide me with a compiled corrected version?

Would be very helpful for me! smile