我有一个红外测温仪,它通过USB在虚拟串口上运行,我试图在Debian Linux上使用它。不幸的是,系统没有枚举/dev/ttyUSB
设备。
以下是设备的dmesg
:
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
这是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
我怎样才能使这个工作,所以我可以用串口连接它?
答案 0 :(得分:2)
事实证明,此设备使用标准Silicon Labs CP2102接口芯片,设备制造商加载了自定义idProduct
号码。虽然芯片与cp210x.ko
驱动程序100%兼容,但系统无法识别idProduct
,并且不会将驱动程序与其关联。
此时,有几种可能的解决方案:
cp210x.ko
的{{1}}驱动程序。idProduct
添加到open source driver,进行编译并安装。然后尝试将更改推送到标准Linux存储库。idProduct
。我选择重写idProduct
。 Silicon Labs有free utility来做这件事。我设置了idProduct
,这是该芯片的默认设置。该设备现在可以通过标准内置驱动程序识别,并且运行良好。