Configuring USB device pass through to Docker on QNAP NASes

  • Post author:
  • Post category:QNAP

So, this was a lot harder than it really should have been, especially because rtl_433 is a bit thingie about where the device appears in the /dev/ file system as an added sting in the tail…

In my specific scenario, I was given a Vevor 7-in-1 wireless weather station for Christmas. They seem fairly solid and full featured for a $130 AUD device, so no complaints there. The device is also natively supported by rtl_433 which is a RTL SDR package, although its not supported in the version shipped by Debian 12. That’s awesome, although it would have been nice if the command line to use was documented better. I’ll talk more about those bits in a later post though. In this one I want to focus on the fun I had getting a USB device reliably passed through to a Docker container on my QNAP NAS.

(more…)

Continue ReadingConfiguring USB device pass through to Docker on QNAP NASes

Giving serial devices meaningful names

  • Post author:
  • Post category:Linux

This is a hack I've been using for ages, but I thought it deserved a write up. I have USB serial devices. Lots of them. I use them for home automation things, as well as for talking to devices such as the console ports on switches and so forth. For the permanently installed serial devices one of the challenges is having them show up in predictable places so that the scripts which know how to drive each device are talking in the right place. For the trivial case, this is pretty easy with udev: $ cat /etc/udev/rules.d/60-local.rules KERNEL=="ttyUSB*", \ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \ ATTRS{serial}=="A8003Ye7", \ SYMLINK+="radish" This says for any USB serial device that is discovered (either inserted post boot, or at boot), if the USB vendor and product ID match the relevant values, to symlink the device to "/dev/radish". You find out the vendor and product ID from lsusb like this: $ lsusb Bus 003 Device 003: ID 0624:0201 Avocent Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 007 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001…

Continue ReadingGiving serial devices meaningful names

End of content

No more pages to load