cypress虚拟串口(CDC_ACM)在Linux下不出现的问题

网上找的高人帖子: https://community.cypress.com/thread/14010?start=0&tstart=0

关键的yidu一段话:,

I managed to access the serial port in Linux:

- change product id in usb descriptor to 0xF139 :        < 0x39,0xF1,                      /* Product ID */ >

- use modprobe to bind the usbserial driver to the device <sudo modprobe usbserial vendor=0x04B4 product=0xF139

- the device appears now as /dev/ttyUSB0

按照这个操作,有时候会虚出两个串口,有时候会出一个。。。。很神奇

还要cypress的cyusb_linux其他VID,PID 不识别问题,

https://community.cypress.com/docs/DOC-10863

Question: How do you make a device with a custom vendor identification (VID) number / product identification (PID) number visible on the cyusb_linux GUI?

Answer:

By default, the cyusb_linux GUI (Control Center equivalent for Linux) only shows devices with a Cypress® VID (0x04B4) and PIDs contained in the /etc/cyusb.conf file.

If you are using a Cypress VID (0x04B4) and any PID that is not present in the /etc/cyusb.conf file, you will have to add the VID (0x04B4) and the PID to the end of the /etc/cyusb.conf file. You will need root permissions to do this. If the cyusb_linux GUI is already open, close it and start it again. The device will now appear in the cyusb_linux GUI.

If you are using a non-Cypress VID, follow the steps below. For this example, the VID is 0x04FF and the PID is 0xFF.

  1.   Add the VID and PID in /etc/cyusb.conf as shown in Figure 1. You will need root permissions.  

       Figure 1. FX3™ Custom VID-PID Added to cyusb.conf File

     

       FX3 custom

  2.   For a non-Cypress VID, you will need to make changes in the /etc/udev/rules.d/88-cyusb.rules file as well. You will need root permissions. Copy lines four and five of the 88-cyusb.rules file and paste it back into the file with ATTR{idVendor}==”04b4” changed to ATTR{idVendor}==””, as shown in Figure 2.  

       Figure 2. ATTR{idVendor}==”04ff” Added in the 88-cyusb.rules File

     

       rules file

  3.   Close and restart the cyusb_linux GUI. The device with a custom VID/PID will now appear in the GUI as shown in Figure 3.  

       Figure 3. Device with VID=0x04ff and PID=0x00ff Now Appears in the cyusb_linux GUI

     

       linux GUI

  4. 还有个奇葩坑,就是如果VID设成cypress的0x04b4,PID只有为0x0008时,才能虚拟出ttyACM0,但cyusb_linux无设备,采用上述方法,会出现设备列表,但ttyACM0会消失,必须用modprobe强制生成一个ttyUSB0。如果换为其他PID则ttyACM0消失,设备列表 出现。如果VID和PID设为非0x04b4,则ttyACM0会出现,再采用上述方法,自定义设备也会出现在设备列表中。这个奇葩坑害了我大概一周的时间!!!!

猜你喜欢

转载自blog.csdn.net/insanegtp/article/details/81119295