GithubHelp home page GithubHelp logo

Comments (7)

wzw88486969 avatar wzw88486969 commented on May 18, 2024

ls /sys/class/udc/

dummy_udc.0 usbip-vudc.0

cat /sys/class/udc/usbip-vudc.0/uevent

USB_UDC_NAME=usbip-vudc

lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 054c:0ce6 Sony Corp. Wireless Controller
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

from usb-proxy.

AristoChen avatar AristoChen commented on May 18, 2024

Hi,

thanks for reporting the issue! please provide the following info

  • the name of the device that you are using(for example: raspberry pi 4)
  • the output of the command lsusb -v -d 054c:0ce6
  • the output of the command ./usb-proxy --device=usbip-vudc.0 --driver=usbip-vudc --vendor_id=054c --product_id=0ce6 --verbose, which will generate some debug info, might be helpful
  • the output of the command ./usb-proxy --vendor_id=054c --product_id=0ce6 --verbose, looks like you have dummy_hcd on your system, so let's see if it works.

from usb-proxy.

wzw88486969 avatar wzw88486969 commented on May 18, 2024

Thank you for the author's reply. I executed several commands and output corresponding information

root@eden:/wang/usb-proxyA# uname -a
Linux eden 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------


root@eden:/wang/usb-proxyA# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1604:10c0 Tascam
Bus 001 Device 005: ID 1604:10c0 Tascam
Bus 001 Device 004: ID 1604:10c0 Tascam
Bus 001 Device 002: ID 3151:3020 YICHIP Wireless Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------

root@eden:/wang/usb-proxyA# sudo usbip list -r  192.168.88.192
Exportable USB devices
======================
 - 192.168.88.192
        1-1: Sony Corp. : unknown product (054c:0ce6)
           : /sys/devices/pci0000:00/0000:00:0b.0/usb1/1-1
           : (Defined at Interface level) (00/00/00)

//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------

root@eden:/wang/usb-proxyA# sudo usbip attach -r 192.168.88.192 -b 1-1

//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------

root@eden:/wang/usb-proxyA# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 054c:0ce6 Sony Corp. Wireless Controller
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1604:10c0 Tascam
Bus 001 Device 005: ID 1604:10c0 Tascam
Bus 001 Device 004: ID 1604:10c0 Tascam
Bus 001 Device 002: ID 3151:3020 YICHIP Wireless Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------


root@eden:/wang/usb-proxyA# lsusb -v -d 054c:0ce6
Bus 003 Device 002: ID 054c:0ce6 Sony Corp. Wireless Controller
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x054c Sony Corp.
  idProduct          0x0ce6
  bcdDevice            1.00
  iManufacturer           1 Sony Interactive Entertainment
  iProduct                2 Wireless Controller
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x00e3
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0
      iInterface              0
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x0049
        bInCollection           2
        baInterfaceNr(0)        1
        baInterfaceNr(1)        2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          6
        bNrChannels             4
        wChannelConfig     0x0033
          Left Front (L)
          Right Front (R)
          Left Surround (LS)
          Right Surround (RS)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 2
        bSourceID               1
        bControlSize            1
        bmaControls(0)       0x03
          Mute Control
          Volume Control
        bmaControls(1)       0x00
        bmaControls(2)       0x00
        bmaControls(3)       0x00
        bmaControls(4)       0x00
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0301 Speaker
        bAssocTerminal          4
        bSourceID               2
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0402 Headset
        bAssocTerminal          3
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 5
        bSourceID               4
        bControlSize            1
        bmaControls(0)       0x03
          Mute Control
          Volume Control
        bmaControls(1)       0x00
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             6
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          1
        bSourceID               5
        iTerminal               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag         0x0001 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             4
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0188  1x 392 bytes
        bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bDelay                  1 frames
        wFormatTag         0x0001 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c4  1x 196 bytes
        bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     273
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               6
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               6
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)


//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------

root@eden:/wang/usb-proxyA# ls /sys/class/udc/
dummy_udc.0  usbip-vudc.0
root@eden:/wang/usb-proxyA# cat /sys/class/udc/dummy_udc.0/uevent
USB_UDC_NAME=dummy_udc
root@eden:/wang/usb-proxyA#  cat /sys/class/udc/usbip-vudc.0/uevent
USB_UDC_NAME=usbip-vudc


