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.
Secondly, /dev/ttyS0 has group uucp, and group rw privelidge by default (at least that's how I found it). My user is also in group uucp, but I recieved read/write permission denied on the device until I set it to rw-rw-rw- Cound this be because I'm distributing login with NIS? All boxes are runninf SuSE8.2, so I figure the user IDs will be the same...
The NIS does not matter. The problem is that /dev/ttyS0 expects to have a modem connected to it and the driver is waiting for a call-in, so if a naive program trys to talk to that device nothing is going to happen until the modem "rings". What program are you using to talk to your telescope? If you have the source I can tell you what initializations you have to give to /dev/ttyS0 in order for your computer to initiate the data exchange.