2008-08-22 13 views
1

Linuxでは、/dev/ttyS0/dev/ttys0の違いは何ですか?`/ dev/ttyS0`と`/dev/ttys0`の違いは?

私は最初のポートがシリアルポートであることを知っていますが、2番目のポートは小文字で、小さいポートはsです。例えば ptyp3とttyp3、PTYとして擬似端末ペアの

答えて

1

see this

... マスタまたは制御端末と TTY ...は、スレーブです。 ttypのttyp0-ttypf(fは の16進数)であるのは、 です。 個のペアを得るには、pの代わりに、q、r、sの3文字を とすることができます。たとえば、 のペアttys8、ptys8は、擬似端末 のペアです。マスタとスレーブは、実際には同じ「ポート」の であるが、スレーブはアプリケーションプログラムによって が使用され、 マスタは、ネットワークプログラム (または同様のもの)によって使用されます。スレーブポート。

0

それは言う:

3 char Pseudo-TTY slaves 
     0 = /dev/ttyp0 First PTY slave 
     1 = /dev/ttyp1 Second PTY slave 
     ... 
    255 = /dev/ttyef 256th PTY slave 

    These are the old-style (BSD) PTY devices; Unix98 
    devices are on major 136 and above. 

と私はドン

4 char TTY devices 
     0 = /dev/tty0  Current virtual console 

     1 = /dev/tty1  First virtual console 
     ... 
    63 = /dev/tty63 63rd virtual console 
    64 = /dev/ttyS0 First UART serial port 
     ... 
    255 = /dev/ttyS191 192nd UART serial port 

    UART serial ports refer to 8250/16450/16550 series devices. 

    Older versions of the Linux kernel used this major 
    number for BSD PTY devices. As of Linux 2.1.115, this 
    is no longer supported. Use major numbers 2 and 3. 

を言うことになります」これがどれくらいあなたを助けてくれるのかを知っていますが、正しい方向に着手する必要があります。