我使用来自 cypress 的两个原型板:CY8CKIT-043 和 CY8CKIT-049。
当我将第一个插入 USB 端口时,/dev/ttyACM0
将创建一个并且我可以与设备通信。
对于第二个,事情更复杂,似乎板上有一个 USB 串行设备,但没有安装任何东西。
第二个设备被视为温度计(as dmesg
and lsusb report)
我搜索与udev
每个设备相关的规则,但我只会感到更加困惑:
对于工作人员,在60-openocd.rules
# Cypress KitProg in KitProg mode
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f139", MODE="660", GROUP="plugdev", TAG+="uaccess
另一个,我在里面找到的77-mm-usb-serial-adapters-greylist.rules
,我不太确定,但是如果我理解的很好,设备就不能正常使用了(?)
ATTRS{idVendor}=="04B4", ATTRS{idProduct}=="0002", ENV{ID_MM_TTY_MANUAL_SCAN_ONLY}="1"
问题
- 我是否试图让事情变得不可能?
- 如果没有,我怎样才能告诉系统使用USB 总线设备的
/dev/ttyACMx
驱动程序创建一个文件?cdc_acm
xxx
yyy
我尝试 阅读https://www.linuxquestions.org/questions/linux-hardware-18/forcing-a-specific-driver-for-a-device-through-udev-836411/的内容,我尝试创建一些 udev 规则喜欢
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0002", RUN+="modprobe cdc_acm", NAME="ttytest"
但没有成功。
更多信息
lsusb 用于 043(工作设备):
Bus 001 Device 029: ID 04b4:f139 Cypress Semiconductor Corp. Cypress KitProg
Device Descriptor:
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 8
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0xf139
bcdDevice 2.15
iManufacturer 1 Cypress Semiconductor
iProduct 2 Cypress KitProg
...
043(工作设备)的 dmesg:
usb 1-2: New USB device found, idVendor=04b4, idProduct=f139, bcdDevice= 2.15
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=128
usb 1-2: Product: Cypress KitProg
usb 1-2: Manufacturer: Cypress Semiconductor
usb 1-2: SerialNumber: 0B05091C02179400
hid-generic 0003:04B4:F139.000B: hiddev0,hidraw3: USB HID v1.11 Device [Cypress Semiconductor Cypress KitProg] on usb-0000:00:14.0-2/input0
cdc_acm 1-2:1.2: ttyACM0: USB ACM device
049 的 lsusb(不工作):
Bus 001 Device 011: ID 04b4:0002 Cypress Semiconductor Corp. CY7C63x0x Thermometer
Device Descriptor:
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x0002 CY7C63x0x Thermometer
bcdDevice 0.00
iManufacturer 1 Cypress Semiconductor
iProduct 2 USB-Serial (Single Channel)
...
049 的 dmes(不工作):
usb 1-2: New USB device found, idVendor=04b4, idProduct=0002, bcdDevice= 0.00
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: USB-Serial (Single Channel)
usb 1-2: Manufacturer: Cypress Semiconductor
cytherm 1-2:1.0: Cypress thermometer device now attached
cytherm 1-2:1.1: Cypress thermometer device now attached
cytherm 1-2:1.2: Cypress thermometer device now attached