Re: [SLE] /dev/ttyS0 and /dev/ttys0 - What's the difference?
Sid Boyce <sboyce@blueyonder.co.uk> writes:
scsijon wrote:
From my 1970's memory
ttys0 = tty0 without handshake lines (3wire) ttyS0 = tty0 WITH handshake (9 or 25wire)
there were also a number of other matriixes such as ttyp0 for a serial printer
regards scsijon
Not so, I have many hookups to /dev/ttyS0 and ttyS1 that use 3-wire, hamradio transceivers hook up to /dev/ttyS1 and I have a Liebert UPS currently hooked up and monitoring with 2--2, 3--3 and 5--5, I also use a 3-wire crossover cable to hookup to Unix servers using kermit and GtkTerm. ttys0 and ttyp0 are used as kernel pseudo ttys. ttyS0 and friends are the serial ports, cua was used for modems, but was deprecated, though they still exist in /dev and the last time I used ttys/cua was perhaps in a late 1.x kernel and it always warned that they were deprecated and you should use /dev/ttyS for both input and output. barrabas:/ftp/dec03 # setserial /dev/cua0 /dev/cua0: No such device barrabas:/ftp/dec03 # setserial /dev/ttys0 /dev/ttys0: Input/output error Regards
You should have mentioned that you were running 2.6.0 on that machine (they were only removed with the 2.5.* series): markgray@p2:~> setserial /dev/cua0 /dev/cua0, UART: 16550A, Port: 0x03f8, IRQ: 4 markgray@p2:~> uname -a Linux p2 2.4.21-99-default #1 Wed Sep 24 13:30:51 UTC 2003 i686 i686 i386 GNU/Linux markgray@p2:~> Like you, I was convinced they were long gone since they were first deprecated so long ago. (I only renoticed them when I was digging in Devices.txt and thought they had been resurrected by SuSE:-) I should also add that ttys0 and ttyp0 etc. are the old BSD style pseudo ttys, and any new code should use the Unix98 ptys. With the old BSD ptys your program has to find an unused pty by trial and error, whereas the Unix98 ptys are auto-magically created for you very simply (see man 4 pts)
Mark Gray wrote:
Sid Boyce <sboyce@blueyonder.co.uk> writes:
scsijon wrote:
From my 1970's memory
ttys0 = tty0 without handshake lines (3wire) ttyS0 = tty0 WITH handshake (9 or 25wire)
there were also a number of other matriixes such as ttyp0 for a serial printer
regards scsijon
Not so, I have many hookups to /dev/ttyS0 and ttyS1 that use 3-wire, hamradio transceivers hook up to /dev/ttyS1 and I have a Liebert UPS currently hooked up and monitoring with 2--2, 3--3 and 5--5, I also use a 3-wire crossover cable to hookup to Unix servers using kermit and GtkTerm. ttys0 and ttyp0 are used as kernel pseudo ttys. ttyS0 and friends are the serial ports, cua was used for modems, but was deprecated, though they still exist in /dev and the last time I used ttys/cua was perhaps in a late 1.x kernel and it always warned that they were deprecated and you should use /dev/ttyS for both input and output. barrabas:/ftp/dec03 # setserial /dev/cua0 /dev/cua0: No such device barrabas:/ftp/dec03 # setserial /dev/ttys0 /dev/ttys0: Input/output error Regards
You should have mentioned that you were running 2.6.0 on that machine (they were only removed with the 2.5.* series):
markgray@p2:~> setserial /dev/cua0 /dev/cua0, UART: 16550A, Port: 0x03f8, IRQ: 4 markgray@p2:~> uname -a Linux p2 2.4.21-99-default #1 Wed Sep 24 13:30:51 UTC 2003 i686 i686 i386 GNU/Linux markgray@p2:~>
Like you, I was convinced they were long gone since they were first deprecated so long ago. (I only renoticed them when I was digging in Devices.txt and thought they had been resurrected by SuSE:-)
I should also add that ttys0 and ttyp0 etc. are the old BSD style pseudo ttys, and any new code should use the Unix98 ptys. With the old BSD ptys your program has to find an unused pty by trial and error, whereas the Unix98 ptys are auto-magically created for you very simply (see man 4 pts)
AHA!, thanks, I hadn't an occasion in years to run that command. On 2.4.23 laptop I get the same as you do. Regards Sid. -- Sid Boyce .... Hamradio G3VBV and keen Flyer Linux Only Shop.
On Tuesday 23 December 2003 05:07 am, Mark Gray wrote:
Sid Boyce <sboyce@blueyonder.co.uk> writes:
I should also add that ttys0 and ttyp0 etc. are the old BSD style pseudo ttys, and any new code should use the Unix98 ptys. With the old BSD ptys your program has to find an unused pty by trial and error, whereas the Unix98 ptys are auto-magically created for you very simply (see man 4 pts)
What does tty stand for (especially the y:-) Thanks, Jerome
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 23 Dec 2003 10:25:09 -1000 Jerome Lyles <susemail@hawaii.rr.com> wrote:
What does tty stand for (especially the y:-) Goes back to original Unix. Unix was originally implemented on a minicomputer (eg. DEC PDP-7). The main user input/output device was an ASR33 printing teletype machine. In Unix speak, a tty is a terminal device, and the /dev/tty* refer to serial devices.
When the X Window System came into being, terminals, such as xterm and Konsole, use Psedo Terminals. These wwere formally /dev/ttypx or something like that, and today they are in /dev/pts. tty1- tty6 are virtual terminals, where /dev/tty1 corresponds to the console. You can get to it from KDE with ctrl-alt-f1. (and you can return via ctrl-alt-f7). /dev/ttyS0 corresponds to the Windows COM1, and /dev/ttyS1 corresponds to the Windows COM2. AFAIK, these use hardware flow control so you can connect a modem. - -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/6K+t+wA+1cUGHqkRAmHVAJ9qrhw79sH6jdge/8OFLg6Rq1aVdwCdEERb zmBV1fNje+46wye09N0lYJ4= =4/i3 -----END PGP SIGNATURE-----
participants (4)
-
Jerome Lyles
-
Jerry Feldman
-
Mark Gray
-
Sid Boyce