//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------

root@eden:/wang/usb-proxyA# ./usb-proxy --device=usbip-vudc.0 --driver=usbip-vudc --vendor_id=054c --product_id=0ce6 --verbose
Device is: usbip-vudc.0
Driver is: usbip-vudc
vendor_id is: 1356
product_id is: 3302
10 Devices in list
Target device not found
Device opened successfully
Start hotplug_monitor thread, thread id(11273)
InterfaceNumber 0 AlternateSetting 0 has no endpoint, skip
InterfaceNumber 1 AlternateSetting 0 has no endpoint, skip
InterfaceNumber 2 AlternateSetting 0 has no endpoint, skip
Setup USB config successfully
Start for EP0, thread id(11264)
ep #0:
  name: ep1out
  addr: 1
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #1:
  name: ep1in
  addr: 1
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #2:
  name: ep2out
  addr: 2
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #3:
  name: ep2in
  addr: 2
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #4:
  name: ep3out
  addr: 3
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #5:
  name: ep3in
  addr: 3
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #6:
  name: ep4out
  addr: 4
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #7:
  name: ep4in
  addr: 4
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #8:
  name: ep5out
  addr: 5
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #9:
  name: ep5in
  addr: 5
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #10:
  name: ep6out
  addr: 6
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #11:
  name: ep6in
  addr: 6
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #12:
  name: ep7out
  addr: 7
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #13:
  name: ep7in
  addr: 7
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #14:
  name: ep8out
  addr: 8
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #15:
  name: ep8in
  addr: 8
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #16:
  name: ep9out
  addr: 9
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #17:
  name: ep9in
  addr: 9
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #18:
  name: ep10out
  addr: 10
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #19:
  name: ep10in
  addr: 10
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #20:
  name: ep11out
  addr: 11
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #21:
  name: ep11in
  addr: 11
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #22:
  name: ep12out
  addr: 12
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #23:
  name: ep12in
  addr: 12
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #24:
  name: ep13out
  addr: 13
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #25:
  name: ep13in
  addr: 13
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #26:
  name: ep14out
  addr: 14
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #27:
  name: ep14in
  addr: 14
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #28:
  name: ep15out
  addr: 15
  type: iso blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #29:
  name: ep15in
  addr: 15
  type: iso blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
event: connect, length: 0

//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------


root@eden:/wang/usb-proxyA# ./usb-proxy --vendor_id=054c --product_id=0ce6 --verbose
Device is: dummy_udc.0
Driver is: dummy_udc
vendor_id is: 1356
product_id is: 3302
10 Devices in list
Target device not found
Device opened successfully
Start hotplug_monitor thread, thread id(7190)
InterfaceNumber 0 AlternateSetting 0 has no endpoint, skip
InterfaceNumber 1 AlternateSetting 0 has no endpoint, skip
InterfaceNumber 2 AlternateSetting 0 has no endpoint, skip
Setup USB config successfully
Start for EP0, thread id(7168)
ep #0:
  name: ep1in-bulk
  addr: 1
  type: ___ blk ___
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #1:
  name: ep2out-bulk
  addr: 2
  type: ___ blk ___
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #2:
  name: ep5in-int
  addr: 5
  type: ___ ___ int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #3:
  name: ep6in-bulk
  addr: 6
  type: ___ blk ___
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #4:
  name: ep7out-bulk
  addr: 7
  type: ___ blk ___
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #5:
  name: ep10in-int
  addr: 10
  type: ___ ___ int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #6:
  name: ep11in-bulk
  addr: 11
  type: ___ blk ___
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #7:
  name: ep12out-bulk
  addr: 12
  type: ___ blk ___
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #8:
  name: ep15in-int
  addr: 15
  type: ___ ___ int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #9:
  name: ep1out-bulk
  addr: 1
  type: ___ blk ___
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #10:
  name: ep2in-bulk
  addr: 2
  type: ___ blk ___
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #11:
  name: ep-aout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #12:
  name: ep-bin
  addr: 255
  type: ___ blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #13:
  name: ep-cout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #14:
  name: ep-dout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #15:
  name: ep-ein
  addr: 255
  type: ___ blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #16:
  name: ep-fout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #17:
  name: ep-gin
  addr: 255
  type: ___ blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #18:
  name: ep-hout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #19:
  name: ep-iout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #20:
  name: ep-jin
  addr: 255
  type: ___ blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #21:
  name: ep-kout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
