On Fri, 10 Mar 2000, Sangohn Christian wrote:

> I4m learning programming with the serial port and I do some
> experiments with it.

Read my 'serial_suite.tgz'.  This is a collection of blurbs about the
care and feeding of the serial ports and some simple programs.  There is
a file demonstrating how the lock files should be programmed. There
is a simple getty, a dialer for ppp connections and some other misc
programs.

Via ftp:

ftp scicom.alphacdc.com

Login as "anonymous" then use your full e-mail address as the password.
For me, that is '[EMAIL PROTECTED]'.

cd pub/linux

or:

URL ftp://scicom.alphacdc.com/pub/linux

> Therefore I need to know how to set a serial port to the default
> at boot time.

You should not assume that a port has any particular settings.  Each
process should program the 'struct termios' to its own needs.

Trying to set the parameters by 'stty' in a shell script is futile,
because a 'getty', 'uucp', 'ppp', 'minicom' etc. will change the
parameters when they start up.

The conventional procedure is to define "default" settings in
"/etc/gettydefs".  These will be referenced by the 'getty' and be
inherited by 'login' or whatever.  Unfortunately, many of the 'getty's 
available for Linux are not conventional.  You will have to read the
doc's for the 'getty' you are using.

Each process should also check for a lock file in "/var/lock".  If
none are present, then create one for itself.  See the "devlock-??" in 
my 'serial_suite.tgz' for a library of procedures for use with lock
files. 

vern

-- 
Vernon C. Hoxie                                     [EMAIL PROTECTED]
3975 W. 29th Ave.                                        uucp: 303-455-2670
Denver, Colo., 80212                                    voice: 303-477-1780
            The box said "Requires Windows 95, NT, or better",
                           so I installed Linux.

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]

Reply via email to