USB passthrough is not working

octopus2903

New Member
Jan 14, 2018
10
0
1
49
Hello from a bloody beginner!

I have a container with ubuntu server and try to passthrough some USB devices.
Unfortunately it do not work.

The devices are connected via USB hub to my Intel Nuc.

On Proxmox host I have the following devices:
Code:
ZWAVE
root@proxmox:~# ls -la /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Jan 13 11:55 /dev/ttyACM0
Bus 001 Device 020: ID 0658:0200 Sigma Designs, Inc.

Viessmann Optokoppler
crw-rw---- 1 root dialout 188, 0 Jan 13 12:01 /dev/ttyUSB0
Bus 001 Device 021: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Lacrosse Jeelink
Bus 001 Device 022: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
crw-rw---- 1 root dialout 188, 1 Jan 13 12:03 /dev/ttyUSB1

mit Cul868 (Attention: This device is connected via LAN-USB-LAN connector (appr. 12 Meter Cat7)
Bus 001 Device 023: ID 03eb:204b Atmel Corp. LUFA USB to Serial Adapter Project
crw-rw---- 1 root dialout 166, 1 Jan 13 12:05 /dev/ttyACM1

mit OWL Strommesser
Bus 001 Device 025: ID 0fde:ca05 Oregon Scientific CM160
crw-rw---- 1 root dialout 188, 2 Jan 13 12:14 /dev/ttyUSB2






Now I added the devices via ALIAS to /etc/udev/rules.d/99-usb-serial.rules:
Code:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwave"

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A900WVZZ", SYMLINK+="viessmann"

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AL01MZ4B", SYMLINK+="jeelink"

SUBSYSTEM=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204b", SYMLINK+="cul"

SUBSYSTEM=="tty", ATTRS{idVendor}=="0fde", ATTRS{idProduct}=="ca05", ATTRS{serial}=="0077CF1A", SYMLINK+="owl160"


When I check in host via "ls -la /dev/" I get only 4 from 5 devices:
Code:
lrwxrwxrwx  1 root root             7 Jan 13 17:27 jeelink -> ttyUSB1
lrwxrwxrwx  1 root root             7 Jan 13 17:27 owl160 -> ttyUSB2
lrwxrwxrwx  1 root root             7 Jan 13 17:27 viessmann -> ttyUSB0
lrwxrwxrwx  1 root root             7 Jan 13 17:27 zwave -> ttyACM0

cul is missing. why?


Then I put all symlinks into
/etc/pve/lxc/100.conf:


Code:
arch: amd64
cores: 4
hostname: fhem-container
memory: 4192
net0: name=eth0,bridge=vmbr0,gw=192.168.0.1,hwaddr=52:7E:2B:F2:EE:2A,ip=192.168.0.25/24,ip6=dhcp,type=veth
onboot: 1
ostype: ubuntu
parent: rohinstallation
rootfs: local-lvm:vm-100-disk-1,size=40G
swap: 2048
tty: 6


[rohinstallation]
#Ubuntu, User PI mit sudo
#FTP
#Samba
#FHEM
arch: amd64
cores: 4
hostname: fhem-container
memory: 4192
net0: name=eth0,bridge=vmbr0,gw=192.168.0.1,hwaddr=52:7E:2B:F2:EE:2A,ip=192.168.0.25/24,ip6=dhcp,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-100-disk-1,size=40G
snaptime: 1515795543
swap: 2048

lxc.mount.entry = /dev/serial/by-id/               dev/serial/by-id        none bind,optional,create=dir
# lxc.aa_profile: unconfined
lxc.cgroup.devices.allow = c 166:* rwm
lxc.cgroup.devices.allow = c 188:* rwm
lxc.mount.entry = /dev/zwave dev/zwave none bind,optional,create=dir
lxc.mount.entry = /dev/viessmann dev/viessmann none bind,optional,create=dir
lxc.mount.entry = /dev/jeelink dev/jeelink none bind,optional,create=dir
lxc.mount.entry = /dev/cul dev/cul none bind,optional,create=dir
lxc.mount.entry = /dev/owl160 dev/owl160 none bind,optional,create=dir



I restarted both: host and guest.
When I try to find the devices in the Container via

ls -la /dev/
there are no devices

When I do
lsusb
I can see my devices on guest system:
Code:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 009: ID 03eb:204b Atmel Corp. LUFA USB to Serial Adapter Project
Bus 001 Device 008: ID 0fde:ca05 Oregon Scientific CM160
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 006: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

BUT, when I do
lsusb -vs 001:005
I get some information, beginning with an error message
Code:
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc.

Couldn't open device, some information will be missing

Device Descriptor:

  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0658 Sigma Designs, Inc.
  idProduct          0x0200
  bcdDevice            0.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x00
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0


Can you please help me to passthrough my 5 USB devices?

P.S. Are there no code tags in the forum? (ok, first issue is solved: I found the code tags ;-) )
 
Last edited:
Hi,

i connect to viessmann (vcontrold) without any problems.

In your lxc.conf use colon (doppelpunkt) instead of equal (=). And give other create mode a try.
Code:
lxc.cgroup.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/viessmann dev/viessmann none bind,optional,create=file

Must write "doppelpunkt" because the colon in clinch create a smily :)
Hope its works.

DerGraf
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!