question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Support names from the usb.ids database.

See original GitHub issue

Feature: Export vendor and product names as described in the usb.ids file. Slightly related to https://github.com/pyusb/pyusb/issues/330.

The usb.ids file is the the canonical mapping of vendor and product names to ids. It is used by almost all USB related tooling that return vendor and product names.

libusb support here is limited and inconsistent, I’m not sure what’s going on. On my Ubuntu 20.04 system it doesn’t return vendor names for ids [0bda, 8087] but it does for [1d6b, 13d3]. 13d3 is incorrect. All of these devices are included in the usb.ids file.

>>> _ds = usb.core.find(find_all=True)
>>> for d in _ds:
...    print(d)
# Partial results -
DEVICE ID 0bda:0316 on Bus 004 Address 002 =================
 ...
 iManufacturer          :    0x1 Generic    ## Missing vendor name
 iProduct               :    0x2 USB3.0-CRW  ## Incorrect product description
 iSerialNumber          :    0x3 20120501030900000
 ...
DEVICE ID 1d6b:0003 on Bus 004 Address 001 =================
 ...
 iManufacturer          :    0x3 Linux 5.3.0-7625-generic xhci-hcd
 iProduct               :    0x2 xHCI Host Controller
 iSerialNumber          :    0x1 0000:3b:00.0
 ...
DEVICE ID 13d3:56b2 on Bus 001 Address 003 =================
 ...
 iManufacturer          :    0x1 SunplusIT Inc  ## Incorrect vendor name
 iProduct               :    0x2 Integrated Camera   ## Incorrect product description
 iSerialNumber          :    0x0 
 ...
DEVICE ID 8087:0a2b on Bus 001 Address 002 =================
 ...
 iManufacturer          :    0x0   ## Missing manufacturer name
 iProduct               :    0x0  ## Missing product name
 iSerialNumber          :    0x0 
 ...

There are several implementation options. If you think this is something that belongs in pyusb let me know and we can figure something out.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
Gestascommented, Nov 2, 2021

@jonasmalacofilho got it, I’ll work on this.

1reaction
jonasmalacofilhocommented, Jul 24, 2021

I think we can include a copy of the data, but prefer the system provided copy on Linux (on the possible paths we have collected).


Regarding the API, I think a mixed approach would be useful: a low level DB lookup module plus some convenience methods or properties on Device.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List of USB ID's
List of USB ID's # # Maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com> # If you have any new entries, please submit them via ......
Read more >
466041 – usbutils usb.ids update, adding a missed script, and ...
Description of problem: usbutils-0.73 does not robustly package the included usb.ids file, nor include the updateing script Additionally, it has a hardcoded ...
Read more >
USB in a NutShell - Chapter 5 - USB Descriptors - Beyondlogic
The device descriptor includes information such as what USB revision the device complies to, the Product and Vendor IDs used to load the...
Read more >
USB device descriptors - Windows drivers | Microsoft Learn
In the Details tab, the Hardware Ids property value indicates the hardware ID ("USB\XXX") that is generated by Windows.
Read more >
cros flash usb:// should list the device names in the menu
the product info and the device name of every removable device. BUG=chromium:440384. TEST=Manually tested cros/commands/cros_flash.py.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found