首页 > 解决方案 > CP2615 USB 桥接器缺少端点和空接口

问题描述

我正在开发使用CP2615 桥接 IC (rev 1)的硬件。

它是一个旧的和不推荐使用的音频接口,带有用于 USB 的 UART 接口。但即使它已被弃用,我也必须出于无法控制的原因使用它。

将网桥连接到我的系统的总体思路是:

我确实在 CP2615 的配置数据上启用了串行端口,还配置了 TX 和 RX 引脚。

插入电路板后,这就是我所拥有的usb-devices(顺便说一下,我在 linux 上):

在此处输入图像描述

这很奇怪……接口 1 没有驱动程序和 0 个端点。对于这两个(??),音频接口都有一个驱动程序,但没有端点。

到目前为止,我正在使用制造商提供的原始 VID/PID 来增加成功机会。我假设串行端口将使用 CP210X 使用的相同驱动程序,该驱动程序确实安装在我的内核中。

当我们检查设备时,事情变得更加奇怪lsusb -v,现在接口 1 确实包含两个批量端点(这正是我所期待的):

在此处输入图像描述

我不是 USB 描述符方面的专家,但注意到一些接口描述符(大约 4 或 5 个),没有简单的端点出现在树上,就像您在上一张图片开头看到的那样。那是有效的吗?

同样,这些描述符由 CP2615 内部代码管理,我无权访问,只是假设Silicon Labs知道得更好。

我已经尝试创建自己的 udev 规则:

SUBSYSTEM=="usb", ACTION="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="eac1"i, RUN+="modprobe cp210x", MODE="0666"
SUBSYSTEM=="tty", ACTION="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="eac1"i, RUN+="modprobe cp210x", MODE="0666"
SUBSYSTEM=="usb_device", ACTION="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="eac1"i, RUN+="modprobe cp210x", MODE="0666"

也没有运气。

我想在 NodeJS 应用程序上使用该串行端口来访问同一板上的另一个 IC(期望 CP2615 简单地成为使用 uart 的透明接口)。

我已经尝试使用节点的包usb来直接访问批量端点并放弃对适当 tty 文件的需要,但就像usb-devices它发现所有 4 个接口并且只有第一个接口有一个端点一样。这里再次没有运气。

有人看到我做错了吗?

还有其他方法可以访问该串行端口数据吗?

lsusb -tPS:如果您想查看奇怪的空接口,这是完整的树:

Bus 002 Device 029: ID 10c4:eac1 Cygnal Integrated Products, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x10c4 Cygnal Integrated Products, Inc.
  idProduct          0xeac1 
  bcdDevice            1.00
  iManufacturer           1 ---------
  iProduct                2 ---------
  iSerial                 3 0001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          166
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          4 Firmware Version: 1.0.3
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              150mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      39
         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     0x0002  1x 2 bytes
        bInterval              20
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     21 
      bInterfaceProtocol      1 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     21 
      bInterfaceProtocol      1 
      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     0x0040  1x 64 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     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           30
        bInCollection           1
        baInterfaceNr( 0)       3
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0302 Headphones
        bAssocTerminal          0
        bSourceID               1
        iTerminal               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       1
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       2
      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                  2 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes           13
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Data
        wMaxPacketSize     0x0120  1x 288 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         1 Milliseconds
          wLockDelay              1 Milliseconds
Device Status:     0x0000

标签: usblibusbudev

解决方案


推荐阅读