- 论坛徽章:
- 0
|
我在RedHat环境下安装了研华工控的PCI-1612A串口扩展卡,在安装驱动程序的过程中做了两个这样的工作:
1 # cd /usr/src/linux
# make menuconfig
In the menu, find the following item:
Character devices -->; Standard/generic <8250/16550 and compatible UARTs>; serial support
and disable it. Then you can build a new kernel without serial support.
2 Create device link
# rm /dev/ttyS[0-3]
# ln -s /dev/ttyP0 /dev/ttyS0
# ln -s /dev/ttyP1 /dev/ttyS1
# ln -s /dev/ttyP2 /dev/ttyS2
# ln -s /dev/ttyP3 /dev/ttyS3
在装完驱动后,我的串口通讯程序(去年写的,一直良好运行)可以顺利读写扩展串口/dev/ttyP[4-7] (这四个口分别
对应1612A可的四个扩展串口) ,然而每当我读写/dev/ttyS[0-1]时,我的程序就会提示如下:
tcsetattr fd1: Input/output error
SetupSerial 1: Input/output error
Set Parity Error
我认为是原来的ttyS[0-3]被删了的原因,所以我用命令:mknod /dev/ttyS[0-3] c 4 6[4-7] 恢复串口,可仍然不能读写/dev/ttyS[0-1],且出错信息也仍然一样.
后来我把研华的驱动删了,又把串口扩展卡拔掉,仍然不能读写/dev/ttyS[0-1],且出错信息也仍然一样.
请各位指点! |
|