ep #22:
  name: ep-lin
  addr: 255
  type: ___ blk int
  dir : in  ___
  maxpacket_limit: 65535
  max_streams: 16
ep #23:
  name: ep-mout
  addr: 255
  type: ___ blk int
  dir : ___ out
  maxpacket_limit: 65535
  max_streams: 16
event: connect, length: 0
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 64
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
Control transfer succeed
ep0: transferred 18 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_DEVICE
Control transfer succeed
ep0: transferred 18 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 9
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
Control transfer succeed
ep0: transferred 9 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 227
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_CONFIG
Control transfer succeed
ep0: transferred 227 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0300, wIndex: 0x0000, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
Control transfer succeed
ep0: transferred 4 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0302, wIndex: 0x0409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
Control transfer succeed
ep0: transferred 40 bytes (in)
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0301, wIndex: 0x0409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
Control transfer succeed
ep0: transferred 62 bytes (in)
event: control, length: 8
  bRequestType: 0x00 (OUT), bRequest: 0x09, wValue: 0x0001, wIndex: 0x0000, wLength: 0
  type = USB_TYPE_STANDARD
  req = USB_REQ_SET_CONFIGURATION
Activating 0 endpoints on interface 0
process_eps done
Activating 0 endpoints on interface 1
process_eps done
Activating 0 endpoints on interface 2
process_eps done
Activating 2 endpoints on interface 3
int_in: addr = 4, ep = #12
Creating thread for EP84
Start reading thread for EP84, thread id(7208)
Start writing thread for EP84, thread id(7209)
int_out: addr = 3, ep = #11
Creating thread for EP03
Start reading thread for EP03, thread id(7210)
process_eps done
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0302, wIndex: 0x0409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
Start writing thread for EP03, thread id(7211)
Control transfer succeed
ep0: transferred 40 bytes (in)
EP84(int_in): enqueued 64 bytes to queue
EP84(int_in): wrote 64 bytes to host
event: control, length: 8
  bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0301, wIndex: 0x0409, wLength: 255
  type = USB_TYPE_STANDARD
  req = USB_REQ_GET_DESCRIPTOR
  desc = USB_DT_STRING
Control transfer succeed
ep0: transferred 62 bytes (in)
EP84(int_in): enqueued 64 bytes to queue
event: control, length: 8
  bRequestType: 0x01 (OUT), bRequest: 0x0b, wValue: 0x0000, wIndex: 0x0001, wLength: 0
  type = USB_TYPE_STANDARD
  req = USB_REQ_SET_INTERFACE
EP84(int_in): enqueued 64 bytes to queue
EP84(int_in): enqueued 64 bytes to queue
Changing interface/altsetting
Activating 0 endpoints on interface 1
process_eps done
EP84(int_in): enqueued 64 bytes to queue
event: control, length: 8
  bRequestType: 0x01 (OUT), bRequest: 0x0b, wValue: 0x0001, wIndex: 0x0001, wLength: 0
  type = USB_TYPE_STANDARD
  req = USB_REQ_SET_INTERFACE
Changing interface/altsetting
Activating 1 endpoints on interface 1
EP84(int_in): enqueued 64 bytes to queue
ioctl(USB_RAW_IOCTL_EP_ENABLE): Invalid argument

from usb-proxy.

