DragonFly BSD
DragonFly kernel List (threaded) for 2003-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Rd: Serial console working?


From: Galen Sampson <galen_sampson@xxxxxxxxx>
Date: Tue, 21 Oct 2003 09:02:57 -0700 (PDT)

  In the past when I tried to get a serial console working I found that setting
the correct baud for the transmission between the two machines was an absolute
must to get anything to work.  This would appear obvious at first glance, but
there are some things you might consider.  With a serial console there are
actually two baud rates that the machine's serial port will be set to.  When
the kernel starts and decides that a serial console is to be used it configures
the port to a speed determined at compile time (the BOOT_COMCONSOLE_SPEED
option that can be specified in /etc/make.conf).  The default speed for this is
9600.  After the kernel starts and init starts a getty on that serial port
based on the entries in /etc/ttys:

ttyd0   "/usr/libexec/getty std.9600"   dialup  on secure
                                ^^^^            ^^

   You must turn it "on" (see above), and you should sett the getty to use the
same baud as the kernel's console speed (see man getty(8) about gettytab and
how that configures the terminal speed).  If the kernel was built with the
default BOOT_COMCONSOLE_SPEED of 9600 (default) and your line in /etc/ttys
matches the line above (default except it is turned "on") you should experience
correct behavior.  If the speed of the getty and the BOOT_COMCONSOLE_SPEED do
not match you will probably get unexpected results.
   The final things that you might consider is the parity and flow control of
the connection.  I'm not old enought to have played with serial connections
much but its sufficient to say that they must match on both ends of the
connection.  Although such settings may be changed in gettytab, it isn't as
simple to change them in the kernel.  The default gettytab entries match the
kernel's settings for flow control and parity.  The default is RTS/CTS (or
"hardware") flow control, 8 data bits, no parity, and 1 stop bit.  Lastly all
of the serial devices must exist in /dev.  You may need to run "makedev" to
create them.  The freebsd handbook provides excellent documentation with
respect to serial communications. 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serial.html explains
flow control. 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html
explains serial consoles.  You may want to read all of chapter 17 though
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialcomms.html.
   My serial console works from another freebsd machine through the tip(1)
command.  It also works from windows "hyperterminal" program after a bit of
configuration to match the parity and speed settings dicusses.

regards,
Galen

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]