Silicon labs have a range of usb to serial converters called the cp210x series. With modern OEM computers moving away from installing serial ports these devices are becoming more and more useful. Now, cp210x actually refers to the chipset that is doing the conversion of USB to UART. So you can install these chips in your own designs to completely rid the dependence on serial cables. In windows Silicon Labs provide customizable drivers which means you can provide your own branding. For example, if I made a device with a cp2102 chip I could set it up so when someone plugged it into their computer it would read, “Dave’s awesome USB device”.
So I have been using the cp2102 evaluation kit from Silicon Labs. Basically because it is a robust and reliable method of USB-Serial conversion. An added benefit of these device is that they can support speeds higher than what is available with standard RS232 hardware. For example I can transfer data with a baud rate of 2Mbps.
I recently received a question about using cp210x from Silicon Labs with linux. So linux has basic support [2] for cp210x devices from a community made driver (as of 2.6.39). Silicon Labs have released new products in this product range, namely cp2105 for example, which the current linux driver doesn’t recognise.
For example:
usb 1-1.2: device v10c4 pea70 is not supported usb 1-1.2: New USB device found, idVendor=10c4, idProduct=ea70 usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5 usb 1-1.2: Product: CP2105 Dual USB to UART Bridge Controller usb 1-1.2: Manufacturer: Silicon Labs usb 1-1.2: SerialNumber: 0000BBA1
On the silicon labs website [1], they have released a new version of the driver. Unfortunately this doesn’t work out of the box and seems to be aimed towards Ret Hat users. So I am going to briefly go through how to build and install the new driver in Ubuntu. To make your life easier I have done the required modifications and have them here for download.
Drivers: cp201x.tar
This driver supports the following devices:
CP2101
CP2102
CP2103
CP2104
CP2105
./configure make make install
For example:
dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ ./configure Kernel version : 2.6.38-8-generic Module extension : .ko KO File : cp210x.ko Kernel Dir : /lib/modules/2.6.38-8-generic/build Module File : cp2101.ko Module Dir : /lib/modules/2.6.38-8-generic Current Dir : /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x
dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ make make -C /lib/modules/2.6.38-8-generic/build -I /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x M=/home/dave/cp210x_silabs/cp210x-3.1.0/cp210x modules make[1]: Entering directory `/usr/src/linux-headers-2.6.38-8-generic' CC [M] /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.o /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.c:454:1: warning: "/*" within comment /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.c:723:1: warning: initialization from incompatible pointer type /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.c:724:1: warning: initialization from incompatible pointer type /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.c:728:1: warning: initialization from incompatible pointer type Building modules, stage 2. MODPOST 1 modules CC /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.mod.o LD [M] /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic'
A couple of warnings in there, but we will ignore them for the time.
You can see from the output that it made the file: /home/dave/cp210x_silabs/cp210x-3.1.0/cp210x/cp210x.ko
You can do a “make install” but I didn’t want it to overwrite my existing driver:
Backed up my old driver
dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ sudo mv /lib/modules/2.6.38-8-generic/kernel/drivers/usb/serial/cp210x.ko cp210x.ko.ori
Then copied over the new one:
dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ sudo mv cp210x.ko /lib/modules/2.6.38-8-generic/kernel/drivers/usb/serial/cp210x.ko
I then did a depmod, then a modinfo.
dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ sudo depmod dave@ubuntu:~/cp210x_silabs/cp210x-3.1.0/cp210x$ sudo modinfo cp210x filename: /lib/modules/2.6.38-8-generic/kernel/drivers/usb/serial/cp210x.ko version: v1.10.0 license: GPL description: Silicon Labs CP210x USB Serial Adaptor Driver author: RMS srcversion: 35585FF341190212CF9E53A alias: usb:v18EFpE00Fd*dc*dsc*dp*ic*isc*ip* alias: usb:v16D6p0001d*dc*dsc*dp*ic*isc*ip* alias: usb:v166Ap0303d*dc*dsc*dp*ic*isc*ip* alias: usb:v13ADp9999d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C5pEA61d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pF004d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pF003d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pF002d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pF001d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pEA70d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pEA61d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4pEA60d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p846Ed*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p83A8d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8341d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8293d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p826Bd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p822Bd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8218d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p81E7d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p81E2d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p81C8d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p81ACd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p81A6d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p819Fd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p815Ed*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p814Bd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p814Ad*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p813Dd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8115d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p80F6d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p80DDd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p80CAd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p807Ad*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8066d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8054d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p8053d*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p803Bd*dc*dsc*dp*ic*isc*ip* alias: usb:v10C4p800Ad*dc*dsc*dp*ic*isc*ip* alias: usb:v10B5pAC70d*dc*dsc*dp*ic*isc*ip* alias: usb:v10ABp10C5d*dc*dsc*dp*ic*isc*ip* alias: usb:v10A6pAA26d*dc*dsc*dp*ic*isc*ip* alias: usb:v0FCFp1006d*dc*dsc*dp*ic*isc*ip* alias: usb:v0FCFp1004d*dc*dsc*dp*ic*isc*ip* alias: usb:v0FCFp1003d*dc*dsc*dp*ic*isc*ip* alias: usb:v08E6p5501d*dc*dsc*dp*ic*isc*ip* alias: usb:v0489pE000d*dc*dsc*dp*ic*isc*ip* alias: usb:v0471p066Ad*dc*dsc*dp*ic*isc*ip* depends: usbserial vermagic: 2.6.38-8-generic SMP mod_unload modversions 686 parm: debug:Enable verbose debugging messages (bool)
Update:
1. I have just noticed that make install doesn’t work for the driver I attached. Just copy it over like I did above, then do a depmod.
2. I think that the driver version hasn’t been incremented, as it still reads v1.10.0 after update. You could update the source if you want it to read correctly.
References
[1] http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
[2] http://www.etheus.net/CP210x_Linux_Driver
Hi Dave,
The Ubuntu driver download link isnt active
(unless Im looking in the wrong place). I’m having issues with a Cp2102 where its being recognised as a 2101 but when I send data nothing is getting through so I thought Id try and install this driver. Is there any chance of getting the link working?
Cheers
Greg.
Oops, you’re right. I must have forgotten to upload it. I will try to get it over the next couple of days.
Hi,
your link isn’t active for download the driver you suggested.
Could you please active it, or send it to me by email, I really need it, and I can’t find it nowhere.
Done
I got similar problem like “device v10c4 pea60 is not supported” recently.
Could you please post the driver download link?
Done.
I have uploaded the driver. Sorry for the delay. It has been such a long time that I don’t know how reliable this is. Give it a try and let me know if you have any problems. I’m suspicious that I’ve messed something up on the makefile. Seemed to work ok for me.
Have used these driver with a Device ID 10c4:ea70, it can connect initially, but when we disconnect and reconect again, it can not connect anymore. Do you encounter these problem before?
Please advise.
I’m afraid I haven’t experienced this problem before. Have you tried updating the drivers in the kernel?