First step of a major overhaul of this chapter. Split into multiple

commits to make it slightly easier on the translation teams.

  * Add a standard synopsis
  * Remove references to FreeBSD 1.1.5.1 and FreeBSD 1.1.  Document
    the behavior of 4.x / 5.x and ignore the paleontology.
  * Move <indexterm>s around so that printed output looks better.
  * Reference other chapters in the Handbook instead of duplicating
    information.
  * Rephrase many sentences to be more concise.
  * <filename> -> <command>
  * Refer to the text as "this chapter" instead of "this document"
  * Refer to manual pages consistently.
  * Turns a couple of question and answer entries into more formal
    paragraphs.
  * Don't intersperse example commands inside paragraphs as often.
    Instead, talk about something and then provide an example.
  * Mark up contributors in <sectNinfo>.
  * Remove synopsis-like information from one of the individual
    sections, since this has been expanded at the front of the
    chapter.
  * Mark up keys in <keycode>
  * Remove acknowledgments section.  This is inappropriate for a book
    chapter and the acknowledged person has been moved to the
    <sectNinfo> as an additional contributor.
  * Remove "information integrated from FAQ", that describes much of
    our documentation.
  * Remove troubleshooting entry about needing to be in a specific
    group to run tip or cu, since this is no longer the case.

PR:		19481
This commit is contained in:
Murray Stokely 2001-08-06 12:17:47 +00:00
parent d5aa9581a5
commit 2237f3e894
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10204

View file

