廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 5415 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
pigpig5442
個人頭像
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x0 鮮花 x13
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
文章表情[Linux] Linux 下 Serial Port 擴充卡的安裝與設定
This installation guide describes the procedures to install NetMos Technology Nm9735CV, Nm9745CV, Nm9835CV, Nm9845CV PCI serial ports in Linux platform.

Linux Platform

l Operating System : RedHat, SuSe
l Terminal Emulation AP : minicom
l Internet Dialer : Kppp


Find the available serial ports

Since Linux only support 4 serial ports (ttyS0, ttyS1, ttyS2, ttyS3) under the default condition. Most likely, ttyS0 & ttyS1 are supported by mother board's built-in serial controllers and ttyS2 & ttyS3 are free for additional I/O card.

Serial ports could be checked by the following commands.

setserial /dev/ttyS0 -a (COM-1)
setserial /dev/ttyS1 -a (COM-2)
setserial /dev/ttyS2 -a (COM-3)
setserial /dev/ttyS3 -a (COM-4)

If COM-1 is used by mouse, the response is similar to

/dev/ttyS0 : Device or resource busy

If the COM-1 does not attach any device, the response is similar to

/dev/ttyS0, Line 0, UART: 16550A, Port: 0x3f8, irq: 4
Baud_base: 115200, clos_delay: 50, divisor: 0
closing_wait: 3000, closing_wait2: infinite
Flags: spd_normal skip_test

In case ttyS2 (COM-3) is free, the response for command setserial /dev/ttyS2 -a is shown below.

/dev/ttyS2, Line 2, UART: unknown, Port: 0x3e8, irq: 4
Baud_base: 115200, clos_delay: 50, divisor: 0
closing_wait: 3000, closing_wait2: infinite
Flags: spd_normal skip_test

Find the PCI card resource ( I/O port address & IRQ) for the serial ports

Enter the command more /proc/pci

The response is similar to the following

Bus 0, Device 11, function 0:
Serial controller : Unknown vendor Unknown device (rev 01).
Vendor id=9710, Device id=9735
Device id=9745
Device id=9820
Device id=9825
Device id=9835
Device id=9845

Medium devsel. Fast back-to-back capable. IRQ 11

Board with Nm9735CV part
I/O at 0xc000 [0xc001] serial port 1
0xc008 [0xc009] serial port 2

Board with Nm9745CV part
I/O at 0xc000 [0xc001] serial port 1
0xc008 [0xc009] serial port 2
0xc010 [0xc011] device 1
0xc018 [0xc019] device 2
0xc020 [0xc021] device 3
0xc028 [0xc029] device 4

Board with Nm9820CV part
I/O at 0xc000 [0xc001] serial port 1
I/O at 0xc400 [0xc401] not used
I/O at 0xc800 [0xc801] not used
I/O at 0xd000 [0xd001] not used
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Board with Nm9825CV part
I/O at 0xc000 [0xc001] serial port 1

Board with Nm9835CV part
I/O at 0xc000 [0xc001] serial port 1
I/O at 0xc400 [0xc401] serial port 2
I/O at 0xc800 [0xc801] not used
I/O at 0xd000 [0xd001] not used
I/O at 0xd400 [0xd401] not used
I/O at 0xd800 [0xd801] not used

Board with Nm9845CV part
I/O at 0xc000 [0xc001] serial port 1
I/O at 0xc400 [0xc401] serial port 2
I/O at 0xc800 [0xc801] device 1
I/O at 0xd000 [0xd001] device 2
I/O at 0xd400 [0xd401] device 3
I/O at 0xd800 [0xd801] device 4

Board with Nm9755CV part
I/O at 0xc000 [0xc001] not used
I/O at 0xc400 [0xc401] not used
I/O at 0xc800 [0xc801] device 1
I/O at 0xd000 [0xd001] device 2
I/O at 0xd400 [0xd401] device 3
I/O at 0xd800 [0xd801] device 4


From the /proc/pci file, it is possible to find the PCI card's I/O port address and IRQ. Especially, the NetMos parts always shows

Vendor id=9710, Device id=9735
Device id=9745
Device id=9820
Device id=9825
Device id=9835
Device id=9845

Configure the parameters for ttyS2 or ttyS3

Enter (if ttyS2 or ttyS3 are free)

setserial /dev/ttyS2 port 0xc000 UART 16550A
irq 11 Baud_base 115200

setserial /dev/ttyS3 port 0xc008 UART 16550A
irq 11 Baud_base 115200

Check the setting for ttyS2 or ttyS3

Type setserial /dev/ttyS2 -a

/dev/ttyS2, Line 2, UART: 16550A, Port: 0xc000, irq: 11
Baud_base: 115200, clos_delay: 50, divisor: 0
closing_wait: 3000, closing_wait2: infinite
Flags: spd_normal skip_test


The ttyS2 or ttyS3 are ready for application


[ 此文章被andyz在2005-05-18 20:05重新編輯 ]



獻花 x0 回到頂端 [樓 主] From:台灣數位聯合 | Posted:2005-03-15 19:25 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.050413 second(s),query:15 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言