最終更新:2012-10-22 (月) 17:15:29 (4197d)  

Linux/dev/ttyS
Top / Linux / dev / ttyS

メジャー番号

  • The serial port ttySx (x=0,1,2, etc.) is major number 4.
    ls -l /dev/ttyS*

PCIバス

  • Since DOS provided for 4 serial ports on the old ISA bus: COM1?-COM4?, or ttyS0?-ttyS3? in Linux, most serial ports on the newer PCI bus used higher numbers such as ttyS4? or ttyS14? (prior to kernel 2.6.13).
  • But since most PCs only came with one or two serial ports, ttyS0? and possibly ttyS1? (for the second port) the PCI bus can now use ttyS2? (kernel 2.6.15 on). All this permits one to have both ISA serial ports and PCI serial ports on the same PC with no name conflicts. 0-1 (or 0-3) are reserved for the old ISA bus (or the newer LPC bus) and 2-upward (or 4-upward or 14-upward) are used for PCI, where older schemes are shown in parentheses . It's not required to be this way but it often is.
  • If you're using udev (which puts only the device you have on your computer into the /dev directory at boottime) then there's an easy way to change the device names by editing files in /etc/udev/.
  • For example, to change the name of what the kernel detects as ttyS3 to what you want to name it: ttyS14, add a line similar to this to /etc/udev/udev.rules?
    BUS=="pci" KERNEL=="ttyS3", NAME="ttyS14"

関連

参考