- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We are using the CY7C65211 bridge on a device that connect to a Linux (Kubutu 18.04) machine. The Linux PC, instead of adding a serial port (/dev/ttyXXX) is listing the device as a Thermometer:
Bus 001 Device 057: ID 04b4:0002 Cypress Semiconductor Corp. CY7C63x0x Thermometer
I downloaded CP210x_SDK from the website and install it, but the serial port appears nowhere.
In a Windows PC, the serial port works out-of-the-box, but I can't seem to make it work in Linux (no /dev/ttyUSBx or /dev/ttyACMx, or anything).
What am I missing?
Thank you so much!
Héctor
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Meghavi
My apologies, I had a typo on the string. I changed the PID to 00FB and clicked on Program.
Now Linux created a new node /dev/ttyACM0 and the serial console port works fine. To double check, I went backwards and reprogrammed the original PID 0002, and still the console port was detected and worked. I may have missed the node in the past but it looks like the PID change is not needed.
To summarize, in order to make this work as a serial port in Linux I needed to do:
- add the /etc/udev/rules.d/90-cyusb.rules
# Cypress USB driver for FX2 and FX3 (C) Cypress Semiconductor Corporation / ATR-LABS # Rules written by V. Radhakrishnan ( rk@atr-labs.com ) # Cypress USB vendor ID = 0x04b4 KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666" KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev"
- Black list the cytherm driver module in /etc/modprobe/blacklist.conf
blacklist cytherm
- rmmod the cytherm driver in case it was already loaded
A bit cumbersome for something that I expected to work out-of-the-box, honestly.
Thanks for all the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Did you download the correct package from here: https://www.infineon.com/cms/en/design-support/tools/sdk/usb-controllers-sdk/usb-serial-software-dev...
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I did download Infineon-CyUSBSerial_SDK_Linux-DevelopmentTools-v01_00-EN.zip, built it and installed it, restarted udev rules and everything, but the device lists itself as a Thermometer and it doesn't generate a new serial port device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The main cause of the issue is due to the Linux kernel you are using has a built-in HID Driver called Cytherm - Cypress USB thermometer driver in kernel. So whenever you connect a device, instead of binding to CDC ACM driver, it comes up as HID device binding to the Cytherm driver.
There are 2 workarounds:
1) Try removing the Cytherm driver from the linux kernel using rmmod cytherm command in the terminal.
2) Change the VID and PID of the USB-Serial device when using in Linux.
Regards,
Meghavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) Try removing the Cytherm driver from the linux kernel using rmmod cytherm command in the terminal.
Even if I remove the module and blacklist it so that it never loads automatically, the kernel doesn't detect the chip as a serial port.
2) Change the VID and PID of the USB-Serial device when using in Linux.
Do you mean to configure the chip to report different VID/PID? How do I configure the chip for that and to what values? I expect Cypress to provide a serial driver that matches the VID/PID reported by default by the chip.
Thanks
Héctor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hector,
Can you please let us know after removing/blacklisting the Cytherm driver how does the device enumerate?
Regards,
Meghavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Meghavi,
The device enumerates just the same. The fact that the kernel doesn't load a module driver to handle it doesn't change how it enumerates:
$ lsusb
Bus 001 Device 010: ID 04b4:0002 Cypress Semiconductor Corp. CY7C63x0x Thermometer
If I list the full USB tree, it shows this tree for the device (connected through a hub)
$ lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ ...
|__ Port 10: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 10, If 1, Class=CDC Data, Driver=ftdi_sio, 12M
|__ Port 3: Dev 10, If 2, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 3: Dev 10, If 0, Class=Communications, Driver=ftdi_sio, 12M
No /dev/ttyUSBx ports are created.
I tried creating a udev rule I found on the Internet, that goes:
ACTION=="add", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0002", RUN+="/sbin/modprobe ftdi_sio" RUN+="/bin/sh -c 'echo 04b4 0002 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"
with this, I get three /dev/ttyUSBx entries.
In one of them, I can open a minicom and start to see data from the serial console, but many characters are missing and the port doesn't echo back what I type.
I wanted to use this chip for the serial console of my design, but I mainly need it to work in Linux, and this doesn't seem to work fine at all.
Héctor Palacios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Meghavi,
The tool doesn't allow me to change the PID:
According to your doc, there should be a checkbox that's missing on my tool (version 2.0.3.120). I can uncheck "Use Cypress VID/PID" but then it would only allow me to change the VID, not the PID.
Héctor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hector,
Can you please confirm if you have added the string in the configuration utility shortcut and opened the utility using the same shortcut? If yes please share the snapshot.
Regards,
Meghavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Meghavi
My apologies, I had a typo on the string. I changed the PID to 00FB and clicked on Program.
Now Linux created a new node /dev/ttyACM0 and the serial console port works fine. To double check, I went backwards and reprogrammed the original PID 0002, and still the console port was detected and worked. I may have missed the node in the past but it looks like the PID change is not needed.
To summarize, in order to make this work as a serial port in Linux I needed to do:
- add the /etc/udev/rules.d/90-cyusb.rules
# Cypress USB driver for FX2 and FX3 (C) Cypress Semiconductor Corporation / ATR-LABS # Rules written by V. Radhakrishnan ( rk@atr-labs.com ) # Cypress USB vendor ID = 0x04b4 KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666" KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev"
- Black list the cytherm driver module in /etc/modprobe/blacklist.conf
blacklist cytherm
- rmmod the cytherm driver in case it was already loaded
A bit cumbersome for something that I expected to work out-of-the-box, honestly.
Thanks for all the help.