# How to connect with and use a USART to USB converter (CP2102 by Silabs)?

I figured since this is a very specific problem with a hardware device that many on SuperUser might not be familiar with, I would try posting here.

I searched around on the net a bit and found a very useful USART to USB converter bridge. The CP2102 is a programmable device with many settings insofar as the data framing is concerned. As such, a driver for the device must be used to interface and modify these parameters.

On the Silabs website I found this driver for linux (kernel 3.14.4-1 on Arch Linux). The problem is that this driver is just a single C program with zero documentation. An include make file is about as useful considering it has a single line in it that fails (for me) at run-time.

obj-m = cp210x.o
KVERSION = $(shell uname -r) all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=\$(PWD) clean


The driver source can be found here.

Where my make error is

make -C /lib/modules/3.14.4-1-ARCH/build M=/home/branden/Desktop/Linux_3.x.x_VCP_Driver_Source modules

make[ 1 ]: Entering directory '/usr/lib/modules/3.14.4-1-ARCH/build'

make[ 1 ]: *** No rule to make target 'modules. Stop.

make[ 1 ]: Leaving directory '/usr/lib/modules/3.14.4-1-ARCH/build'

Makefile:4: recipe for target 'all' failed

make: *** [all] Error 2


There is no documentation aside from:

1. make ( your cp210x driver )
2. cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial
3. insmod /lib/modules/
4. insmod cp210x.ko

Which is actually directed to Ubuntu. The OS I use is Arch Linux, so I realize there may be some discrepancies, but I am unable to resolve them.

Can anyone provide some guidance on the steps to install this driver (or at least where to look) and why there is such a lack of documentation? Are there assumptions here that I am not aware of? How is anyone suppose to use this? If you look in the source there are structures being used as arguments to functions that are never defined as far as I can tell. Perhaps they are part of the header files included at the top, but I could not find some of those on my machine either.

Has anyone else been able to successfully interface with this device? I am able to successfully read the device's information using libusb, but am having issues with this driver.

• USB to serial converters are readily available at computer and electronic stores and should be plug-and-play on most OS's. Most of them include RS-232 level translators, but Adafruit, Sparkfun, and probably other Arduino/RaspberryPi/etc sources have the adaptors without the RS-232 level translators. Sparkfun has a CP2102 breakout board, which may help you. – Peter Bennett May 26 '14 at 19:40

The CP210x driver is included in vanilla linux kernel for ages. No patching needed AFAIK. Just use the modprobe cp210x command as superuser.
• When I try this command I don't get any output - it just goes to a newline and waits for the next command. However, if I purposefully omit a character and search for the "wrong" module name I get this: modprobe: FATAL: Module cp210 not found". So what does this mean? If I search for the module nothing comes up but at the same time it does not say it was not found – sherrellbc May 26 '14 at 17:40
• Check man modprobe for docs. – dext0rb May 26 '14 at 17:51
• There is no output from this command unless there is an error. Check dmesg` for Linux Kernel messages. – Turbo J May 26 '14 at 19:12