Linux USB Devices
Proxmox USB Passthrough
VM
root@proxmox:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@proxmox:~# qm set 100 -usb0 1cf1:0030
update VM 100: -usb0 1cf1:0030
LXC1
root@docker:~# tree /dev/serial/
/dev/serial/
└── by-id
└── usb-Nabu_Casa_SkyConnect_v1.0_c48ba7961392ed119cf6cad13b20a988-if00-port0 -> ../../ttyUSB0
root@docker:~/zigbee-stack# ls -al /dev/ttyUSB0
crw-rw---- 1 nobody nogroup 188, 0 Nov 8 21:56 /dev/ttyUSB0
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
root@docker:~/docker compose run --rm z2m ash
...
/app # test -w /dev/ttyUSB0 && echo success || echo failure
success
USB Drives
USB drives usually show up as /dev/sda or /dev/sdb.
The
This wipes the partition table by writing 0s across the first 10MiB of the disk.
Bluetooth
Linux Kernel
Show bluetooth kernel modules
This will show all the connected devices, but lots of times it's not really human-readable.
Watch the dmesg stuff happen as you connect the device.
HCI Config
Use hciconfig2 to check the system Bluetooth devices
Each of these commands gives a Bluetooth Device (BD) Address. The first 3 parts are the vendor code. For example,
| Vendor Code | Company |
|---|---|
| 00:E0:4C | Realtek Semiconductor |
| 14:F6:D8 | Intel Corporation |
systemd
Check systemd status
bluetoothctl
Ubuntu uses a newer version, bluetoothctl3
Check the power state, supported features, and whether it's active:
Disable default Bluetooth device
Change Bluetooth Name
Edit /etc/bluetooth/main.conf to add this line. [General] should already be at the top.
shell title="Restart bluetooth service
sudo systemctl restart bluetooth