Re: [SLE] /dev/ttyS0 and /dev/ttys0 - What's the difference?
Mark Gray <markgray-temp-1071686731@iago.nac.net> writes:
Dylan <dylan@dylan.me.uk> writes:
Greetings Sages...
I have been trying (successfully, I'm pleased to say) to get a serial connection going for my telescope. In the process, I came across both / dev/ttyS0 and /dev/ttys0. Now, ttyS0 is clearly the serial port (=COM1) since that's the device which works and the other gives me an error. BUT, what is ttys0 (etc...) for? Indeed, why are there soooooo..... many unused and apparently useless devices in the /dev directory?
The names can be anything, the important thing are the device numbers:
markgray@soyo:~> l /dev/ttys0 crw-rw-rw- 1 root tty 3, 48 2003-09-23 13:59 /dev/ttys0 markgray@soyo:~> l /dev/ttyS0 crw-rw---- 1 root uucp 4, 64 2003-09-23 13:59 /dev/ttyS0
From /usr/src/linux/Documentation/devices.txt we see that /dev/ttys0 is one of the old-style (BSD) Pseudo-TTY slaves (which are used when a program wants another program to believe it is talking to a terminal) and they have no hardware meaning whatsoever.
Egads! /dev/cua* has returned. To have your program control your telescope you should be using /dev/cua0 (Ages ago the cua* versions of the ttyS* devices were terminated (with extreme prejudice:-) and now I see that they are back, simplifying your problem entirely.) If you need more info just let me know. (I though it odd when checking devices.txt to see the cua* devices listed and just gave it a shot -- they work just like they used to. Anybody have any idea when they returned, or if they are now a SuSE only feature?)
On Thursday 18 December 2003 12:28 pm, Mark Gray wrote:
Egads! /dev/cua* has returned. To have your program control your telescope you should be using /dev/cua0
Well, cua1 in fact, but that's just cos I don't seem to have a physical device for the ttyS0 / cua0. Hey-ho.
(Ages ago the cua* versions of the ttyS* devices were terminated (with extreme prejudice:-) and now I see that they are back, simplifying your problem entirely.) If you need more info just let me know. (I though it odd when checking devices.txt to see the cua* devices listed and just gave it a shot -- they work just like they used to. Anybody have any idea when they returned, or if they are now a SuSE only feature?)
I sort of take it that the ttyS* are modem oriented and the cua* are raw serial oriented, yes? Dylan -- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg
Except that I got a snotty kernel message to use ttyS1 instead, so I've set it back... Dylan -- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg
participants (2)
-
Dylan
-
Mark Gray