红联Linux门户
Linux帮助

USB-TTL cable for Linux

发布时间:2007-12-02 00:51:33来源:红联作者:Limits
Today, I tried to figure out how to make my AVIT USB-to-TTL converter work in Linux. From the website, it does not release any detail about it. However, as many similar products provide Linux support, I believed that this should be also compatible with them as well, as they should use the same family chips.

I emailed them and got an answer about what chip they use. The Linux driver can be obtained from Silicon Labs

I then tried to work out how to install it, as be default, this file was encapsulated in an RPM file. As I use Ubuntu, I need to convert it to a deb file in order to view the content of it. This can be done be run

$alien -d xxx.rpm

However, to compile it was not so smooth. It reported that linux/config.h could not be found. I then checked many possible directories, and still could not see it. Then I googled again, and it is said that this file has been removed from linux kernels > 2.6.19.

To solve this problem, we can run

touch /usr/src/linux/include/linux/config.h

to create a blank config.h file.

Another problem is usb-serial.h not found. I then checked the source directory, and it seemed that the related files are not included in the default Ubuntu headers.

I then downloaded the kernel source (2.6.22-14), and found the files are there. Even more, a file cp210x.c is also present in /usr/src/linux/drivers/usb/serial/ . This means that my device has been supported by default by Linux. I then gave up the driver downloaded just now and planned to use the one included in the kernel source.
To work out this problem, I think it needs to recompile my kernel.

Also, an additional and important step is to modify the source file cp210x.c to

static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
{ USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
{ USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */
//////
{ USB_DEVICE(0x10C4, 0x818B) }, /* AVIT RESEARCH CABLE USB-TTL */
//////
{ } /* Terminating Entry */

This will add the vendor:product information to the code. which is (0x10C4, 0x818B) here.

The vendor and product information in fact can be obtained by run

$lsusb
Bus 003 Device 002: ID 10c4:818b Cygnal Integrated Products, Inc.

The above solution was found from many websites with the aid of Google.
Although I have not finished the installation, I think this should work. I am a bit lazy to recompile the whole kernel. Probably, I will buy another one that is ready to use in Linux.

Following are some websites that were just opened. Do not know if they are relevant. I am not patient enough to check out.

Some are very useful, some are not.
文章评论

共有 0 条评论