Photon OS

 View Only
Expand all | Collapse all

Photon 4R1 how to passthrough usb

  • 1.  Photon 4R1 how to passthrough usb

    Posted Oct 30, 2021 05:23 PM

    Trying to passthrough a usb controller so my portainer/octoprint can connect to my controller. Not seeing it under systemctl cant find much information on how to set this up. 



  • 2.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 31, 2021 02:30 PM

    Hi ,

    Photon OS knows a few flavors (linux-aws, linux-esx, linux-rt, linux-secure, linux). For non-cloudnative purposes better use the generic (linux) one because the generic config includes much more devices than the ESXi-purposed config. The generic bits are included in full isos x86_64 + arm64.

    A host-connected solution with passthrough of the USB controller requires PCI device and usb controller driver support. ESXi supports passthrough for many years, ESXi-Arm is quite new. Here the Photon OS driver support related links. As example, CONFIG_USB_SERIAL_CH341=m means that the CH341 chip is supported.

    For client-connected usb you could use Virtualhere usb over ip. Virtualhere runs on Photon OS. As example, to list pci and usb devices on a Virtualhere-on-PhotonOS box try this

    tdnf install pciutils usbutils
    lspci
    lsusb

     

    Hope this helps. Daniel



  • 3.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 31, 2021 03:06 PM

    So originally I attempted adding a USB controller like I had done for my powerpanel ups which worked. But I didn't see any devices on this one when I ran systemctl.

    Pollard_0-1635692331549.png

     

      sys-devices-pci0000:00-0000:00:15.0-0000:03:00.0-host0-target0:0:0-0:0:0:0-block-sda-sda1.device      loaded active plugged   Virtual_disk 1
    
      sys-devices-pci0000:00-0000:00:15.0-0000:03:00.0-host0-target0:0:0-0:0:0:0-block-sda-sda2.device      loaded active plugged   Virtual_disk 2
    
      sys-devices-pci0000:00-0000:00:15.0-0000:03:00.0-host0-target0:0:0-0:0:0:0-block-sda-sda3.device      loaded active plugged   Virtual_disk 3
    
      sys-devices-pci0000:00-0000:00:15.0-0000:03:00.0-host0-target0:0:0-0:0:0:0-block-sda.device           loaded active plugged   Virtual_disk
    
      sys-devices-pci0000:00-0000:00:16.0-0000:0b:00.0-net-eth0.device                                      loaded active plugged   VMXNET3 Ethernet Controller
    
      sys-devices-platform-floppy.0-block-fd0.device                                                        loaded active plugged   /sys/devices/platform/floppy.0/block/fd0
    
      sys-devices-platform-serial8250-tty-ttyS0.device                                                      loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS0
    
      sys-devices-platform-serial8250-tty-ttyS1.device                                                      loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS1
    
      sys-devices-platform-serial8250-tty-ttyS2.device                                                      loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS2
    
      sys-devices-platform-serial8250-tty-ttyS3.device                                                      loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS3
    
      sys-devices-virtual-net-docker0.device                                                                loaded active plugged   /sys/devices/virtual/net/docker0
    
      sys-devices-virtual-net-veth4d70e1a.device                                                            loaded active plugged   /sys/devices/virtual/net/veth4d70e1a
    
      sys-devices-virtual-net-veth9c1a7fb.device                                                            loaded active plugged   /sys/devices/virtual/net/veth9c1a7fb
    
      sys-module-configfs.device                                                                            loaded active plugged   /sys/module/configfs
    
      sys-module-fuse.device                                                                                loaded active plugged   /sys/module/fuse
    
      sys-subsystem-net-devices-docker0.device                                                              loaded active plugged   /sys/subsystem/net/devices/docker0
    
      sys-subsystem-net-devices-eth0.device                                                                 loaded active plugged   VMXNET3 Ethernet Controller
    
      sys-subsystem-net-devices-veth4d70e1a.device                                                          loaded active plugged   /sys/subsystem/net/devices/veth4d70e1a

     

    So your saying virtual here is already part of photon. What would I use for the device path in portainer?

    Pollard_1-1635692704562.png

     

    tdnf install pciutils usbutils
    
    Installing:
    libusb                   x86_64       1.0.23-1.ph4     photon-release 153.51k 15                                                                                                7197
    usbutils                 x86_64       012-1.ph4        photon-release 848.14k 86                                                                                                8496
    pciutils                 x86_64       3.7.0-1.ph4      photon-release 470.50k 48                                                                                                1790
    
    Total installed size:   1.44M 1507483
    Is this ok [y/N]: y
    
    Downloading:
    libusb                                   72710   100%
    usbutils                                263915   100%
    pciutils                                376735   100%
    Testing transaction
    Running transaction
    Installing/Updating: libusb-1.0.23-1.ph4.x86_64
    Installing/Updating: usbutils-012-1.ph4.x86_64
    Installing/Updating: pciutils-3.7.0-1.ph4.x86_64
    
    Complete!
    root@photon-machine [ ~ ]# lspci
    00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (                                                                                                rev 01)
    00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (re                                                                                                v 01)
    00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
    00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
    00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
    00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 1                                                                                                0)
    00:0f.0 VGA compatible controller: VMware SVGA II Adapter
    00:11.0 PCI bridge: VMware PCI bridge (rev 02)
    00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    02:01.0 USB controller: VMware USB1.1 UHCI Controller
    02:02.0 USB controller: VMware USB2 EHCI Controller
    03:00.0 Serial Attached SCSI controller: VMware PVSCSI SCSI Controller (rev 02)
    0b:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)
    root@photon-machine [ ~ ]# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    root@photon-machine [ ~ ]#
    root@photon-machine [ ~ ]# root@photon-machine [ ~ ]# tdnf install pciutils usbutils
    Total installed size:   1.44M 1507483
    Is this ok [y/N]: y
    
    Downloading:
    libusb                                   72710   100%
    usbutils                                263915   100%
    pciutils                                376735   100%
    Testing transaction
    Running transaction
    Installing/Updating: libusb-1.0.23-1.ph4.x86_64
    Installing/Updating: usbutils-012-1.ph4.x86_64
    Installing/Updating: pciutils-3.7.0-1.ph4.x86_64
    
    Complete!
    root@photon-machine [ ~ ]# lspci
    00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (                                                                                                rev 01)
    00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (re                                                                                                v 01)
    00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
    00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
    00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
    -bash: root@photon-machine: command not found
    00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 1                                                                                                0)
    00:0f.0 VGA compatible controller: VMware SVGA II Adapter
    00:11.0 PCI bridge: VMware PCI bridge (rev 02)
    00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)
    root@photon-machine [ ~ ]#
    root@photon-machine [ ~ ]# Installing:
    00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)
    00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)
    02:01.0 USB controller: VMware USB1.1 UHCI Controller
    -bash: Installing:: command not found
    root@photon-machine [ ~ ]# libusb                   x86_64       1.0.23-1.ph4     photon-release 153.51k 15                                                                                                7197
    0b:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)
    root@photon-machine [ ~ ]# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

     



  • 4.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 31, 2021 04:02 PM

    Attempting to do an actual passthrough now is there something I need to change in the config 1st? Or of it shows up in systemctl its supported?

     

    Pollard_0-1635696068761.png

     



  • 5.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 31, 2021 04:44 PM

    For host-connected passthrough, the hardware must be present on the physical ESXi host where the vm runs.

    For usb passthrough, on the vm settings add new device > Host USB Device, and select the usb device (your 3d printer usb device). In addition, a virtual usb controller is needed, too. Can you double check this step? Inside the photon vm, with lsusb -v you can identify usb devices and usb controllers.

    if an usb device is not supported by using the usb passthrough feature, well, you can try using the pci passthrough feature (vmdirectpass). Be aware that connecting the entire physical usb controller does not impact other functionalities (keyboard, mouse). ESXi host > configure > select pci devices in hardware section > select the usb controller. usb 2.0 (EHCI) is supported.

     



  • 6.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 01, 2021 06:34 PM

    Ahh ok I  forgot to pick the usb device. I was able to find it witht lsusb -v. its the Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter. What path would I use I tired /dev/ttyUSB0 didn't show up. 

     

     

    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               3.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         3
      bMaxPacketSize0         9
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0003 3.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 0000:1b:00.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x001f
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
            bMaxBurst               0
    Hub Descriptor:
      bLength              12
      bDescriptorType      42
      nNbrPorts             4
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      bHubDecLat          0.0 micro seconds
      wHubDelay             0 nano seconds
      DeviceRemovable    0x00
     Hub Port Status:
       Port 1: 0000.02a0 5Gbps power Rx.Detect
       Port 2: 0000.02a0 5Gbps power Rx.Detect
       Port 3: 0000.02a0 5Gbps power Rx.Detect
       Port 4: 0000.02a0 5Gbps power Rx.Detect
    Binary Object Store Descriptor:
      bLength                 5
      bDescriptorType        15
      wTotalLength       0x000f
      bNumDeviceCaps          1
      SuperSpeed USB Device Capability:
        bLength                10
        bDescriptorType        16
        bDevCapabilityType      3
        bmAttributes         0x00
        wSpeedsSupported   0x0008
          Device can operate at SuperSpeed (5Gbps)
        bFunctionalitySupport   3
          Lowest fully-functional device speed is SuperSpeed (5Gbps)
        bU1DevExitLat           0 micro seconds
        bU2DevExitLat           0 micro seconds
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0002 Virtual USB Hub
      bcdDevice            1.00
      iManufacturer           0
      iProduct                1 VMware Virtual USB Hub
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware Virtual USB Hub
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              1 VMware Virtual USB Hub
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0001  1x 1 bytes
            bInterval               4
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             7
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
      bPwrOn2PwrGood       50 * 2 milli seconds
      bHubContrCurrent    100 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xfe
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
       Port 7: 0000.0100 power
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      bNumConfigurations      1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0         8
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0002 Virtual USB Hub
      bcdDevice            1.00
      iManufacturer           0
      iProduct                1 VMware Virtual USB Hub
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware Virtual USB Hub
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              1 VMware Virtual USB Hub
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0001  1x 1 bytes
            bInterval             255
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             7
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
      bPwrOn2PwrGood       50 * 2 milli seconds
      bHubContrCurrent    100 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xfe
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
       Port 7: 0000.0100 power
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass          255 Vendor Specific Class
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x1a86 QinHeng Electronics
      idProduct          0x7523 CH340 serial converter
      bcdDevice            2.64
      iManufacturer           0
      iProduct                2 USB Serial
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0027
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0x80
          (Bus Powered)
        MaxPower               98mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      1
          bInterfaceProtocol      2
          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
          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               1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0000
      (Bus Powered)
    
    Bus 003 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0003 Virtual Mouse
      bcdDevice            1.03
      iManufacturer           1 VMware
      iProduct                2 VMware Virtual USB Mouse
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0022
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware
        bmAttributes         0xc0
          Self Powered
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      1 Boot Interface Subclass
          bInterfaceProtocol      2 Mouse
          iInterface              1 VMware
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.10
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength      46
             Report Descriptors:
               ** UNAVAILABLE **
          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               1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         1 Single TT
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0002 2.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 0000:1b:00.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             4
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
        TT think time 8 FS bits
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0103 power enable connect
       Port 2: 0000.0103 power enable connect
       Port 3: 0000.0103 power enable connect
       Port 4: 0000.0503 highspeed power enable connect
    can't get device qualifier: Resource temporarily unavailable
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0002 2.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx ehci_hcd
      iProduct                2 EHCI Host Controller
      iSerial                 1 0000:02:02.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             6
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
    can't get device qualifier: Resource temporarily unavailable
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0001 1.1 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx uhci_hcd
      iProduct                2 UHCI Host Controller
      iSerial                 1 0000:02:01.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0002  1x 2 bytes
            bInterval             255
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             2
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood        1 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered

     

     



  • 7.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 01, 2021 07:59 PM

    Ahh ok I  forgot to pick the usb device. I was able to find it witht lsusb -v. its the Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter. What path would I use 

     

    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               3.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         3
      bMaxPacketSize0         9
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0003 3.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 0000:1b:00.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x001f
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
            bMaxBurst               0
    Hub Descriptor:
      bLength              12
      bDescriptorType      42
      nNbrPorts             4
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      bHubDecLat          0.0 micro seconds
      wHubDelay             0 nano seconds
      DeviceRemovable    0x00
     Hub Port Status:
       Port 1: 0000.02a0 5Gbps power Rx.Detect
       Port 2: 0000.02a0 5Gbps power Rx.Detect
       Port 3: 0000.02a0 5Gbps power Rx.Detect
       Port 4: 0000.02a0 5Gbps power Rx.Detect
    Binary Object Store Descriptor:
      bLength                 5
      bDescriptorType        15
      wTotalLength       0x000f
      bNumDeviceCaps          1
      SuperSpeed USB Device Capability:
        bLength                10
        bDescriptorType        16
        bDevCapabilityType      3
        bmAttributes         0x00
        wSpeedsSupported   0x0008
          Device can operate at SuperSpeed (5Gbps)
        bFunctionalitySupport   3
          Lowest fully-functional device speed is SuperSpeed (5Gbps)
        bU1DevExitLat           0 micro seconds
        bU2DevExitLat           0 micro seconds
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0002 Virtual USB Hub
      bcdDevice            1.00
      iManufacturer           0
      iProduct                1 VMware Virtual USB Hub
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware Virtual USB Hub
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              1 VMware Virtual USB Hub
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0001  1x 1 bytes
            bInterval               4
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             7
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
      bPwrOn2PwrGood       50 * 2 milli seconds
      bHubContrCurrent    100 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xfe
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
       Port 7: 0000.0100 power
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      bNumConfigurations      1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0         8
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0002 Virtual USB Hub
      bcdDevice            1.00
      iManufacturer           0
      iProduct                1 VMware Virtual USB Hub
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware Virtual USB Hub
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              1 VMware Virtual USB Hub
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0001  1x 1 bytes
            bInterval             255
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             7
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
      bPwrOn2PwrGood       50 * 2 milli seconds
      bHubContrCurrent    100 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xfe
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
       Port 7: 0000.0100 power
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass          255 Vendor Specific Class
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x1a86 QinHeng Electronics
      idProduct          0x7523 CH340 serial converter
      bcdDevice            2.64
      iManufacturer           0
      iProduct                2 USB Serial
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0027
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0x80
          (Bus Powered)
        MaxPower               98mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      1
          bInterfaceProtocol      2
          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
          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               1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0000
      (Bus Powered)
    
    Bus 003 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x0e0f VMware, Inc.
      idProduct          0x0003 Virtual Mouse
      bcdDevice            1.03
      iManufacturer           1 VMware
      iProduct                2 VMware Virtual USB Mouse
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0022
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          1 VMware
        bmAttributes         0xc0
          Self Powered
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      1 Boot Interface Subclass
          bInterfaceProtocol      2 Mouse
          iInterface              1 VMware
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.10
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength      46
             Report Descriptors:
               ** UNAVAILABLE **
          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               1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         1 Single TT
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0002 2.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 0000:1b:00.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             4
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
        TT think time 8 FS bits
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0103 power enable connect
       Port 2: 0000.0103 power enable connect
       Port 3: 0000.0103 power enable connect
       Port 4: 0000.0503 highspeed power enable connect
    can't get device qualifier: Resource temporarily unavailable
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0002 2.0 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx ehci_hcd
      iProduct                2 EHCI Host Controller
      iSerial                 1 0000:02:02.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             6
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
       Port 3: 0000.0100 power
       Port 4: 0000.0100 power
       Port 5: 0000.0100 power
       Port 6: 0000.0100 power
    can't get device qualifier: Resource temporarily unavailable
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered
    
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         0 Full speed (or root) hub
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0001 1.1 root hub
      bcdDevice            5.10
      iManufacturer           3 Linux 5.10.61-1.ph4-esx uhci_hcd
      iProduct                2 UHCI Host Controller
      iSerial                 1 0000:02:01.0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0019
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0002  1x 2 bytes
            bInterval             255
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             2
      wHubCharacteristic 0x000a
        No power switching (usb 1.0)
        Per-port overcurrent protection
      bPwrOn2PwrGood        1 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0100 power
       Port 2: 0000.0100 power
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered

     



  • 8.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 02, 2021 04:25 AM

    Journalctl protocol helps identifying the tty device connected over usb.

    journalctl -b -1 | grep tty



  • 9.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 02, 2021 12:50 PM

    I was thinking the CH341 drivers would work for the CH340 but its not showing any tty/usb.

     

     

     

     

    root@photon-machine [ ~ ]# journalctl -b -1 | grep tty
    Nov 02 13:08:50 photon-machine kernel: printk: console [tty0] enabled
    Nov 02 13:08:50 photon-machine systemd[1]: Created slice Slice /system/getty.
    Nov 02 13:08:55 photon-machine systemd[1]: Started Getty on tty1.
    Nov 02 13:09:05 photon-machine kernel: audit: type=1006 audit(1635858545.583:83)                                                     : pid=1062 uid=0 subj==unconfined old-auid=4294967295 auid=0 tty=(none) old-ses=                                                     4294967295 ses=1 res=1
    Nov 02 13:09:05 photon-machine kernel: audit: type=1006 audit(1635858545.623:84)                                                     : pid=1052 uid=0 subj==unconfined old-auid=4294967295 auid=0 tty=(none) old-ses=                                                     4294967295 ses=2 res=1
    root@photon-machine [ ~ ]# lsusb
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 003 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    Bus 003 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


  • 10.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 02, 2021 02:03 PM

    The problem is that there is no ttyUSB or similar. Can you post the output from following lines?

    modinfo ch341
    uname -r
    ls /dev/tty*

     

    Here's a sample.

    root@photonos [ ~ ]# modinfo ch341
    filename: /lib/modules/5.10.61-2.ph4/kernel/drivers/usb/serial/ch341.ko.xz
    license: GPL v2
    srcversion: D1F1D2B7899A3E400010C90
    alias: usb:v9986p7523d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v4348p5523d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v1A86p7523d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v1A86p7522d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v1A86p5523d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v1A86p5512d*dc*dsc*dp*ic*isc*ip*in*
    depends: usbserial,usbcore
    retpoline: Y
    intree: Y
    name: ch341
    vermagic: 5.10.61-2.ph4 SMP mod_unload modversions
    sig_id: PKCS#7
    signer:
    sig_key:
    sig_hashalgo: unknown
    signature:
    root@photonos [ ~ ]# uname -r
    5.10.61-2.ph4
    root@photonos [ ~ ]# ls /dev/tty*
    /dev/tty /dev/tty14 /dev/tty20 /dev/tty27 /dev/tty33 /dev/tty4 /dev/tty46 /dev/tty52 /dev/tty59 /dev/tty8 /dev/ttyS5
    /dev/tty0 /dev/tty15 /dev/tty21 /dev/tty28 /dev/tty34 /dev/tty40 /dev/tty47 /dev/tty53 /dev/tty6 /dev/tty9 /dev/ttyS6
    /dev/tty1 /dev/tty16 /dev/tty22 /dev/tty29 /dev/tty35 /dev/tty41 /dev/tty48 /dev/tty54 /dev/tty60 /dev/ttyS0 /dev/ttyS7
    /dev/tty10 /dev/tty17 /dev/tty23 /dev/tty3 /dev/tty36 /dev/tty42 /dev/tty49 /dev/tty55 /dev/tty61 /dev/ttyS1
    /dev/tty11 /dev/tty18 /dev/tty24 /dev/tty30 /dev/tty37 /dev/tty43 /dev/tty5 /dev/tty56 /dev/tty62 /dev/ttyS2
    /dev/tty12 /dev/tty19 /dev/tty25 /dev/tty31 /dev/tty38 /dev/tty44 /dev/tty50 /dev/tty57 /dev/tty63 /dev/ttyS3
    /dev/tty13 /dev/tty2 /dev/tty26 /dev/tty32 /dev/tty39 /dev/tty45 /dev/tty51 /dev/tty58 /dev/tty7 /dev/ttyS4
    root@photonos [ ~ ]#

     

     



  • 11.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 02, 2021 02:50 PM

    Ahh its saying the ch341 module isn't found. I used the OVA with virtual hardware v13 (UEFI Secure Boot) version can I install that module or do I need to re-install using the full iso version? I think it might be better to do an actual passthrough of the usb controller the usb device appears to not automatically rebind when I cut the 3d printer off and back on. The 8 Series/C220 Series Chipset Family USB EHCI #1 does show up under lspci not sure if it has the drivers.

     

     

     

    root@photon-machine [ ~ ]# modinfo ch341
    modinfo: ERROR: Module ch341 not found.
    root@photon-machine [ ~ ]# uname -r
    5.10.61-1.ph4-esx
    root@photon-machine [ ~ ]# ls /dev/tty*
    /dev/tty    /dev/tty19  /dev/tty3   /dev/tty40  /dev/tty51  /dev/tty62
    /dev/tty0   /dev/tty2   /dev/tty30  /dev/tty41  /dev/tty52  /dev/tty63
    /dev/tty1   /dev/tty20  /dev/tty31  /dev/tty42  /dev/tty53  /dev/tty7
    /dev/tty10  /dev/tty21  /dev/tty32  /dev/tty43  /dev/tty54  /dev/tty8
    /dev/tty11  /dev/tty22  /dev/tty33  /dev/tty44  /dev/tty55  /dev/tty9
    /dev/tty12  /dev/tty23  /dev/tty34  /dev/tty45  /dev/tty56  /dev/ttyS0
    /dev/tty13  /dev/tty24  /dev/tty35  /dev/tty46  /dev/tty57  /dev/ttyS1
    /dev/tty14  /dev/tty25  /dev/tty36  /dev/tty47  /dev/tty58  /dev/ttyS2
    /dev/tty15  /dev/tty26  /dev/tty37  /dev/tty48  /dev/tty59  /dev/ttyS3
    /dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6
    /dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60
    /dev/tty18  /dev/tty29  /dev/tty4   /dev/tty50  /dev/tty61

     

     

     

    root@photon-machine [ ~ ]# cat /etc/os-release
    NAME="VMware Photon OS"
    VERSION="4.0"
    ID=photon
    VERSION_ID=4.0
    PRETTY_NAME="VMware Photon OS/Linux"
    ANSI_COLOR="1;34"
    HOME_URL="https://vmware.github.io/photon/"
    BUG_REPORT_URL="https://github.com/vmware/photon/issues"

     

      



  • 12.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 02, 2021 04:27 PM

    The ESXi optimized and hardened Photon OS bits (.phX-esx) do not contain usb port drivers like ch341, belkin, prolific, etc. and only a few of them are included in the generic kernel version.

    As example, an anycubic vyper 3d scanner uses internally a ch341 chip. Hence, for a host-connected solution with passthrough the chain 3d scanner - ESXi - Photon OS - your-management-and-dashboard-solution must be quaranteed. The same approach goes for a client-connected solution as well.

    The ch341 module is already included in the full iso x86_64. Yes you can easily setup Photon OS using the full iso and should have the host-connected interoperability.

    I will try these next days to assemble a recipe on how to add usb port drivers on ph4-esx as it might be an interesting use case for others as well.



  • 13.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 05, 2021 02:52 AM

    Which version of 4 has the CH drivers I tried the realtime since it look to have the most installed. But that's even saying it doesn't have them. Guess I'll try Photon 3 in the meantime

    Minimal
    Developer
    OSTree Host
    Real Time



  • 14.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 16, 2021 12:12 PM

    In Photon 4.0 rev1 (aarch64, developer) on Pi4b I've noticed that the ch341 driver isn't built-in available, indeed. There is a 3rd party github repo with an older ch34x driver and after the installation it is recognized as usb driver.

    The following driver installation recipe isn't optimized. At least accordingly to the dmesg output the functionality seems to work, and there should be a /dev/tty* entry. Unfortunately I do not have a test device. 

    In addition, the author of the driver clearly mentioned the prerequisites - those are important for the Photon 3+4 bits as well: It may happen, that kernel doesn't contain CONFIG_USB_SERIAL_CH341 flag, but you need it or it is disabled. You have to check configs of the kernel you are using.

    Not sure if the following recipe helps in your portainer related scenario on ESXi x86_64 using Photon 3 or 4.

    tdnf distro-sync -y
    tdnf install build-essential git linux-api-headers linux-devel usbutils -y
    # reboot here mkdir /lib/modules/$(uname -r)/build git clone https://github.com/juliagoda/CH341SER cd CH341SER make ls ch34x.ko ¦ xargs gzip cp ch34x.ko.gz /usr/lib/modules/$(uname -r)/kernel/drivers/usb/serial cp ch34x.ko.gz /lib/modules/$(uname -r)/kernel/drivers/usb/serial depmod -a modprobe ch34x lsmod dmesg ¦ grep ch34 ls /dev/tty* modinfo ch34x

     



  • 15.  RE: Photon 4R1 how to passthrough usb

    Posted Nov 27, 2021 02:44 PM

    Just now circling back on this. I ended up getting a new 32-bit board for my printer that shows up as STMicroelectronics GENERICSTM32F103RC CDC in FS Mode.

    Pollard_0-1638024212310.png

    I was able to get octoprint working with it just by passing the usb device through and using g host /dev/ttyUSB0 and container /dev/ttyACM0. 

     

     

     

    ** Adding this in here ** Mine quit working recently after an update ran 

    ls -l /dev/serial/by-id  which informed me for whatever reason my host change from /dev/ttyUSB0 to /dev/ttyACM0 so now I haver to put the for the host and container.



  • 16.  RE: Photon 4R1 how to passthrough usb

    Posted Mar 25, 2023 08:25 PM


     wrote:

    Just now circling back on this. I ended up getting a new 32-bit board for my printer that shows up as STMicroelectronics GENERICSTM32F103RC CDC in FS Mode.

    Pollard_0-1638024212310.png

    I was able to get octoprint working with it just by passing the usb device through and using g host /dev/ttyUSB0 and container /dev/ttyACM0. 

     

     

     

    ** Adding this in here ** Mine quit working recently after an update ran 

    ls -l /dev/serial/by-id  which informed me for whatever reason my host change from /dev/ttyUSB0 to /dev/ttyACM0 so now I haver to put the for the host and container.


    Please, forget the recent replies. Wrong way. It doesn't help for the /dev/ttyACM0 issue.

    If the symlink /dev/ttyACM0 still is an issue, have a look to the directory content /etc/udev/rules.d/  
    - there might be a rules configuration file beside the 99-vmware-hotplug.rules file.
       Inside such a file, you could find something like KERNEL=="ttyACM", Subsystem, VendorId, ProductID, Symlink, ...
    - An usb device attached to the vm should be e.g. /dev/bus/usb/001/003.
      To identify the usb device, run e.g. lsusb -D /dev/bus/usb/001/003 . To identify symlink try e.g. ls -l /dev/bus/usb/001 .
    - udevadm info /dev/bus/usb/001/003 shows device information from udev database.
      udevadm info -q path /dev/bus/usb/001/003 shows the full pci path.
    - Files in /etc/modprobe.d/ are used to pass module settings to udev . On ESXi with attached usb devices for a Photon OS vm, see usb.conf entries sequence ohci and uhci .
    This is the way.



  • 17.  RE: Photon 4R1 how to passthrough usb

    Posted Apr 26, 2022 08:56 AM

    This is working perfectly in Photon minimal (4.0-c001795b8)! I'm using PhotonOS as a VM with the specialised kernel in ESXi vSphere 7.0 Update 3.

    The post initially mentioned passthrough but my problem had more or less to do with what  described as the CH340 USB to serial controller wasn't recognised in the kernel due to the missing driver.

    I don't see the point in installing the full ~4GB image just for this one device when I can use the minimal ~400MB image and this fantastic 'hack' - Thanks!



  • 18.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 29, 2022 02:18 PM

    Trying to determine the path i.e. "ttyACM0" of the webcam so I can pass add the device through docker. 

    Looking for the logitech webcam shown here

    root@photon [ ~ ]# lsusb
    Bus 001 Device 002: ID 046d:085b Logitech, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 004: ID 0483:5740 STMicroelectronics Virtual COM Port
    Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    

     

    This command only return's the 3d printer

     

    root@photon [ ~ ]# ls -l /dev/serial/by-id
    total 0
    lrwxrwxrwx 1 root root 13 Oct 29 13:41 usb-STMicroelectronics_GENERICSTM32F103RC_CDC_in_FS_Mode_48FD84643530-if00 -> ../../ttyACM0

     

     



  • 19.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 29, 2022 07:28 PM

     the following recipe does not work yet. I will give a try these days to finish it.

    First, see https://docs.vmware.com/en/VMware-Horizon/2206/linux-desktops-setup/GUID-F3F2D262-62DA-4DFC-810D-FFEF5FA49A66.html

    We need the so-called v4l2loopback driver. To list webcam (and audio) devices, the v4l-utils have to be installed. Here the x86_64 snippet.

    tdnf install -y wget curl tar build-essential libjpeg-turbo-devel gettext
    wget http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.22.1.tar.bz2
    tar xf v4l-utils-1.22.1.tar.bz2
    cd v4l-utils-1.22.1
    ./bootstrap.sh
    ./configure
    make
    make install
    ./utils/v4l2-ctl/v4l2-ctl --list-devices

    This should work flawlessly, but v4l2-ctl --list-devices throws out cannot open device /dev/video0, exiting. which makes sense because the v4l2loopback driver isn't installed yet.

    The following code snippet for the v4l2loopback driver produces errors e.g. ERROR: "video_ioctl2" [./v4l2loopback.ko] undefined! on the step make .

    tdnf install -y linux-esx-devel dkms unzip git
    cd /usr/src
    mkdir v4l2loopback
    git clone https://github.com/umlaeute/v4l2loopback.git v4l2loopback
    cd v4l2loopback
    make
    make install

    Accordingly to a github issue entry here of minijackson, the kernel option CONFIG_MEDIA_SUPPORT has to be added.

    Head banging on Photon OS 4.0 rev 2, 5.10.142.4.ph4-esx.

    # 10/30/2022: modified code snippet v4l-utils for Photon OS 3.0 compatibility



  • 20.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 30, 2022 03:09 PM

    Got a few errors

    Running
    VMware Photon OS 3.0
    PHOTON_BUILD_NUMBER=11dd065

    root@photon [ ~/v4l-utils-1.22.1 ]# ./bootstrap.sh
    autoreconf: Entering directory `.'
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal --force -I m4
    configure.ac:101: warning: macro 'AM_GNU_GETTEXT' not found in library
    configure.ac:348: warning: macro 'AM_ICONV' not found in library
    autoreconf: configure.ac: tracing
    autoreconf: running: libtoolize --copy --force
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
    libtoolize: copying file 'build-aux/ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: copying file 'm4/libtool.m4'
    libtoolize: copying file 'm4/ltoptions.m4'
    libtoolize: copying file 'm4/ltsugar.m4'
    libtoolize: copying file 'm4/ltversion.m4'
    libtoolize: copying file 'm4/lt~obsolete.m4'
    configure.ac:101: warning: macro 'AM_GNU_GETTEXT' not found in library
    configure.ac:348: warning: macro 'AM_ICONV' not found in library
    autoreconf: running: /usr/bin/autoconf --force
    configure.ac:100: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:101: error: possibly undefined macro: AM_GNU_GETTEXT
    configure.ac:348: error: possibly undefined macro: AM_ICONV
    autoreconf: /usr/bin/autoconf failed with exit status: 1
    ./bootstrap.sh: line 9: gettextize: command not found
    ./bootstrap.sh: line 13: $GETTEXTIZE: ambiguous redirect
    chmod: cannot access './gettextize': No such file or directory
    Generating locale v4l-utils-po build files for gettext version
    ./bootstrap.sh: line 17: ./gettextize: No such file or directory
    Generating locale libdvbv5-po build files for gettext version
    ./bootstrap.sh: line 20: ./gettextize: No such file or directory

     



  • 21.  RE: Photon 4R1 how to passthrough usb

    Posted Oct 30, 2022 07:46 PM