📄 0145-0148.html
字号:
<HTML>
<HEAD>
<TITLE>Sams Teach Yourself Linux in 24 Hours:Connecting to the Outside World:EarthWeb Inc.-</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311623 //-->
<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->
<!-- AUTHOR=Bill Ball//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=09 //-->
<!-- PAGES=0139-0160 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0139-0144.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0149-0152.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-145"><P>Page 145</P></A>
<P>This command will run the xminicom script and start
minicom in an X11 terminal window. To get help on how to use
minicom, you can hold down the Alt key and press the Z key.
Figure 9.1 shows the minicom help screen.
</P>
<P>Figure 9.1.<BR>
The minicom communi-<BR>
cations program<BR> features built-in
help<BR> for the user.<BR>
<a href="javascript:displayWindow('images/ch09fg01.jpg', 288, 216)"><img src="images/tn_ch09fg01.jpg"></a><BR>
</P>
<P>
To configure minicom, hold down the Alt key and press the O key to get to
the configure screen. Scroll down, select Serial Port Setup, and press the Enter key. You then can
type in the Serial Device by pressing the A key. Type in the device your modem is
connected to, such as /dev/cua1, or the symbolic link,
/dev/modem, if you've created the link. Figure 9.2 details the serial port setup screen.
</P>
<P>Finally, press the Enter key, select Save setup as dfl, and press the Enter key again,
followed by the Escape key. Your system defaults should be set. You can then try to call out with
</P>
<!-- CODE SNIP //-->
<PRE>
ATDTXXX-XXXX
</PRE>
<!-- END CODE SNIP //-->
<P>If you press Enter after dialing, this should make your modem dial the phone
number represented by XXX-XXXX. If you have a number of phone numbers of other
computers to call, you can enter them in minicom's phone directory. You can also set up
minicom to send or retrieve files by using different file transfer programs. For details about these and
other features, read the minicom manual page. You'll also find documentation under the
/usr/doc directory, which contains extensive details of using other features of this program.
</P>
<A NAME="PAGENUM-146"><P>Page 146</P></A>
<P>Figure 9.2.<BR>
Configuring the serial<BR>
port for minicom.<BR>
<a href="javascript:displayWindow('images/ch09fg02.jpg', 288, 216)"><img src="images/tn_ch09fg02.jpg"></a><BR>
</P>
<H4><A NAME="ch09_ 10">
Setting Up and Calling Out with the seyon X11 Client
</A></H4>
<P>The seyon communications program, by Muhammad M. Saggaf, runs only under the
X Window System, and has an extensive list of features. Although
seyon isn't as simple or initially friendly as
minicom, it does have
</P>
<UL>
<LI> Built-in help
<LI> A built-in telecommunications scripting language to automate calling up
and logging into other computer systems
<LI> A built-in text editor for writing telecommunications scripts
<LI> A command-line shell dialog for running commands, which displays output in the main communication window
<LI> Buttons to set up modem speed, parity, and stop bits
</UL>
<P>If you've created a symbolic link to /dev/modem, the
seyon program will automatically recognize and work with your modem. All you have to do to call out and connect with
another computer is to type your AT command string with the phone number to dial out
and connect.
</P>
<P>If you need to tell the seyon client the specific device for your modem, click the Set
button in the Seyon Command Center window to bring up the Settings window. Click the
Port button in the Settings window and type in the name of the device,
/dev/cua1 for example, in the Values? window. Figure 9.3 shows
seyon and its settings windows.
</P>
<A NAME="PAGENUM-147"><P>Page 147</P></A>
<P>Figure 9.3.<BR>
The seyon X11 client<BR>
has point-and-click<BR> convenience
for<BR> modem setup.<BR>
<a href="javascript:displayWindow('images/ch09fg03.jpg', 288, 216)"><img src="images/tn_ch09fg03.jpg"></a><BR>
</P>
<P>Now click OK and click the Close button of the Settings window. If you'd like to start
the seyon program with a default modem speed, number of bits, or parity, edit the file
called startup in the .seyon directory in your home directory. This directory is installed
automatically when you install the seyon program. You can make changes to the following lines in
the startup file:
</P>
<!-- CODE //-->
<PRE>
...
# set baud
set baud 19200
# can be 5, 6, 7, or 8
# set bits 8
set bits 8
# can be 0 (= no parity), 1 (= odd parity), or 2 (= even parity)
# set parity 0
set parity 0
# can be 1 or 2
# set stopBits 1
set stopBits 1
...
</PRE>
<!-- END CODE //-->
<P>If you need help when using the seyon program, you can click the Help button in the
seyon Command Center window. A window will pop up with the
seyon manual page, and you can scroll through the text for help.
</P>
<A NAME="PAGENUM-148"><P>Page 148</P></A>
<H4><A NAME="ch09_ 11">
Setting Up Your Linux System for Dialing In
</A></H4>
<P>You can also set up your Linux system so that your computer's modem answers the
phone and allows you to log in. You can then run a bulletin board system (BBS), word
processors, spreadsheet programs, and even dial out on another line if you have at least two
modems connected to your computer and two phone lines in your home.
</P>
<P>You'll find most of the details, and custom configurations, in the Serial-HOWTO
under the /usr/doc directory, but the three basic steps outlined here should work for nearly
any modem.
</P>
<P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
CAUTION
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
Setting up your Linux system to accept incoming calls involves editing the
/etc/inittab file and could potentially hang your system if you make an
error. Always have a backup boot disk handy and make a copy of the
/etc/inittab file before you make changes.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<P>First, run minicom, and use the AT command
&V to display your modem's profile, or default setup—for example,
</P>
<!-- CODE //-->
<PRE>
AT&V
ACTIVE PROFILE:
B1 E1 L1 M1 N1 Q0 T V1 W0 X4 Y0 &C1 &D2 &G0 &J0 &K3 &Q5 &R1 &S0 &T5 &X0 &Y0 ~Z0
S00:000 S01:000 S02:043 S03:013 S04:010 S05:008 S06:004 S07:045 S08:002 S09:006
S10:014 S11:095 S12:050 S18:000 S25:005 S26:001 S36:007 S37:000 S38:020 S44:020
S46:138 S48:007 S51:012 S52:012 S53:010 S54:010 S95:000
</PRE>
<!-- END CODE //-->
<P>You may see other values, but you need to make sure that your modem is at least set
to the following:
</P>
<!-- CODE SNIP //-->
<PRE>
E1 Q0 V1 S0=0 &C1 &S0
</PRE>
<!-- END CODE SNIP //-->
<P>You can set your modem to these values by using the AT command—for example,
</P>
<!-- CODE SNIP //-->
<PRE>
ATE1Q0V1S0=0&C1&S0&W
OK
</PRE>
<!-- END CODE SNIP //-->
<P>Note that at the end of the AT command string, I've used the
&W AT command to save the modem configuration as a default. You should also see the OK prompt echoed
from your modem after entering the string.
</P>
<P>The second step is to create a file called
/etc/conf.uugetty.ttySX, where the X matches the
serial port or device number of your serial port. In this example, the modem is connected to
the DOS COM2 port, or /dev/cua1 or /dev/ttyS1, so you'll create
conf.uugetty.ttyS1 as your file. Make sure that you're logged in as root and enter the following into the file:
</P>
<!-- CODE SNIP //-->
<PRE>
ALTLOCK=cua1
ALTLINE=cua1
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="0139-0144.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0149-0152.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -