Lxc container cannot use usb nfc device

I am trying to use libnfc in an lxc container that debian wheezy is running on. After trying a few things and libraries, justifying the lxc method, I finally got to the point where I don't know where to look.

The problem is that the hosts see my USB device, but not the container.

I added the following to the lxc container configuration file:

lxc.cgroup.devices.allow = c 189:* rwm

When I try to use lsusb on the container, I get:

root@nfc:~/libnfc# lsusb
unable to initialize libusb: -99

While the host gives:

Bus 006 Device 003: ID 072f:2200 Advanced Card Systems, Ltd

What device I'm looking for.

Surprisingly, the container can see the device:

root@nfc:~/libnfc# usb-devices
[...]
T:  Bus=06 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=072f ProdID=2200 Rev=02.14
S:  Manufacturer=ACS
S:  Product=ACR122U PICC Interface
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=0b(scard) Sub=00 Prot=00 Driver=(none)

I checked libusb versions, kernel modules, dependencies, but being completely ignorant, I got a little lost.

Any ideas?

+4
source share
1 answer

Addendum:

lxc.mount.entry = /dev/bus/usb dev/bus/usb none bind,optional,create=dir

lxc.cgroup.devices.allow = c 189:* rwm .

+2

All Articles