wzw88486969 avatar wzw88486969 commented on May 18, 2024
[ 1185.848642] dummy_hcd: module verification failed: signature and/or required key missing - tainting kernel
[ 1185.848965] dummy_hcd dummy_hcd.0: USB Host+Gadget Emulator, driver 02 May 2005
[ 1185.848967] dummy_hcd dummy_hcd.0: Dummy host controller
[ 1185.848968] dummy_hcd dummy_hcd.0: new USB bus registered, assigned bus number 5
[ 1185.848991] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 1185.848993] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1185.848994] usb usb5: Product: Dummy host controller
[ 1185.848994] usb usb5: Manufacturer: Linux 5.15.0-76-generic dummy_hcd
[ 1185.848995] usb usb5: SerialNumber: dummy_hcd.0
[ 1185.849087] hub 5-0:1.0: USB hub found
[ 1185.849092] hub 5-0:1.0: 1 port detected
[ 1191.493004] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
[ 1191.876646] usb 5-1: new high-speed USB device number 2 using dummy_hcd
[ 1192.144663] usb 5-1: New USB device found, idVendor=054c, idProduct=0ce6, bcdDevice= 1.00
[ 1192.144672] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1192.144676] usb 5-1: Product: DualSense Wireless Controller
[ 1192.144678] usb 5-1: Manufacturer: Sony Interactive Entertainment
[ 1192.356658] usb 5-1: 2:0: cannot get min/max values for control 2 (id 2)
[ 1192.436677] usb 5-1: 5:0: cannot get min/max values for control 2 (id 5)
[ 1192.476646] usbhid 5-1:1.3: can't add hid device: -71
[ 1192.476665] usbhid: probe of 5-1:1.3 failed with error -71
[ 1192.476834] usb 5-1: USB disconnect, device number 2

from usb-proxy.

AristoChen avatar AristoChen commented on May 18, 2024

Hi,

thanks for providing the log!

Unfortunately, there are 2 USB endpoints using Isochronous as Transfer Type, and that is not supported in raw-gadget at the moment, so usb-proxy is not able to support it as well

I think I will keep this issue open, and see if raw-gadget will support Isochronous in the future.

Thanks again for spending time on this project!

from usb-proxy.

wzw88486969 avatar wzw88486969 commented on May 18, 2024

Hello author, I have checked that 'isochronous' is generally used for media sound transmission. Can you skip this transmission type in a project and print a log to ensure that other endpoints can be proxied normally, but I don't know which code to modify^_^

from usb-proxy.

AristoChen avatar AristoChen commented on May 18, 2024

Yes, isochronous is used for video or sound transmission.

I am not sure if it will cause any other error after ignoring proxying isochronous type transmission, but if you do really want to skip it, you may try to modify the code here

usb-proxy/proxy.cpp

Lines 230 to 283 in b0ccd74

void process_eps(int fd, int config, int interface, int altsetting) {
struct raw_gadget_altsetting *alt = &host_device_desc.configs[config]
.interfaces[interface].altsettings[altsetting];
printf("Activating %d endpoints on interface %d\n", (int)alt->interface.bNumEndpoints, interface);
for (int i = 0; i < alt->interface.bNumEndpoints; i++) {
struct raw_gadget_endpoint *ep = &alt->endpoints[i];
int addr = usb_endpoint_num(&ep->endpoint);
assert(addr != 0);
ep->thread_info.fd = fd;
ep->thread_info.endpoint = ep->endpoint;
ep->thread_info.data_queue = new std::deque<usb_raw_transfer_io>;
ep->thread_info.data_mutex = new std::mutex;
switch (usb_endpoint_type(&ep->endpoint)) {
case USB_ENDPOINT_XFER_ISOC:
ep->thread_info.transfer_type = "isoc";
break;
case USB_ENDPOINT_XFER_BULK:
ep->thread_info.transfer_type = "bulk";
break;
case USB_ENDPOINT_XFER_INT:
ep->thread_info.transfer_type = "int";
break;
default:
printf("transfer_type %d is invalid\n", usb_endpoint_type(&ep->endpoint));
assert(false);
}
if (usb_endpoint_dir_in(&ep->endpoint))
ep->thread_info.dir = "in";
else
ep->thread_info.dir = "out";
ep->thread_info.ep_num = usb_raw_ep_enable(fd, &ep->thread_info.endpoint);
printf("%s_%s: addr = %u, ep = #%d\n",
ep->thread_info.transfer_type.c_str(),
ep->thread_info.dir.c_str(),
addr, ep->thread_info.ep_num);
if (verbose_level)
printf("Creating thread for EP%02x\n",
ep->thread_info.endpoint.bEndpointAddress);
pthread_create(&ep->thread_read, 0,
ep_loop_read, (void *)&ep->thread_info);
pthread_create(&ep->thread_write, 0,
ep_loop_write, (void *)&ep->thread_info);
}
printf("process_eps done\n");
}

from usb-proxy.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.