Hello! I’m not sure if this is exactly an LXD related issue, please let me know if not.
In my setup I have an LXC debian container to run deCONZ, a zigbee device manager, which works through a USB gateway device.
I am running this on a raspberry pi, running raspberry pi debian image.
I had no issues when I was running debian 10, and creating a debian 10 container. Now I have updated to debian 11, and using debian 11 container I started to have issues with deCONZ reading the USB. From the software, I see that it does not pick vendor, product and firmware details and the gateway doesn’t seem to work.
In order to mount and make available the usb, I am doing the following:
- In my profile;
raw.lxc: |- lxc.cgroup.devices.allow = c 166:* rwm lxc.mount.entry = /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file 0 0
- Inside the container;
chown root:dialout /dev/ttyACM0 chmod 664 /dev/ttyACM0 mkdir -p /run/udev/data setcap cap_net_bind_service+ep /usr/bin/deCONZ echo -e 'E:ID_VENDOR_ID=1cf1\nE:ID_MODEL_ID=0030' > /run/udev/data/c166:0
I have tried mounting /dev/bus/usb/001/003 device address instead ( with the right cgroup number; 189 ) and I tried using lxc config device add instead. I also tried running a debian 10 container ( host debian 11 ) with the same variations but no success. It only worked again when I reverted my host to debian 10. It also worked smoothly when installing the software directly on the host ( debian 11 )
Some more info; deCONZ provides a CLI vendor utility to check for USB stick
This command only lists the USB ( tested when running host and container debian 11 ) when I mount usb as ttyACM0 ( still not read from software ).
Any chance someone can point me out how to debug and fix this? This is the only thing in my whole set up that might make me roll back to debian 10.