Chinaunix首页 | 论坛 | 博客
  • 博客访问: 891864
  • 博文数量: 132
  • 博客积分: 9976
  • 博客等级: 中将
  • 技术积分: 1781
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-30 20:40
文章分类

全部博文(132)

文章存档

2013年(1)

2011年(1)

2010年(15)

2009年(77)

2008年(36)

2007年(2)

我的朋友

分类: LINUX

2008-11-20 12:49:55


This serial driver supports a wide range of USB to serial adapters. It also allows communication with the Handspring Visor. You need to turn on USB Serial Converter support, and then select whichever of the various particular drivers you need. The Generic Serial Driver can be used with a wide range of converters, by specifying the vendor and product ID codes when you load the USB serial converter module: insmod usb-serial.o vendor=0xVVVV product-0xPPPP, where you need to change the VVVV and PPPP to match your device.

The serial port driver uses a major number of 188. Up to sixteen serial ports are supported. To create the appropriate device entries, use the following commands:

mknod /dev/usb/ttyUSB0 c 188 0
mknod /dev/usb/ttyUSB1 c 188 1
mknod /dev/usb/ttyUSB2 c 188 2
mknod /dev/usb/ttyUSB3 c 188 3
mknod /dev/usb/ttyUSB4 c 188 4
mknod /dev/usb/ttyUSB5 c 188 5
mknod /dev/usb/ttyUSB6 c 188 6
mknod /dev/usb/ttyUSB7 c 188 7
mknod /dev/usb/ttyUSB8 c 188 8
mknod /dev/usb/ttyUSB9 c 188 9
mknod /dev/usb/ttyUSB10 c 188 10
mknod /dev/usb/ttyUSB11 c 188 11
mknod /dev/usb/ttyUSB12 c 188 12
mknod /dev/usb/ttyUSB13 c 188 13
mknod /dev/usb/ttyUSB14 c 188 14
mknod /dev/usb/ttyUSB15 c 188 15

You should now be able to plug in a serial device into the adapter, and use the /dev/usb/ttyUSB0 just as if it were a normal serial port.

To communicate with the Handspring Visor, you need an additional application package known as . Installation and use of this package is covered later in this guide.



=========================================

Linux下如何使用USB转串口线?

计算机的串口不能用,怎么与目标板的串口连接呢?

windows下可以用USB转串口线实现,在google上搜索了一下,linux下更简单,连驱动都免装!
测试环境:redhat linux fedora core 4

总结如下:

1. 检查是否存在设备/dev/ttyUSB0,如果没有就建立一个:
mknod /dev/ttyUSB0 c 188 0

以下推理未测试:
如果有多个USB口,可以类推,建立/dev/ttyUSB[1-n],注意从设备号要累加,
如:mknod /dev/ttyUSB[1-n] c 188 [1-n]

2. 启动minicom, 设置串口设备为 /dev/ttyUSB0, 再设置波特率/数据位/停止位,保存为缺省配置df1

3. 重启minicom, 复位目标板,看是否有打印信息?
如果没有请确认:a)USB/串口线没问题,b)确认你使用的USB口是第一个(一个个的试吧,一般电脑不会标示出来)


==========================================


==========================================



==========================================



==========================================



==========================================



==========================================



阅读(990) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~