Setting databits for ttyu

You know I want to configure e.g. ttyu6 for incoming connections. In order to do so I add the following line to /etc/ttys file:
Code:
cuau6   "/usr/libexec/getty std.115200" cons25  on secure
OK, I can set the line's speed here, but what about the other options? Like databits, stopbits, etc.
 
j4ck said:
OK, I can set the line's speed here, but what about the other options? Like databits, stopbits, etc.
I've never done this myself before (well, not on FreeBSD that is, I have used modems quite extensively) but you might want to look into the gettytab(5) manualpage. I came across this critter when reading the getty(5) manual page.

The reason I think this might be able to help you are entries such as these:

Code:
     ap      bool    false             terminal uses any parity
     ep      bool    false             terminal uses even parity
     np      bool    false             terminal uses no parity (i.e. 8-bit
                                       characters)
     op      bool    false             terminal uses odd parity
     sp      num     unused            line speed (input and output)
Hope this can help.
 
Alright, I have added the following entry to the /etc/gettytab file:

Code:
test.std.115200:\
        :ep:sp#4800:tc:Pc

And also I have changed the /etc/ttys file:

Code:
cuau3   "/usr/libexec/getty test.std.115200"    cons25  on secure

I expect the /dev/cuau3 device to use even parity and 4800 as speed, but when I check the device properties using stty -f /dev/cuau3, only the speed changes to 4800 and the parity value does not change.

Here's the output of stty -f /dev/cuau3 after applying the changes using the kill -HUP 1 command.

Code:
speed 4800 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost tab3
cflags: cs8 -parenb
 
Back
Top