@ -1,13 +1,13 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml,v 1.33 2001/07/17 23:33:27 chern Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml,v 1.34 2001/07/30 17:18:54 murray Exp $
--> -->
<chapter id="serialcomms"> <chapter id="serialcomms">
<title>Serial Communications</title> <title>Serial Communications</title>
<sect1> <sect1 id="serial-synopsis">
<title>Synopsis</title> <title>Synopsis</title>
<indexterm><primary>serial communications</primary></indexterm> <indexterm><primary>serial communications</primary></indexterm>
@ -17,13 +17,34 @@
<quote>terminal</quote> consisted of a 10-character-per-second serial <quote>terminal</quote> consisted of a 10-character-per-second serial
printer and a keyboard. This chapter will cover some of the ways in printer and a keyboard. This chapter will cover some of the ways in
which FreeBSD uses serial communications.</para> which FreeBSD uses serial communications.</para>
<para>After reading this chapter you will know:</para>
<itemizedlist>
<listitem><para>How to connect terminals to your FreeBSD
system.</para></listitem>
<listitem><para>How to use a modem to dial out to remote
hosts.</para></listitem>
<listitem><para>How to allow remote users to login to your
system with a modem.</para></listitem>
<listitem><para>How to boot your system from a serial
console.</para></listitem>
</itemizedlist>
<para>Before reading this chapter you should:</para>
<itemizedlist>
<listitem><para>Know how to configure and install a new kernel (<xref
linkend="kernelconfig">)</para></listitem>
<listitem><para>Understand Unix permissions and processes (<xref linkend="basics">)</para></listitem>
<listitem><para>Have access to the technical manual for the
serial hardware (modem or multi-port card) that you would like
to use with FreeBSD.</para></listitem>
</itemizedlist>
</sect1> </sect1>
<sect1 id="serial"> <sect1 id="serial">
<title>Serial Basics</title> <title>Serial Basics</title>
<para><emphasis>Assembled from FAQ.</emphasis></para>
<para>This section should give you some general information about serial <para>This section should give you some general information about serial
ports. If you do not find what you want here, check into the Terminal ports. If you do not find what you want here, check into the Terminal
and Dial-up sections of the handbook.</para> and Dial-up sections of the handbook.</para>
@ -200,9 +221,9 @@
<para>There are a couple of kinds of serial cables. Which one <para>There are a couple of kinds of serial cables. Which one
you'll use depends on the terminal you want to connect:</para> you'll use depends on the terminal you want to connect:</para>
<indexterm><primary>null-modem cable</primary></indexterm>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<indexterm><primary>null-modem cable</primary></indexterm>
<para>If you are connecting a personal computer to act as a <para>If you are connecting a personal computer to act as a
terminal, use a <link linkend="term-null">null-modem</link> terminal, use a <link linkend="term-null">null-modem</link>
cable. A null-modem cable connects two computers or terminals cable. A null-modem cable connects two computers or terminals
@ -413,16 +434,18 @@
already configured your kernel to support the serial port to which the already configured your kernel to support the serial port to which the
terminal is connected&mdash;and that you have connected it.</para> terminal is connected&mdash;and that you have connected it.</para>
<para>In a nutshell, you need to tell the <command>init</command> <para>Recall from <xref linkend="boot"> that the
process, which is responsible for process control and initialization, <command>init</command> process is responsible for all process
to start a <command>getty</command> process, which is responsible for control and initialization at system startup. One of the
tasks performed by <command>init</command> is to read the
<filename>/etc/ttys</filename> file and start a
<command>getty</command> process on the available terminals.
The <command>getty</command> process is responsible for
reading a login name and starting the <command>login</command> reading a login name and starting the <command>login</command>
program.</para> program.</para>
<para>To do so, you have to edit the <filename>/etc/ttys</filename> <para>Thus, to configure terminals for your FreeBSD system the
file. First, use the <command>su</command> command to become root. following steps should be taken as <username>root</username> :</para>
Then, make the following changes to
<filename>/etc/ttys</filename>:</para>
<procedure> <procedure>
<step> <step>
@ -432,7 +455,7 @@
</step> </step>
<step> <step>
<para>Specify that <filename>/usr/libexec/getty</filename> be run on <para>Specify that <command>/usr/libexec/getty</command> be run on
the port, and specify the appropriate the port, and specify the appropriate
<replaceable>getty</replaceable> type from the <replaceable>getty</replaceable> type from the
<filename>/etc/gettytab</filename> file.</para> <filename>/etc/gettytab</filename> file.</para>
@ -459,21 +482,18 @@
<para>As an optional step, you may wish to create a custom <para>As an optional step, you may wish to create a custom
<replaceable>getty</replaceable> type for use in step 2 by making an <replaceable>getty</replaceable> type for use in step 2 by making an
entry in <filename>/etc/gettytab</filename>. This document does entry in <filename>/etc/gettytab</filename>. This chapter does
not explain how to do so; you are encouraged to see the not explain how to do so; you are encouraged to see the
&man.gettytab.5; and the &man.getty.8; manual pages for more &man.gettytab.5; and the &man.getty.8; manual pages for more
information.</para> information.</para>
<para>The remaining sections detail how to do these steps. We will use <para>To help illustrate this procedure, we will use a running
a running example throughout these sections to illustrate what we need example throughout this section. In our example, we will
to do. In our example, we will connect two terminals to the system: a connect two terminals to the system: a Wyse-50 and a old 286
Wyse-50 and a old 286 IBM PC running Procomm terminal software IBM PC running <application>Procomm</application> terminal
emulating a VT-100 terminal. We connect the Wyse to the second serial software emulating a VT-100 terminal. We connect the Wyse to
port and the 286 to the sixth serial port (a port on a multiport the second serial port and the 286 to the sixth serial port (a
serial card).</para> port on a multiport serial card).</para>
<para>For more information on the <filename>/etc/ttys</filename>
file, see the &man.ttys.5; manual page.</para>
<sect3 id="term-etcttys"> <sect3 id="term-etcttys">
<title>Adding an Entry to <filename>/etc/ttys</filename></title> <title>Adding an Entry to <filename>/etc/ttys</filename></title>
@ -491,11 +511,11 @@
port's <filename>/dev</filename> entry without the port's <filename>/dev</filename> entry without the
<filename>/dev</filename> part.</para> <filename>/dev</filename> part.</para>
<para>When you installed your FreeBSD system, the <para>A default FreeBSD install includes a
<filename>/etc/ttys</filename> file included entries for the first <filename>/etc/ttys</filename> file with support for the first
four serial ports: <filename>ttyd0</filename> through four serial ports: <filename>ttyd0</filename> through
<filename>ttyd3</filename>. If you are attaching a terminal on one <filename>ttyd3</filename>. If you are attaching a terminal on one
of those ports, you do not need to add an entry.</para> of those ports, you do not need to add another entry.</para>
<para>In our example, we attached a Wyse-50 to the second serial port, <para>In our example, we attached a Wyse-50 to the second serial port,
<filename>ttyd1</filename>, which is already in the file. We need <filename>ttyd1</filename>, which is already in the file. We need
@ -527,9 +547,8 @@ ttyd5</programlisting>
the entries that start with the text <literal>std</literal> will the entries that start with the text <literal>std</literal> will
work for hardwired terminals. These entries ignore parity. There is work for hardwired terminals. These entries ignore parity. There is
a <literal>std</literal> entry for each bps rate from 110 to 115200. a <literal>std</literal> entry for each bps rate from 110 to 115200.
Of course, you can add your own entries to this file. The manual Of course, you can add your own entries to this file. The
page &man.gettytab.5; provides more &man.gettytab.5; manual page provides more information.</para>
information.</para>
<para>When setting the <replaceable>getty</replaceable> type in the <para>When setting the <replaceable>getty</replaceable> type in the
<filename>/etc/ttys</filename> file, make sure that the <filename>/etc/ttys</filename> file, make sure that the
@ -585,8 +604,8 @@ ttyd5 "/usr/libexec/getty std.19200" vt100</programlisting>
<sect3 id="term-enable"> <sect3 id="term-enable">
<title>Enabling the Port</title> <title>Enabling the Port</title>
<para>The next field in <filename>/etc/ttys</filename>, the fourth <para>The fourth field in <filename>/etc/ttys</filename>
field, tells whether to enable the port. Putting specifies if the port should be enabled. Putting
<literal>on</literal> here will have the <command>init</command> <literal>on</literal> here will have the <command>init</command>
process start the program in the second field, process start the program in the second field,
<command>getty</command>, which will prompt for a login. If you put <command>getty</command>, which will prompt for a login. If you put
@ -608,38 +627,19 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on</programlisting>
optional <literal>window</literal> specifier, but we will ignore optional <literal>window</literal> specifier, but we will ignore
that). The last field tells whether the port is secure.</para> that). The last field tells whether the port is secure.</para>
<para>What does <quote>secure</quote> mean?</para> <para>Marking a port as secure means that you trust it enough
to allow the the <username>root</username> account (or any
account with a user ID of 0) to login from that port.
Insecure ports do not allow <username>root</username>
logins. On an insecure port, users must login from
unprivileged accounts and then use &man.su.1; or similar to
gain superuser privileges.</para>
<para>It means that the root account (or any account with a user ID of <para>It is highly recommended that you use
0) may login on the port. Insecure ports do not allow root to <quote>insecure</quote> even for terminals that are behind
login.</para> locked doors. It is quite easy to login and use &man.su.1;
if you need superuser privileges.</para>
<para>How do you use secure and insecure ports?</para>
<para>By marking a port as insecure, the terminal to which it is
connected will not allow root to login. People who know the root
password to your FreeBSD system will first have to login using a
regular user account. To gain superuser privileges, they will then
have to use the <command>su</command> command.</para>
<para>Because of this, you will have two records to help track down
possible compromises of root privileges: both the
<command>login</command> and the <command>su</command> command make
records in the system log (and logins are also recorded in the
<filename>wtmp</filename> file).</para>
<para>By marking a port as secure, the terminal will allow root in.
People who know the root password will just login as root. You will
not have the potentially useful login and <command>su</command>
command records.</para>
<para>Which should you use?</para>
<para>Just use <quote>insecure.</quote> Use <quote>insecure</quote>
<emphasis>even</emphasis> for terminals <emphasis>not</emphasis> in
public user areas or behind locked doors. It is quite easy to login
and use <command>su</command> if you need superuser
privileges.</para>
<para>Here finally are the completed entries in the <para>Here finally are the completed entries in the
<filename>/etc/ttys</filename> file, with comments added to describe <filename>/etc/ttys</filename> file, with comments added to describe
@ -653,26 +653,13 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</pro
<title>Force <command>init</command> to Reread <title>Force <command>init</command> to Reread
<filename>/etc/ttys</filename></title> <filename>/etc/ttys</filename></title>
<para>When you boot FreeBSD, the first process, <para>After making the necessary changes to the
<command>init</command>, will read the <filename>/etc/ttys</filename> file you should send a SIGHUP
<filename>/etc/ttys</filename> file and start the programs listed (hangup) signal to the <command>init</command> process to
for each enabled port to prompt for logins.</para> force it to re-read its configuration file. For example :</para>
<para>After you edit <filename>/etc/ttys</filename>, you do not want
to have to reboot your system to get <command>init</command> to see
the changes. So, <command>init</command> will reread
<filename>/etc/ttys</filename> if it receives a SIGHUP (hangup)
signal.</para>
<para>So, after you have saved your changes to
<filename>/etc/ttys</filename>, send <literal>SIGHUP</literal> to
<command>init</command> by typing:</para>
<screen>&prompt.root; <userinput>kill -HUP 1</userinput></screen> <screen>&prompt.root; <userinput>kill -HUP 1</userinput></screen>
<para>(The <command>init</command> process <emphasis>always</emphasis>
has process ID 1.)</para>
<para>If everything is set up correctly, all cables are in place, and <para>If everything is set up correctly, all cables are in place, and
the terminals are powered up, you should see login prompts. Your the terminals are powered up, you should see login prompts. Your
terminals are ready for their first logins!</para> terminals are ready for their first logins!</para>
@ -707,24 +694,24 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</pro
supply.</para> supply.</para>
<para>Make sure that a <command>getty</command> process is running <para>Make sure that a <command>getty</command> process is running
and serving the terminal. Type</para> and serving the terminal. For example, to get a list of
running getty processes with <command>ps</command>, type:</para>
<screen>&prompt.root; <userinput>ps -axww|grep getty</userinput></screen> <screen>&prompt.root; <userinput>ps -axww|grep getty</userinput></screen>
<para>to get a <para>You should see an entry for the terminal. For
list of running <command>getty</command> processes. You should example, the following display shows that a
see an entry for the terminal. For example, the display <command>getty</command> is running on the second serial
port <literal>ttyd1</literal> and is using the
<literal>std.38400</literal> entry in
<filename>/etc/gettytab</filename>:</para>
<screen>22189 d1 Is+ 0:00.03 /usr/libexec/getty std.38400 ttyd1</screen> <screen>22189 d1 Is+ 0:00.03 /usr/libexec/getty std.38400 ttyd1</screen>
shows that a <command>getty</command> is running on the second
serial port <literal>ttyd1</literal> and is using the
<literal>std.38400</literal> entry in
<filename>/etc/gettytab</filename>.</para>
<para>If no <command>getty</command> process is running, make sure <para>If no <command>getty</command> process is running, make sure
you have enabled the port in <filename>/etc/ttys</filename>. you have enabled the port in <filename>/etc/ttys</filename>.
Make sure you have run <command>kill -HUP 1</command>.</para> Also remember to run <command>kill -HUP 1</command>
after modifying the <filename>ttys</filename> file.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -755,42 +742,26 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure # Guest bathroom</pro
</sect1> </sect1>
<sect1 id="dialup"> <sect1 id="dialup">
<sect1info>
<authorgroup>
<author>
<firstname>Guy</firstname>
<surname>Helmer</surname>
<contrib>Contributed</contrib>
</author>
<author>
<firstname>Sean</firstname>
<surname>Kelly</surname>
<contrib>Additions</contrib>
</author>
</authorgroup>
</sect1info>
<title>Dial-in Service</title> <title>Dial-in Service</title>
<indexterm><primary>dial-in service</primary></indexterm> <indexterm><primary>dial-in service</primary></indexterm>
<para><emphasis>Contributed by &a.ghelmer;.</emphasis></para>
<para>This document provides suggestions for configuring a FreeBSD system
to handle dial-up modems. This document is written based on the author's
experience with FreeBSD versions 1.0, 1.1, and 1.1.5.1 (and experience
with dial-up modems on other Unix-like operating systems); however, this
document may not answer all of your questions or provide examples
specific enough to your environment. The author cannot be responsible if
you damage your system or lose data due to attempting to follow the
suggestions here.</para>
<sect2 id="dialup-prereqs">
<title>Prerequisites</title>
<para>To begin with, the author assumes you have some basic knowledge of
FreeBSD. You need to have FreeBSD installed, know how to edit files
in a Unix-like environment, and how to look up manual pages on the
system. As discussed below, you will need certain versions of
FreeBSD, and knowledge of some terminology &amp; modem and
cabling.</para>
<sect3>
<title>FreeBSD Version</title>
<para>First, it is assumed that you are using FreeBSD version 1.1 or
higher (including versions 2.X). FreeBSD version 1.0 included two
different serial drivers, which complicates the situation. Also,
the serial device driver (<devicename>sio</devicename>) has improved
in every release of FreeBSD, so more recent versions of FreeBSD are
assumed to have better and more efficient drivers than earlier
versions.</para>
</sect3>
<sect2>
<title>Intro</title>
<sect3> <sect3>
<title>Terminology</title> <title>Terminology</title>
@ -1185,12 +1156,10 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<filename>/sbin/init</filename> what <filename>tty</filename> devices <filename>/sbin/init</filename> what <filename>tty</filename> devices
should have <command>getty</command> processes running on them. should have <command>getty</command> processes running on them.
Lastly, you can place port initialization commands in the Lastly, you can place port initialization commands in the
<filename>/etc/rc.serial</filename> script if you have FreeBSD 1.1.5.1 <filename>/etc/rc.serial</filename> script.
or higher; otherwise, you can initialize ports in the
<filename>/etc/rc.local</filename> script.</para>
<para>There are two schools of thought regarding dial-up modems on Unix. <para>There are two schools of thought regarding dial-up modems on Unix.
One group likes to configure their modems and system so that no matter One group likes to configure their modems and systems so that no matter
at what speed a remote user dials in, the local computer-to-modem at what speed a remote user dials in, the local computer-to-modem
RS-232 interface runs at a locked speed. The benefit of this RS-232 interface runs at a locked speed. The benefit of this
configuration is that the remote user always sees a system login configuration is that the remote user always sees a system login
@ -1209,7 +1178,7 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<prompt>login:</prompt> message at an initial speed and watches the <prompt>login:</prompt> message at an initial speed and watches the
characters that come back in response. If the user sees junk, it is characters that come back in response. If the user sees junk, it is
assumed that they know they should press the assumed that they know they should press the
<literal>&lt;Enter&gt;</literal> key until they see a recognizable <keycode>Enter</keycode> key until they see a recognizable
prompt. If the data rates do not match, <command>getty</command> sees prompt. If the data rates do not match, <command>getty</command> sees
anything the user types as <quote>junk</quote>, tries going to the next anything the user types as <quote>junk</quote>, tries going to the next
speed and gives the <prompt>login:</prompt> prompt again. This speed and gives the <prompt>login:</prompt> prompt again. This
@ -1250,10 +1219,8 @@ crw-rw---- 1 uucp dialer 28, 193 Feb 15 14:38 /dev/cuala1</screen>
<filename>/etc/gettytab</filename> to give <filename>/etc/gettytab</filename> to give
<command>getty</command> information about the speeds you wish to <command>getty</command> information about the speeds you wish to
use for your modem. If you have a 2400 bps modem, you can use for your modem. If you have a 2400 bps modem, you can
probably use the existing <literal>D2400</literal> entry. This probably use the existing <literal>D2400</literal>
entry already exists in the FreeBSD 1.1.5.1 entry.</para>
<filename>gettytab</filename> file, so you do not need to add it
unless it is missing under your version of FreeBSD:</para>
<programlisting># <programlisting>#
# Fast dialup terminals, 2400/1200/300 rotary (can start either way) # Fast dialup terminals, 2400/1200/300 rotary (can start either way)
@ -1284,12 +1251,7 @@ up|V9600|High Speed Modem at 9600,8-bit:\
uq|V19200|High Speed Modem at 19200,8-bit:\ uq|V19200|High Speed Modem at 19200,8-bit:\
:nx=V9600:tc=std.19200:</programlisting> :nx=V9600:tc=std.19200:</programlisting>
<para>On FreeBSD 1.1.5 and later, this will result in 8-bit, no <para>This will result in 8-bit, no parity connections.</para>
parity connections. Under FreeBSD 1.1, add
<literal>:np:</literal> parameters to the
<literal>std.<replaceable>xxx</replaceable></literal> entries at
the top of the file for 8 bits, no parity; otherwise, the default
is 7 bits, even parity.</para>
<para>The example above starts the communications rate at 19.2 Kbps <para>The example above starts the communications rate at 19.2 Kbps
(for a V.32bis connection), then cycles through 9600 bps (for (for a V.32bis connection), then cycles through 9600 bps (for
@ -1328,24 +1290,16 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
<sect3 id="dialup-ttys"> <sect3 id="dialup-ttys">
<title><filename>/etc/ttys</filename></title> <title><filename>/etc/ttys</filename></title>
<indexterm> <indexterm>
<primary><filename>/etc/ttys</filename></primary> <primary><filename>/etc/ttys</filename></primary>
</indexterm> </indexterm>
<para><filename>/etc/ttys</filename> is the list of <para>Configuration of the <filename>/etc/ttys</filename> file
<filename>ttys</filename> for <command>init</command> to monitor. was covered in the last section for configuring terminals.
<filename>/etc/ttys</filename> also provides security information to Configuration for modems is similar but we must pass a
<command>login</command> (user <username>root</username> may only different argument to <command>getty</command> and specify a
login on ttys marked <literal>secure</literal>). See the manual different terminal type. The general format for both
page for locked-speed and matching-speed configurations is:</para>
&man.ttys.5; for more information.</para>
<para>You will need to either modify existing lines in
<filename>/etc/ttys</filename> or add new lines to make
<command>init</command> run <command>getty</command> processes
automatically on your new dial-up ports. The general format of the
line will be the same, whether you are using a locked-speed or
matching-speed configuration:</para>
<programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting> <programlisting>ttyd0 "/usr/libexec/getty xxx" dialup on</programlisting>
@ -1398,12 +1352,12 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
<programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting> <programlisting>ttyd0 "/usr/libexec/getty std.19200" dialup on</programlisting>
<para>If your modem is locked at a different data rate, substitute <para>If your modem is locked at a different data rate,
the appropriate name for the substitute the appropriate value for
<literal>std.<replaceable>speed</replaceable></literal> entry for <literal>std.<replaceable>speed</replaceable></literal>
<literal>std.19200</literal> from instead of <literal>std.19200</literal>. Make sure that
<filename>/etc/gettytab</filename> for your modem's data you use a valid type listed in
rate.</para> <filename>/etc/gettytab</filename>.
</sect4> </sect4>
<sect4> <sect4>
@ -1423,53 +1377,28 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\
</sect3> </sect3>
<sect3> <sect3>
<title><filename>/etc/rc.serial</filename> or <title><filename>/etc/rc.serial</filename></title>
<filename>/etc/rc.local</filename></title> <indexterm>
<indexterm> <primary>rc files</primary>
<primary>rc files</primary> <secondary><filename>rc.serial</filename></secondary>
<secondary><filename>rc.local</filename></secondary> </indexterm>
</indexterm>
<indexterm>
<primary>rc files</primary>
<secondary><filename>rc.serial</filename></secondary>
</indexterm>
<para>High-speed modems, like V.32, V.32bis, and V.34 modems, need to <para>High-speed modems, like V.32, V.32bis, and V.34 modems,
use hardware (<filename>RTS/CTS</filename>) flow control. You can need to use hardware (<filename>RTS/CTS</filename>) flow
add <command>stty</command> commands to control. You can add <command>stty</command> commands to
<filename>/etc/rc.serial</filename> on FreeBSD 1.1.5.1 and up, or <filename>/etc/rc.serial</filename> to set the hardware flow
<filename>/etc/rc.local</filename> on FreeBSD 1.1, to set the control flag in the FreeBSD kernel for the modem
hardware flow control flag in the FreeBSD kernel for the modem
ports.</para> ports.</para>
<para>For example, on a sample FreeBSD 1.1.5.1 system, <para>For example to set the <literal>termios</literal> flag
<filename>/etc/rc.serial</filename> reads:</para> <varname>crtscts</varname> on serial port #1's
(<devicename>COM2:</devicename>) dial-in and dial-out initialization
<programlisting>#!/bin/sh devices, the folling lines could be added to
# <filename>/etc/rc.serial</filename> :</para>
# Serial port initial configuration <programlisting># Serial port initial configuration
stty -f /dev/ttyid1 crtscts stty -f /dev/ttyid1 crtscts
stty -f /dev/cuai01 crtscts</programlisting> stty -f /dev/cuai01 crtscts</programlisting>
<para>This sets the <literal>termios</literal> flag
<literal>crtscts</literal> on serial port #1's
(<devicename>COM2:</devicename>) dial-in and dial-out initialization
devices.</para>
<para>On an old FreeBSD 1.1 system, these entries were added to
<filename>/etc/rc.local</filename> to set the
<literal>crtscts</literal> flag on the devices:</para>
<programlisting># Set serial ports to use RTS/CTS flow control
stty -f /dev/ttyd0 crtscts
stty -f /dev/ttyd1 crtscts
stty -f /dev/ttyd2 crtscts
stty -f /dev/ttyd3 crtscts</programlisting>
<para>Since there is no initialization device special file on FreeBSD
1.1, one has to just set the flags on the sole device special file
and hope the flags are not cleared by a miscreant.</para>
</sect3> </sect3>
</sect2> </sect2>
@ -1490,7 +1419,7 @@ stty -f /dev/ttyd3 crtscts</programlisting>
<listitem> <listitem>
<para><acronym>DTR</acronym> asserted for operation; dropping DTR <para><acronym>DTR</acronym> asserted for operation; dropping DTR
hangs up line &amp; resets modem</para> hangs up line and resets modem</para>
</listitem> </listitem>
<listitem> <listitem>
@ -1570,9 +1499,9 @@ AT&amp;C1&amp;D2&amp;H1&amp;I0&amp;R2&amp;W</programlisting>
<para>Result codes should be disabled/suppressed for dial-up modems to <para>Result codes should be disabled/suppressed for dial-up modems to
avoid problems that can occur if <command>getty</command> mistakenly avoid problems that can occur if <command>getty</command> mistakenly
gives a <prompt>login:</prompt> prompt to a modem that is in command gives a <prompt>login:</prompt> prompt to a modem that is in command
mode and the modem echoes the command or returns a result code. I mode and the modem echoes the command or returns a result
have heard this sequence can result in a extended, silly conversation code. This sequence can result in a extended, silly conversation
between <command>getty</command> and the modem.</para> between <command>getty</command> and the modem.</para>
<sect3> <sect3>
<title>Locked-speed Config</title> <title>Locked-speed Config</title>
@ -1675,7 +1604,7 @@ AT&amp;B2&amp;W</programlisting>
<para>Try dialing into the system; be sure to use 8 bits, no parity, 1 <para>Try dialing into the system; be sure to use 8 bits, no parity, 1
stop bit on the remote system. If you do not get a prompt right stop bit on the remote system. If you do not get a prompt right
away, or get garbage, try pressing <literal>&lt;Enter&gt;</literal> away, or get garbage, try pressing <keycode>Enter</keycode>
about once per second. If you still do not see a about once per second. If you still do not see a
<prompt>login:</prompt> prompt after a while, try sending a <prompt>login:</prompt> prompt after a while, try sending a
<command>BREAK</command>. If you are using a high-speed modem to do <command>BREAK</command>. If you are using a high-speed modem to do
@ -1720,29 +1649,12 @@ AT&amp;B2&amp;W</programlisting>
</sect3> </sect3>
</sect2> </sect2>
<sect2>
<title>Acknowledgments</title>
<para>Thanks to these people for comments and advice:</para>
<variablelist>
<varlistentry>
<term>&a.kelly;</term>
<listitem>
<para>for a number of good suggestions</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1> </sect1>
<sect1 id="dialout"> <sect1 id="dialout">
<title>Dial-out Service</title> <title>Dial-out Service</title>
<indexterm><primary>dial-out service</primary></indexterm> <indexterm><primary>dial-out service</primary></indexterm>
<para><emphasis>Information integrated from FAQ.</emphasis></para>
<para>The following are tips to getting your host to be able to connect <para>The following are tips to getting your host to be able to connect
over the modem to another computer. This is appropriate for over the modem to another computer. This is appropriate for
establishing a terminal session with a remote host.</para> establishing a terminal session with a remote host.</para>
@ -1754,27 +1666,6 @@ AT&amp;B2&amp;W</programlisting>
something and PPP is broken, use the terminal session to FTP it. Then something and PPP is broken, use the terminal session to FTP it. Then
use zmodem to transfer it to your machine.</para> use zmodem to transfer it to your machine.</para>
<sect2>
<title>Why cannot I run <command>tip</command> or
<command>cu</command>?</title>
<para>On your system, the programs <command>tip</command> and
<command>cu</command> are probably executable only by
<username>uucp</username> and group <username>dialer</username>. You
can use the group <username>dialer</username> to control who has
access to your modem or remote systems. Just add yourself to group
dialer.</para>
<para>Alternatively, you can let everyone on your system run
<command>tip</command> and <command>cu</command> by typing:</para>
<screen>&prompt.root; <userinput>chmod 4511 /usr/bin/tip</userinput></screen>
<para>You do not have to run this command for <command>cu</command>,
since <command>cu</command> is just a hard link to
<command>tip</command>.</para>
</sect2>
<sect2> <sect2>
<title>My stock Hayes modem is not supported, what can I do?</title> <title>My stock Hayes modem is not supported, what can I do?</title>