RT2501/RT2573 Wireless AdapterīDeviceClass 0 (Defined at Interface level)įinally I found the right bus ID of the usb device. Here is the detailed info about the wireless devide: ( lsusb -v | grep -E '\/dev/null) Bus 001 Device 004: ID 148f:2573 Ralink Technology, Corp. |_ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M |_ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M RT2501/RT2573 Wireless AdapterĪnd lsusb -t: /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M lsusb prints out the following: Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.īus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubīus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.īus 001 Device 004: ID 148f:2573 Ralink Technology, Corp. So to able to do that, I need the bus ID.
![ubuntu lsusb ubuntu lsusb](https://fossbytes.com/wp-content/uploads/2020/05/Run-Command-To-Mount.png)
Within a container, you could put the hwdb.bin file into whichever of those locations makes the most sense to you.I would like to bind/unbind my usb device - a wireless adapter. Openat(AT_FDCWD, "/lib/udev/hwdb.bin", O_RDONLY|O_CLOEXEC) = 3 Openat(AT_FDCWD, "/lib/systemd/hwdb/hwdb.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) Openat(AT_FDCWD, "/usr/lib/systemd/hwdb/hwdb.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) Openat(AT_FDCWD, "/etc/udev/hwdb.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) I ran lsusb under strace to find out all the locations it tries to find the hwdb.bin file from: openat(AT_FDCWD, "/etc/systemd/hwdb/hwdb.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) To keep the container as lightweight as possible, you might want to create the hwdb.bin outside the container (or use the file from your container builder host) and just inject the end product hwdb.bin into the actual container.
#Ubuntu lsusb update#
The hwdb.bin file is created dynamically by the systemd-hwdb update command, sourcing the information from /lib/udev/hwdb.d/*.hwdb and /etc/udev/hwdb.d/*.hwdb files. While adding the udev package to be included into the container build process is possible, it might be overkill in this case.
![ubuntu lsusb ubuntu lsusb](https://www.lukesy.net/post/installing-rtl8812-usb-wifi-dongle-on-ubuntu-18-and-20-lts/s-l1600.jpg)
If your container works well otherwise, it seems you only need those files for lsusb. Have /usr/share/usb.ids (and/or /lib/udev/hwdb.bin if your distribution has it) be present within the container.
#Ubuntu lsusb install#
docker run -rm -it -privileged debian apt-get update & apt-get install -y usbutils & find / -type f \( -name "usb.ids" -o -name "hwdb.bin" means udev is not installed. Solution: usb.ids is present, but not hwdb.bin (hardware database).
#Ubuntu lsusb how to#
Virtual Mouseīus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubĪny idea how to get USB device descriptions from inside the Docker container? Virtual USB Hubīus 002 Device 002: ID 0e0f:0003 VMware, Inc. In a Docker container: docker run -rm -it -privileged debian apt-get update & apt-get install -y usbutils & lsusbīus 002 Device 001: ID the host: $ lsusbīus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubīus 002 Device 012: ID 1a86:5512 QinHeng Electronics CH341 in EPP/MEM/I2C mode, EPP/I2C adapterīus 002 Device 003: ID 0e0f:0002 VMware, Inc.