Cygnal Integrated Products serial port on Linux

本秂侑毒 提交于 2019-12-23 05:16:45

问题


I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on Debian Linux. Unfortunately, the system does not enumerate a /dev/ttyUSB device.

Here is the dmesg for the device:

usb 5-1: new full-speed USB device number 3 using uhci_hcd
usb 5-1: New USB device found, idVendor=10c4, idProduct=834b
usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 5-1: Product: Infrared Online Sensor Adapter
usb 5-1: Manufacturer: Silicon Labs
usb 5-1: SerialNumber: CT00092755

And here is the lsusb -v:

Bus 005 Device 003: ID 10c4:834b Cygnal Integrated Products, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x10c4 Cygnal Integrated Products, Inc.
  idProduct          0x834b
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              2
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 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     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

How can I get this working, so I can connect to it with the serial port?


回答1:


It turns out this devices uses a standard Silicon Labs CP2102 interface chip, which the device manufacturer loaded with a custom idProduct number. While the chip is 100% compatible with the cp210x.ko driver, the idProduct is not recognized by the system, and does not associate the driver with it.

At this point, there are several possible solutions:

  • Manually direct the system to use the cp210x.ko driver with this idProduct.
  • Add the idProduct to the open source driver, compile, and install it. Then try to push the changes into standard Linux repositories.
  • Replace the customized chip with generic one.
  • Rewrite the idProduct on the chip.

I chose to rewrite the idProduct. Silicon Labs has a free utility to do just this. I set the idProduct=EA60, which is the default for this chip. The device is now recognized by the standard built-in driver, and works perfectly.



来源:https://stackoverflow.com/questions/38963029/cygnal-integrated-products-serial-port-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!