mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
7944550e11
commit
eda66735c2
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>v4.17</revnumber>
|
<revnumber>v4.20</revnumber>
|
||||||
<date>May 16, 2000</date>
|
<date>June 29, 2000</date>
|
||||||
<authorinitials>vv</authorinitials>
|
<authorinitials>vv</authorinitials>
|
||||||
<revremark>
|
<revremark>
|
||||||
Additions to @home and new provider in Bombay, India
|
Addition to 21st Century Cable
|
||||||
</revremark>
|
</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
@ -280,10 +280,10 @@ With a little luck, your ethernet card should be working in Windows
|
||||||
95, and ready to rock in Linux.
|
95, and ready to rock in Linux.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<sect3 id="solomon">
|
||||||
If you live Hampton Roads, VA or Phoenix, AZ
|
<title id="solomon.title">Notes from Hampton Roads, VA and Phoenix,
|
||||||
you should read a little note from Mark Solomon
|
AZ by Mark Solomon:
|
||||||
</para>
|
</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
With the @home service in Hampton Roads, VA, it is absolutly neccessary
|
With the @home service in Hampton Roads, VA, it is absolutly neccessary
|
||||||
|
@ -307,6 +307,7 @@ Ether Express cards can be found at
|
||||||
<ulink
|
<ulink
|
||||||
url="http://www.monmouth.com/~jay/Linux/">http://www.monmouth.com/~jay/Linux/</ulink>
|
url="http://www.monmouth.com/~jay/Linux/">http://www.monmouth.com/~jay/Linux/</ulink>
|
||||||
</para>
|
</para>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
<title>Notes for Baltimore, MD and Colleyville,TX</title>
|
<title>Notes for Baltimore, MD and Colleyville,TX</title>
|
||||||
|
@ -467,6 +468,89 @@ words "router", "firewall", or "Linux".
|
||||||
|
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>Notes from Mobile, Alabama R. Jason Valentine <email>miracle@procyon.com</email>:
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In Mobile, Comcast cable provides cable modem service through the @home
|
||||||
|
network. An RCA cable modem (model DCM205) is issued along with a SMC
|
||||||
|
EZ-Card (10/100) if you don't already have a cable modem.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Static IPs are not given, but rather assigned through DHCP. You need to
|
||||||
|
make your ethernet card (eth*) use DHCP - linuxconf is the easiest way to
|
||||||
|
set that up. Next, you'll need to find the following line in /sbin/ifup
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
if [ -n "$PUMP" ]; then
|
||||||
|
echo -n "Determining IP information for $DEVICE..."
|
||||||
|
if /sbin/pump -i $DEVICE; then
|
||||||
|
echo " done."
|
||||||
|
else
|
||||||
|
echo " failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else ...
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
and change it to
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
if [ -n "$PUMP" ]; then
|
||||||
|
echo -n "Determining IP information for $DEVICE..."
|
||||||
|
if /sbin/pump -i $DEVICE -h hostname; then
|
||||||
|
echo " done."
|
||||||
|
else
|
||||||
|
echo " failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else ...
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Where hostname is the computer name (cc123456-a - or whatever yours may
|
||||||
|
be.)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>Notes from Auburn, Alabama by Andrew W. Jones
|
||||||
|
<email>andywjones@home.com</email>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
I would like to note that Auburn's @home service supports DHCP. If you
|
||||||
|
simply issue `dhcpcd -h hostname` all your network settings are taken
|
||||||
|
care of...
|
||||||
|
</para>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>Notes from Santa Barbara, California by Tim Newsome
|
||||||
|
<email>nuisance@cmu.edu</email>
|
||||||
|
</title>
|
||||||
|
<para>
|
||||||
|
My provider (Cox@Home, in Santa Barbara, CA) does the same thing as
|
||||||
|
<link linkend=solomon endterm="solomon.title"></link>. I'm using Debian,
|
||||||
|
with dhclient version 2.0. I added the following line to my
|
||||||
|
/etc/dhclient.conf: send host-name "cx803168-a"; Where cx803168-a is the
|
||||||
|
hostname I've been assigned. It is listed on the purchase order.
|
||||||
|
</para>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Information about @Home Service can be found at
|
Information about @Home Service can be found at
|
||||||
<ulink url="http://www.home.com/">http://www.home.com/</ulink>.
|
<ulink url="http://www.home.com/">http://www.home.com/</ulink>.
|
||||||
|
@ -510,6 +594,18 @@ install on a Linux system. It's also best not to mention the IPFW system
|
||||||
while they're around.
|
while they're around.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Additional notes by Phil Baird <email>pjb@rocsoft.com</email> from Rochester, NY:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
About getting hooked up initially. It is true the RR techs don't want
|
||||||
|
to talk about Linux. However, they now offer us a "self-install" that is
|
||||||
|
half the price ($50). Basically, they come out, run the cable, and make
|
||||||
|
sure the signal gets to the modem. You must supply your own nic card and
|
||||||
|
do the rest of the setup on your own.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Information about RoadRunner Service can be found at
|
Information about RoadRunner Service can be found at
|
||||||
<ulink url="http://www.rr.com/">http://www.rr.com/</ulink>.
|
<ulink url="http://www.rr.com/">http://www.rr.com/</ulink>.
|
||||||
|
@ -540,7 +636,7 @@ for Rogers@Home at
|
||||||
http://members.home.net/randal.leavitt/CableModemConnectionNotes.html</ulink>.
|
http://members.home.net/randal.leavitt/CableModemConnectionNotes.html</ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>Notes from Greg Jacobs</para>
|
<para>Notes from Greg Jacobs <email>gregjacobs@home.com</email></para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
They now only give out dynamic IP's. The techs says its pretty much fixed
|
They now only give out dynamic IP's. The techs says its pretty much fixed
|
||||||
|
@ -942,8 +1038,8 @@ Information about Videotron can be found at
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Telekabel (Teleweb), Austria</title>
|
<title>Telekabel (Teleweb), Austria</title>
|
||||||
<para>
|
<para>
|
||||||
According to Andreas Kostyrka:
|
There are two approaches to setting up your Telekabel
|
||||||
</para>
|
connection. First one is the approach used by Andreas Kostyrka: </para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
|
@ -973,6 +1069,30 @@ url="ftp://ftp.redhat.com/pub/contrib/readmes/3c5x9utils-1.0-1.README">ftp://ftp
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Second approach is provided by Marcel Ebmer
|
||||||
|
<email>marcel.ebmer@chello.at</email>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
|
Do NOT bother using dhcpcd or pump!
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
In case you don't know, ask the provider for your IP-address, which
|
||||||
|
is static, for the DNSs, the Gateway and use linuxconf to configure the
|
||||||
|
network. For Vienna: 960 60 333 is the helpdesk's telephone number They
|
||||||
|
officially do not support linux, but you need not mention you
|
||||||
|
are running linux.
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
Choose a unique name for your PC....not "localhost"
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Information about Telekabel can be found at <ulink
|
Information about Telekabel can be found at <ulink
|
||||||
url="http://www.telekabel.at/">http://www.telekabel.at/</ulink>.
|
url="http://www.telekabel.at/">http://www.telekabel.at/</ulink>.
|
||||||
|
@ -1898,6 +2018,29 @@ my Linux box (which I never do really) I can go in and update the IP
|
||||||
address that my web server www.xanderbelly.com and mail server
|
address that my web server www.xanderbelly.com and mail server
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Additional notes:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The terms and conditions of 21st Century cable modem contains the
|
||||||
|
following statement:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Distributing unsolicited information in any manner is prohibited on 21st
|
||||||
|
Century's network and will result in termination of 21st Century
|
||||||
|
service. (I.e. junk email, etc...) Any use of a server type application
|
||||||
|
or service on a computer system connected to 21st Century Cable Modem
|
||||||
|
Service is prohibited and may result in termination of 21st Century
|
||||||
|
Cable Modem Service (i.e. web, ftp, or game servers, etc...). 21st
|
||||||
|
Century Cable Modem Service is for client type applications ONLY.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Also, technically, each additional dynamic IP address beyond the first
|
||||||
|
one carries a $4.95 monthly charge.
|
||||||
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
|
||||||
|
@ -2060,7 +2203,7 @@ under a modern linux distribution.
|
||||||
Last thing worth to be said is that Supercable doesn't provide support
|
Last thing worth to be said is that Supercable doesn't provide support
|
||||||
for Linux but you can always ask your questions in news.supercable.es in
|
for Linux but you can always ask your questions in news.supercable.es in
|
||||||
the Linux area. Their web page is located at <ulink
|
the Linux area. Their web page is located at <ulink
|
||||||
url="http://www.supercable.es">http://www.supercable.es</ulink>
|
url="http://www.supercable.es/">http://www.supercable.es/</ulink>
|
||||||
(WARNING: get
|
(WARNING: get
|
||||||
ready to download an almost 1MB of useless Macromedia's Flash garbage).
|
ready to download an almost 1MB of useless Macromedia's Flash garbage).
|
||||||
</para>
|
</para>
|
||||||
|
@ -2196,6 +2339,243 @@ worked. The Cable Modem that was used (provided by Hathway) was a SurfBoard 3100
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<!-- S e c t i o n - - - - - - - - - - - - - - - B r e a k e r -->
|
||||||
|
<sect2>
|
||||||
|
<title>Siti Cable, Bangalore, India</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This information is provided by Vinay Avasthi <email>vinay@avasthi.com</email>:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Zee Telefilms has partnered with Siti Cable in Bangalore, India to
|
||||||
|
provide cable modem service. I subscribed to this service and it kind of
|
||||||
|
worked out of the box from linux.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
I am using Redhat 6.1 on a IBM Thinkpad 600 with Xircom Realport
|
||||||
|
Ethernet card. On autodetect links mentions that the card will be used
|
||||||
|
in 10MB/s only.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Only problem that I faced was on shutdown, the system will hang while
|
||||||
|
shutting down pump. To temporarily fix the problem I just put that
|
||||||
|
particular like in rc-scripts to background.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The steps that one needs to perform are as follows.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
|
- Need to have an ethernet card that works with Linux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
- Enable DHCP by using pump. For some reason dhcpd does not seem to
|
||||||
|
work.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Only thing that I would suggest is to be careful regarding support since
|
||||||
|
the tech support do not seem to know much about software.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<!-- S e c t i o n - - - - - - - - - - - - - - - B r e a k e r -->
|
||||||
|
<sect2>
|
||||||
|
<title>Com Hem, Sweden</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This information is provided by Zoltan Arpadffy <email>arpadffy@polarfox.com</email>:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
com hem <ulink url="http://www.comhem.se/">http://www.comhem.se/</ulink>
|
||||||
|
is a Swedish cable TV/Internet provider, a sub-company
|
||||||
|
of Telia <ulink url="http://www.telia.com/">http://www.telia.com/</ulink>
|
||||||
|
the biggest Scandinavian carrier.
|
||||||
|
com hem does not support any other OS but Windows and Mac-OS (as com hem support
|
||||||
|
claims ), but it is not so complicate to set up on Linux as well.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
com hem sells NetGame's cable modem (NeMo). Initial speed is 512 kb/s and it can be
|
||||||
|
set up to 10Mb/s. You can order it with or without Ethernet card.
|
||||||
|
com hem internet service is available in the bigger cities all over Sweden.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>1. Setting up a single node</title>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
set up your network card to work properly
|
||||||
|
(<ulink url="http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html">Ethernet HOWTO</ulink>)
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
configure DHCP to that card (DHCP mini-HOWTO)
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
you need some browser what supports Java-script (as Netscape) and go to the login
|
||||||
|
site <ulink url="http://login1.telia.com/">http://login1.telia.com/</ulink>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
- fill in your user-name and password (provided by com hem) ... and you're there.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
Network what you'd become a member is:
|
||||||
|
IP address: Assigned by com hem
|
||||||
|
Subnet mask: 255.255.255.0
|
||||||
|
Default GW: Assigned by com hem
|
||||||
|
Hostname: Assigned by com hem
|
||||||
|
Domain name: telia.com
|
||||||
|
Primary DNS server (nameserver): 10.0.0.1
|
||||||
|
Secondary DNS server (nameserver): 10.0.0.2
|
||||||
|
</programlisting>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
<sect3><title>
|
||||||
|
2. Connecting your home LAN (if you have more than one machine)
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
We have to turn one computer to gateway (I did it with an old Pentium 66MHz/16M)
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
|
install two network cards in your gateway
|
||||||
|
<ulink url="http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html">NET3-4 HOWTO</ulink>
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
first set up (and connect) to your LAN
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
second network card have to use DHCP
|
||||||
|
(<ulink url="http://www.oswg.org/oswg-nightly/DHCP.html">DHCP mini-HOWTO</ulink>)
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
enable ip forwarding
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
net.ipv4.ip_forward = 1 in /etc/sysctl.conf or by
|
||||||
|
echo "1" > /proc/sys/net/ipv4/ip_forwarding
|
||||||
|
</programlisting>
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
set up IP masquerade
|
||||||
|
(<ulink url="http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html">IP Masquerade mini-HOWTO</ulink>)
|
||||||
|
<programlisting>
|
||||||
|
ipchains -P forward DENY
|
||||||
|
ipchains -A forward -s your_network_here/24 -j MASQ
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
(for me it was ipchains -A forward -s 192.168.10.0/24 -j MASQ)
|
||||||
|
check your routing table with route command... it should be something like below:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
Destination Gateway Genmask Flags Metric Ref Use Iface
|
||||||
|
gate.polarfox.h * 255.255.255.255 UH 0 0 0 eth0
|
||||||
|
telia-net * 255.255.255.0 U 0 0 0 eth1
|
||||||
|
polarfox-net * 255.255.255.0 U 0 0 0 eth0
|
||||||
|
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
|
||||||
|
default h2n5fdt22o429.t 0.0.0.0 UG 0 0 0 eth1
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Useful literature for security issues is
|
||||||
|
<ulink url="http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html">Linux IPCHAINS HOWTO</ulink>
|
||||||
|
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
configure default gateway for all other hosts in your LAN.
|
||||||
|
On unix nodes it should look something like:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
Destination Gateway Genmask Flags Metric Ref Use Iface
|
||||||
|
sea.polarfox.ho * 255.255.255.255 UH 0 0 0 eth0
|
||||||
|
polarfox-net * 255.255.255.0 U 0 0 0 eth0
|
||||||
|
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
|
||||||
|
default gate.polarfox.h 0.0.0.0 UG 0 0 0 eth0
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Default gateway setup for other OSs you can find a very nice description in IP
|
||||||
|
Masquerade mini-HOWTO
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
configure name server on your gateway DNS HOWTO or just set up your hosts to use
|
||||||
|
Telia's name server (10.0.0.1)
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
log in from any host <ulink url="http://login1.telia.com/">http://login1.telia.com/</ulink>
|
||||||
|
and you're on the road with all your LAN.
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
|
<sect3>
|
||||||
|
<title>
|
||||||
|
Problems:
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If you don't use browser with Java-script support, you can not log in.
|
||||||
|
Solution: there is no elegant solution. Without it you can not log in and open the
|
||||||
|
connection.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
After some network inactivity period (10-15 minutes) your connection will be
|
||||||
|
terminated and you have to log in again... meanwhile your gateway and all your inner
|
||||||
|
services will be unreachable from outside as well (if you're running some web server
|
||||||
|
at home etc).
|
||||||
|
Solution: start one ping process or even more elegant solution is to submit one cron
|
||||||
|
job for every 5-10 minutes on the gateway, to "do something" though the network.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
I did it with /etc/cron.d/keep-alive file when contains:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
# fake connection in order to keep line alive
|
||||||
|
# every 5 minutes send some packages
|
||||||
|
MAILTO=""
|
||||||
|
*/5 * * * * ping -f -c 5 www.polarfox.com
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</sect3>
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<article>
|
<article>
|
||||||
<title>BASH Programming - Introduction HOW-TO</title>
|
<title>BASH Programming - Introduction HOW-TO</title>
|
||||||
<author>by Mike G <tt/mikkey@dynamo.com.ar/</author>
|
<author>by Mike G <tt/mikkey@dynamo.com.ar/</author>
|
||||||
<date>v0.07, 22 June 2000</date>
|
<date>27 June 2000</date>
|
||||||
<abstract>
|
<abstract>
|
||||||
This article intends to help you to start programming
|
This article intends to help you to start programming
|
||||||
basic-intermediate shell scripts. It does not intend to be an
|
basic-intermediate shell scripts. It does not intend to be an
|
||||||
|
@ -90,6 +90,9 @@ Very simple Scripts
|
||||||
to use to run the file.
|
to use to run the file.
|
||||||
<P> The second line is the only action performed by this script,
|
<P> The second line is the only action performed by this script,
|
||||||
which prints 'Hello World' on the terminal.
|
which prints 'Hello World' on the terminal.
|
||||||
|
<P> If you get something like <it>./hello.sh: Command not found.</it>
|
||||||
|
Probably the first line '#!/bin/bash' is wrong, issue whereis bash or see
|
||||||
|
'finding bash' to see how sould you write this line.
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1>
|
<sect1>
|
||||||
A very simple backup script
|
A very simple backup script
|
||||||
|
@ -402,7 +405,7 @@ Conditionals
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
T1="foo"
|
T1="foo"
|
||||||
T2="bar"
|
T2="bar"
|
||||||
if [ $T1 = $T2 ]; then
|
if [ "$T1" = "$T2" ]; then
|
||||||
echo expression evaluated as true
|
echo expression evaluated as true
|
||||||
else
|
else
|
||||||
echo expression evaluated as false
|
echo expression evaluated as false
|
||||||
|
@ -492,7 +495,7 @@ Loops for, while and until
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
<P>
|
<P>
|
||||||
<P> This script 'emulates' the well known
|
<P> This script 'emulates' the well known
|
||||||
(C, Pascal, perl, python, etc) 'for' structure
|
(C, Pascal, perl, etc) 'for' structure
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- until -->
|
<!-- until -->
|
||||||
<sect1>
|
<sect1>
|
||||||
|
@ -573,10 +576,10 @@ User interfaces
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
OPTIONS="Hello Quit"
|
OPTIONS="Hello Quit"
|
||||||
select opt in $OPTIONS; do
|
select opt in $OPTIONS; do
|
||||||
if [ $opt = "Quit" ]; then
|
if [ "$opt" = "Quit" ]; then
|
||||||
echo done
|
echo done
|
||||||
exit
|
exit
|
||||||
elif [ $opt = "Hello" ]; then
|
elif [ "$opt" = "Hello" ]; then
|
||||||
echo Hello World
|
echo Hello World
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -596,7 +599,7 @@ User interfaces
|
||||||
<P>
|
<P>
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -z $1 ]; then
|
if [ -z "$1" ]; then
|
||||||
echo usage: $0 directory
|
echo usage: $0 directory
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
@ -620,7 +623,8 @@ Misc
|
||||||
<!-- Reading user input -->
|
<!-- Reading user input -->
|
||||||
<sect1>
|
<sect1>
|
||||||
Reading user input with read
|
Reading user input with read
|
||||||
<P> In many ocations you may want to prompt the user for some input, and there are several ways
|
<P> In many ocations you may want to prompt the user for some input, and
|
||||||
|
there are several ways
|
||||||
to achive this. This is one of those ways:
|
to achive this. This is one of those ways:
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -628,7 +632,8 @@ Misc
|
||||||
read NAME
|
read NAME
|
||||||
echo "Hi $NAME!"
|
echo "Hi $NAME!"
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
<P> As a variant, you can get multiple values with read, this example may clarify this.
|
<P> As a variant, you can get multiple values with read, this example may
|
||||||
|
clarify this.
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo Please, enter your firstname and lastname
|
echo Please, enter your firstname and lastname
|
||||||
|
@ -756,6 +761,11 @@ Tables
|
||||||
echo "S1('$S1') is equal to S1('$S1')"
|
echo "S1('$S1') is equal to S1('$S1')"
|
||||||
fi
|
fi
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
<p> I quote here a note from a mail, sent buy Andreas Beck, refering to use
|
||||||
|
<it/if [ $1 = $2 ]/.
|
||||||
|
<p> This is not quite a good idea, as if either $S1 or $S2 is empty, you will
|
||||||
|
get a parse error. x$1=x$2 or "$1"="$2" is better.
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Arithmetic operators -->
|
<!-- Arithmetic operators -->
|
||||||
|
@ -765,7 +775,7 @@ Tables
|
||||||
<P> -
|
<P> -
|
||||||
<P> *
|
<P> *
|
||||||
<P> /
|
<P> /
|
||||||
<P> % (reminder)
|
<P> % (remainder)
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Arithmetic relational operators -->
|
<!-- Arithmetic relational operators -->
|
||||||
|
@ -785,25 +795,154 @@ Tables
|
||||||
<!-- Useful commands -->
|
<!-- Useful commands -->
|
||||||
<sect1>
|
<sect1>
|
||||||
Useful commands
|
Useful commands
|
||||||
<P>
|
<P> This section was re-written by Kees (see thank to...)
|
||||||
<P> sed (stream editor - very useful)
|
<P> Some of these command's almost contain complete programming languages.
|
||||||
<P> gawk
|
From those commands only the basics will be explained. For a more detailed
|
||||||
<P> grep (show line matching this or not matching that)
|
description, have a closer look at the man pages of each command.
|
||||||
<P> wc (count words, lines)
|
|
||||||
<P> sort
|
|
||||||
<P> bc (more than a calculator)
|
|
||||||
<P> cut (edit columns)
|
|
||||||
<P> tput (get information from the current terminal)
|
|
||||||
|
|
||||||
<P> It it higly recommended to be familiarized with
|
<bf/sed/ (stream editor)
|
||||||
this programs (at least). There are tons of little
|
|
||||||
programs that will let you do real magic in a
|
|
||||||
command line.
|
|
||||||
|
|
||||||
|
<P> Sed is a non-interactive editor. Instead of altering a file by moving the
|
||||||
|
cursor on the screen, you use a script of editing instructions to sed, plus the
|
||||||
|
name of the file to edit. You can also describe sed as a filter. Let's have
|
||||||
|
a look at some examples:
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$sed 's/to_be_replaced/replaced/g' /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> Sed replaces the string 'to_be_replaced' with the string 'replaced' and
|
||||||
|
reads from the /tmp/dummy file. The result will be sent to stdout (normally
|
||||||
|
the console) but you can also add '> capture' to the end of the line above so
|
||||||
|
that sed sends the output to the file 'capture'.
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$sed 12, 18d /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> Sed shows all lines except lines 12 to 18. The original file is not altered by this command.
|
||||||
|
|
||||||
|
<bf/awk/ (manipulation of datafiles, text retrieval and processing)
|
||||||
|
|
||||||
|
<P> Many implementations of the AWK programming language exist (most known interpreters are GNU's
|
||||||
|
gawk and 'new awk' mawk.) The principle is simple: AWK scans for a pattern, and for every
|
||||||
|
matching pattern a action will be performed.
|
||||||
|
<P> Again, I've created a dummy file containing the following lines:
|
||||||
|
<P> <it/"test123/
|
||||||
|
<P> <it/test/
|
||||||
|
<P> <it/tteesstt"/
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$awk '/test/ {print}' /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
<P> test123
|
||||||
|
|
||||||
|
<P> test
|
||||||
|
|
||||||
|
<P> The pattern AWK looks for is 'test' and the action it performs when it found a line in the file
|
||||||
|
/tmp/dummy with the string 'test' is 'print'.
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$awk '/test/ {i=i+1} END {print i}' /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> 3
|
||||||
|
|
||||||
|
<P> When you're searching for many patterns, you should replace the text between the quotes with '-f
|
||||||
|
file.awk' so you can put all patterns and actions in 'file.awk'.
|
||||||
|
|
||||||
|
<bf/grep/ (print lines matching a search pattern)
|
||||||
|
|
||||||
|
<P> We've already seen quite a few grep commands in the previous chapters, that display the lines
|
||||||
|
matching a pattern. But grep can do more.
|
||||||
|
<tscreen><verb>
|
||||||
|
$grep "look for this" /var/log/messages -c
|
||||||
|
</verb></tscreen>
|
||||||
|
<P> 12
|
||||||
|
<P> The string "look for this" has been found 12 times in the file /var/log/messages.
|
||||||
|
|
||||||
|
<P> [ok, this example was a fake, the /var/log/messages was tweaked :-)]
|
||||||
|
|
||||||
|
<bf/wc/ (counts lines, words and bytes)
|
||||||
|
|
||||||
|
<P> In the following example, we see that the output is not what we expected. The dummy file, as used
|
||||||
|
in this example, contains the following text:
|
||||||
|
<it/"bash introduction/
|
||||||
|
<it/ howto test file"/
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$wc --words --lines --bytes /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> 2 5 34 /tmp/dummy
|
||||||
|
|
||||||
|
<P> Wc doesn't care about the parameter order. Wc always prints them in a standard order, which is,
|
||||||
|
as you can see: <lines><words><bytes><filename>.
|
||||||
|
|
||||||
|
<bf/sort/ (sort lines of text files)
|
||||||
|
|
||||||
|
<P> This time the dummy file contains the following text:
|
||||||
|
<P> <it/"b/
|
||||||
|
<P> <it/c/
|
||||||
|
<P> <it/a"/
|
||||||
|
<tscreen><verb>
|
||||||
|
$sort /tmp/dummy
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> This is what the output looks like:
|
||||||
|
|
||||||
|
<P> <it/a/
|
||||||
|
<P> <it/b/
|
||||||
|
<P> <it/c/
|
||||||
|
|
||||||
|
<P> Commands shouldn't be that easy :-)
|
||||||
|
<bf/bc/ (a calculator programming language)
|
||||||
|
|
||||||
|
<P> Bc is accepting calculations from command line (input from file. not from redirector or pipe),
|
||||||
|
but also from a user interface. The following demonstration shows some of the commands. Note that
|
||||||
|
<P> I start bc using the -q parameter to avoid a welcome message.
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
$bc -q
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<P> <it/1 == 5/
|
||||||
|
<P> <it/0/
|
||||||
|
<P> <it/0.05 == 0.05/
|
||||||
|
<P> <it/1/
|
||||||
|
<P> <it/5 != 5/
|
||||||
|
<P> <it/0/
|
||||||
|
<P> <it/2 ^ 8/
|
||||||
|
<P> <it/256/
|
||||||
|
<P> <it/sqrt(9)/
|
||||||
|
<P> <it/3/
|
||||||
|
<P> <it/while (i != 9) {/
|
||||||
|
<P> <it/i = i + 1;/
|
||||||
|
<P> <it/print i/
|
||||||
|
<P> <it/}/
|
||||||
|
<P> <it/123456789/
|
||||||
|
<P> <it/quit/
|
||||||
|
|
||||||
|
<bf/tput/ (initialize a terminal or query terminfo database)
|
||||||
|
|
||||||
|
<P> A little demonstration of tput's capabilities:
|
||||||
|
<tscreen><verb>
|
||||||
|
$tput cup 10 4
|
||||||
|
</verb></tscreen>
|
||||||
|
<P> The prompt appears at (y10,x4).
|
||||||
|
<tscreen><verb>
|
||||||
|
$tput reset
|
||||||
|
</verb></tscreen>
|
||||||
|
<P> Clears screen and prompt appears at (y1,x1). Note that (y0,x0) is the upper left corner.
|
||||||
|
<tscreen><verb>
|
||||||
|
$tput cols
|
||||||
|
</verb></tscreen>
|
||||||
|
<it/80/
|
||||||
|
<P> Shows the number of characters possible in x direction.
|
||||||
|
<P> It it higly recommended to be familiarized with these programs (at least). There are tons of
|
||||||
|
little programs that will let you do real magic on the command line.
|
||||||
|
<P> [some samples are taken from man pages or FAQs]
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</sect>
|
</sect>
|
||||||
|
|
||||||
|
|
||||||
|
@ -980,16 +1119,20 @@ About the document
|
||||||
<item> Jon Abbott for sending comments about evaluating arithmetic expressions.
|
<item> Jon Abbott for sending comments about evaluating arithmetic expressions.
|
||||||
<item> Laurent Martelli for translating this document to French (soon here the URL)
|
<item> Laurent Martelli for translating this document to French (soon here the URL)
|
||||||
<item> Felix Hudson for writing the <it/renna/ script
|
<item> Felix Hudson for writing the <it/renna/ script
|
||||||
|
<item> Kees van den Broek
|
||||||
<item> Kees van den Broek (for sending many corrections)
|
(for sending many corrections, re-writting usefull comands section)
|
||||||
<item> Mike (pink) made some suggestions about locating bash and testing files
|
<item> Mike (pink) made some suggestions about locating bash and testing files
|
||||||
<item> fiesh make a nice suggestion for the loops section.
|
<item> Fiesh make a nice suggestion for the loops section.
|
||||||
|
<item> Lion suggested to mention a common error (./hello.sh: Command not found.)
|
||||||
|
<item> Andreas Beck made several corrections and coments.
|
||||||
</itemize>
|
</itemize>
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1>
|
<sect1>
|
||||||
History
|
History
|
||||||
|
<p> Added the section usefull commands re-writen by Kess.
|
||||||
|
<p> More corrections and suggestions incorporated.
|
||||||
<p> Samples added on string comparison.
|
<p> Samples added on string comparison.
|
||||||
<p> v0.8 More little additions.
|
<p> v0.8 droped the versioning, I guess the date is enought.
|
||||||
<p> v0.7 More corrections and some old TO-DO sections written.
|
<p> v0.7 More corrections and some old TO-DO sections written.
|
||||||
<p> v0.6 Minor corrections.
|
<p> v0.6 Minor corrections.
|
||||||
<p> v0.5 Added the redirection section.
|
<p> v0.5 Added the redirection section.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,7 +40,7 @@ C-C++ Beautifier HOW-TO
|
||||||
<author>Al Dev (Alavoor Vasudevan)
|
<author>Al Dev (Alavoor Vasudevan)
|
||||||
<htmlurl url="mailto:alavoor@yahoo.com"
|
<htmlurl url="mailto:alavoor@yahoo.com"
|
||||||
name="alavoor@yahoo.com">
|
name="alavoor@yahoo.com">
|
||||||
<date>v3.0, 21 April 2000
|
<date>v4.0, 03 July 2000
|
||||||
<abstract>
|
<abstract>
|
||||||
This document will help you to format (beautify) the C/C++ programs so
|
This document will help you to format (beautify) the C/C++ programs so
|
||||||
that it is more readable and confirms to your site C/C++ coding standards.
|
that it is more readable and confirms to your site C/C++ coding standards.
|
||||||
|
@ -79,12 +79,24 @@ On Linux/Unixes there is a command called <bf>"indent"</bf> and <bf>"cb"</bf>
|
||||||
<bf>cb</bf> work for only "C" programs. For "C++" programs use
|
<bf>cb</bf> work for only "C" programs. For "C++" programs use
|
||||||
<bf>"bcpp"</bf>. Download the beautifier program from one of the following
|
<bf>"bcpp"</bf>. Download the beautifier program from one of the following
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>C++ : BCPP site is at <url url="http://www.clark.net/pub/dickey/bcpp/bcpp.html">
|
<item>C++ : BCPP site is at
|
||||||
<item>C++ : <url url="http://www.consultix-inc.com/www.consultix-inc.com/c++b.html">
|
<url url="http://dickey.his.com/bcpp/bcpp.html">
|
||||||
|
or at
|
||||||
|
<url url="http://www.clark.net/pub/dickey">
|
||||||
|
<item>C++ : BCPP ftp site is at
|
||||||
|
<url url="ftp://dickey.his.com/bcpp/bcpp.tar.gz">
|
||||||
|
<item>C++ : <url url="http://www.consultix-inc.com/c++b.html">
|
||||||
<item>C : <url url="http://www.chips.navy.mil/oasys/c/">
|
<item>C : <url url="http://www.chips.navy.mil/oasys/c/">
|
||||||
</itemize>
|
</itemize>
|
||||||
I used BCPP to format the C++ programs and it worked fine for me. You
|
I used BCPP to format the C++ programs and it worked fine for me. You
|
||||||
may want to check other tools and use the one which you may like the most.
|
may want to check other tools and use the one which you may like the most.
|
||||||
|
|
||||||
|
BCPP was written by Steven De Toni at
|
||||||
|
<htmlurl url="mailto:
|
||||||
|
steve@alpha.ocbbs.gen.nz
|
||||||
|
" name="
|
||||||
|
steve@alpha.ocbbs.gen.nz
|
||||||
|
">
|
||||||
<!--
|
<!--
|
||||||
*******************************************
|
*******************************************
|
||||||
************ End of Section ***************
|
************ End of Section ***************
|
||||||
|
@ -319,7 +331,7 @@ Visit following locators which are related to C, C++ -
|
||||||
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/C++Programming-HOWTO.html" name="C++ Programming HOWTO">
|
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/C++Programming-HOWTO.html" name="C++ Programming HOWTO">
|
||||||
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/CVS-HOWTO.html" name="CVS HOWTO for C++ programs">
|
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/CVS-HOWTO.html" name="CVS HOWTO for C++ programs">
|
||||||
<item> Linux goodies main site <url url="http://www.aldev.8m.com">
|
<item> Linux goodies main site <url url="http://www.aldev.8m.com">
|
||||||
<item> Linux goodies mirror site <url url="http://www.aldev.webjump.com">
|
<item> Linux goodies mirror site <url url="http://aldev.webjump.com">
|
||||||
</itemize>
|
</itemize>
|
||||||
<!--
|
<!--
|
||||||
*******************************************
|
*******************************************
|
||||||
|
@ -340,32 +352,49 @@ LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-text, Unix man pages and SGML.
|
||||||
<item>
|
<item>
|
||||||
You can get this HOWTO document as a single file tar ball in HTML, DVI,
|
You can get this HOWTO document as a single file tar ball in HTML, DVI,
|
||||||
Postscript or SGML formats from -
|
Postscript or SGML formats from -
|
||||||
<url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/">
|
<url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/">
|
||||||
or
|
|
||||||
<url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/">
|
|
||||||
|
|
||||||
<item>Plain text format is in: <url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO">
|
<item>Plain text format is in: <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO">
|
||||||
or
|
|
||||||
<url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO">
|
|
||||||
|
|
||||||
<item>Translations to other languages like French, German, Spanish,
|
<item>Translations to other languages like French, German, Spanish,
|
||||||
Chinese, Japanese are in
|
Chinese, Japanese are in
|
||||||
<url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO">
|
<url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO">
|
||||||
or <url url="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO">
|
|
||||||
Any help from you to translate to other languages is welcome.
|
Any help from you to translate to other languages is welcome.
|
||||||
</itemize>
|
</itemize>
|
||||||
The document is written using a tool called "SGML tool" which can be got from -
|
The document is written using a tool called "SGML tool" which can be got from -
|
||||||
<url url="http://www.xs4all.nl/~cg/sgmltools/">
|
<url url="http://www.xs4all.nl/~cg/sgmltools/">
|
||||||
Compiling the source you will get the following commands like
|
Compiling the source you will get the following commands like
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>sgml2html C-C++Beautifier-howto.sgml (to generate html file)
|
<item>sgml2html C-C++Beautifier-HOWTO.sgml (to generate html file)
|
||||||
<item>sgml2rtf C-C++Beautifier-howto.sgml (to generate RTF file)
|
<item>sgml2rtf C-C++Beautifier-HOWTO.sgml (to generate RTF file)
|
||||||
<item>sgml2latex C-C++Beautifier-howto.sgml (to generate latex file)
|
<item>sgml2latex C-C++Beautifier-HOWTO.sgml (to generate latex file)
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
This document is located at -
|
LaTeX documents may be converted into PDF files simply by
|
||||||
|
producing a Postscript output using <bf>sgml2latex</bf> ( and dvips) and running the
|
||||||
|
output through the Acrobat <bf>distill</bf> (<url url="http://www.adobe.com">) command as follows:
|
||||||
|
<code>
|
||||||
|
bash$ man sgml2latex
|
||||||
|
bash$ sgml2latex filename.sgml
|
||||||
|
bash$ man dvips
|
||||||
|
bash$ dvips -o filename.ps filename.dvi
|
||||||
|
bash$ distill filename.ps
|
||||||
|
bash$ man ghostscript
|
||||||
|
bash$ man ps2pdf
|
||||||
|
bash$ ps2pdf input.ps output.pdf
|
||||||
|
bash$ acroread output.pdf &
|
||||||
|
</code>
|
||||||
|
Or you can use Ghostscript command <bf>ps2pdf</bf>.
|
||||||
|
ps2pdf is a work-alike for nearly all the functionality of
|
||||||
|
Adobe's Acrobat Distiller product: it
|
||||||
|
converts PostScript files to Portable Document Format (PDF) files.
|
||||||
|
<bf>ps2pdf</bf> is implemented as a very small command script (batch file) that invokes Ghostscript, selecting a special "output device"
|
||||||
|
called <bf>pdfwrite</bf>. In order to use ps2pdf, the pdfwrite device must be included in the makefile when Ghostscript was compiled;
|
||||||
|
see the documentation on building Ghostscript for details.
|
||||||
|
|
||||||
|
This howto document is located at -
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/C-C++Beautifier-HOWTO.html">
|
<item> <url url="http://sunsite.unc.edu/LDP/HOWTO/C-C++Beautifier-HOWTO.html">
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
Also you can find this document at the following mirrors sites -
|
Also you can find this document at the following mirrors sites -
|
||||||
|
@ -376,7 +405,7 @@ Also you can find this document at the following mirrors sites -
|
||||||
<item> <url url="http://www.redhat.com/linux-info/ldp/HOWTO/C-C++Beautifier-HOWTO.html">
|
<item> <url url="http://www.redhat.com/linux-info/ldp/HOWTO/C-C++Beautifier-HOWTO.html">
|
||||||
|
|
||||||
<item> Other mirror sites near you (network-address-wise) can be found at
|
<item> Other mirror sites near you (network-address-wise) can be found at
|
||||||
<url url="http://metalab.unc.edu/LDP/hmirrors.html">
|
<url url="http://sunsite.unc.edu/LDP/hmirrors.html">
|
||||||
select a site and go to directory /LDP/HOWTO/C-C++Beautifier-HOWTO.html
|
select a site and go to directory /LDP/HOWTO/C-C++Beautifier-HOWTO.html
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
|
@ -384,39 +413,40 @@ select a site and go to directory /LDP/HOWTO/C-C++Beautifier-HOWTO.html
|
||||||
In order to view the document in dvi format, use the xdvi program. The xdvi
|
In order to view the document in dvi format, use the xdvi program. The xdvi
|
||||||
program is located in tetex-xdvi*.rpm package in Redhat Linux which can be
|
program is located in tetex-xdvi*.rpm package in Redhat Linux which can be
|
||||||
located through ControlPanel | Applications | Publishing | TeX menu buttons.
|
located through ControlPanel | Applications | Publishing | TeX menu buttons.
|
||||||
<tscreen><verb>
|
|
||||||
To read dvi document give the command -
|
To read dvi document give the command -
|
||||||
|
<tscreen><verb>
|
||||||
xdvi -geometry 80x90 howto.dvi
|
xdvi -geometry 80x90 howto.dvi
|
||||||
And resize the window with mouse. See man page on xdvi.
|
man xdvi
|
||||||
|
</verb></tscreen>
|
||||||
|
And resize the window with mouse.
|
||||||
To navigate use Arrow keys, Page Up, Page Down keys, also
|
To navigate use Arrow keys, Page Up, Page Down keys, also
|
||||||
you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
|
you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
|
||||||
keys to move up, down, center, next page, previous page etc.
|
keys to move up, down, center, next page, previous page etc.
|
||||||
To turn off expert menu press 'x'.
|
To turn off expert menu press 'x'.
|
||||||
</verb></tscreen>
|
|
||||||
You can read postscript file using the program 'gv' (ghostview) or
|
You can read postscript file using the program 'gv' (ghostview) or
|
||||||
'ghostscript'.
|
'ghostscript'.
|
||||||
The ghostscript program is in ghostscript*.rpm package and gv
|
The ghostscript program is in ghostscript*.rpm package and gv
|
||||||
program is in gv*.rpm package in Redhat Linux
|
program is in gv*.rpm package in Redhat Linux
|
||||||
which can be located through ControlPanel | Applications | Graphics menu
|
which can be located through ControlPanel | Applications | Graphics menu
|
||||||
buttons. The gv program is much more user friendly than ghostscript.
|
buttons. The gv program is much more user friendly than ghostscript.
|
||||||
Ghostscript and gv are also available on other platforms like OS/2,
|
Also ghostscript and gv are available on other platforms like OS/2,
|
||||||
Windows 95 and NT.
|
Windows 95 and NT, you view this document even on those platforms.
|
||||||
<tscreen><verb>
|
|
||||||
To read postscript document give the command -
|
|
||||||
gv howto.ps
|
|
||||||
|
|
||||||
To use ghostscript give -
|
<itemize>
|
||||||
|
<item>Get ghostscript for Windows 95, OS/2, and for all OSes from <url url="http://www.cs.wisc.edu/~ghost">
|
||||||
|
</itemize>
|
||||||
|
|
||||||
|
To read postscript document give the command -
|
||||||
|
<tscreen><verb>
|
||||||
|
gv howto.ps
|
||||||
ghostscript howto.ps
|
ghostscript howto.ps
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
<itemize>
|
|
||||||
<item>Get ghostscript for Windows95, OS/2 and all OSes from <url url="http://www.cs.wisc.edu/~ghost">
|
|
||||||
</itemize>
|
|
||||||
|
|
||||||
You can read HTML format document using Netscape Navigator, Microsoft Internet
|
You can read HTML format document using Netscape Navigator, Microsoft Internet
|
||||||
explorer, Redhat Baron Web browser or any other web browsers.
|
explorer, Redhat Baron Web browser or any of the 10 other web browsers.
|
||||||
|
|
||||||
You can read the latex, LyX output using LyX a "X-Windows" front end to latex.
|
You can read the latex, LyX output using LyX a X-Windows front end to latex.
|
||||||
<!--
|
<!--
|
||||||
*******************************************
|
*******************************************
|
||||||
************ End of Section ***************
|
************ End of Section ***************
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<title>Linux IPCHAINS-HOWTO
|
<title>Linux IPCHAINS-HOWTO
|
||||||
<author>Paul Russell, <tt>ipchains@rustcorp.com</tt>
|
<author>Rusty Russell
|
||||||
<date>v1.0.7, 12 March 1999
|
<date>v1.0.8, Tue Jul 4 14:20:53 EST 2000
|
||||||
<abstract>
|
<abstract>
|
||||||
This document aims to describe how to obtain, install and configure
|
This document aims to describe how to obtain, install and configure
|
||||||
the enhanced IP firewalling chains software for Linux, and
|
the enhanced IP firewalling chains software for Linux, and
|
||||||
|
@ -76,15 +76,19 @@ some functionality that ipchains offers.
|
||||||
<sect1>Where?<label id="intro-where">
|
<sect1>Where?<label id="intro-where">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The official page is
|
The official page is in three places:
|
||||||
<url url="http://www.rustcorp.com/linux/ipchains"
|
<url url="http://netfilter.filewatcher.org/ipchains"
|
||||||
name="The Linux IP Firewall Chains Page">
|
name="Thanks to Penguin Computing">
|
||||||
|
<url url="http://www.samba.org/netfilter/ipchains"
|
||||||
|
name="Thanks to the SAMBA Team">
|
||||||
|
<url url="http://netfilter.kernelnotes.org/ipchains"
|
||||||
|
name="Thanks to Jim Pick">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There is a mailing list for bug reports, discussion, development and
|
There is a mailing list for bug reports, discussion, development and
|
||||||
usage. Join the mailing list by sending a message containing the word
|
usage. Join the mailing list by sending a message containing the word
|
||||||
``subscribe'' to ipchains-request at rustcorp.com. To mail to the
|
``subscribe ipchains-list'' to subscribe at east.balius.com. To mail
|
||||||
list use `ipchains' instead of `ipchains-request'.
|
to everyone on the list use ipchains-list at east.balius.com.
|
||||||
|
|
||||||
<sect>Packet Filtering Basics
|
<sect>Packet Filtering Basics
|
||||||
|
|
||||||
|
@ -216,8 +220,8 @@ for how to make sure they are restored the next time Linux is booted.
|
||||||
old IP Firewall code. There is a set of useful scripts available from
|
old IP Firewall code. There is a set of useful scripts available from
|
||||||
the ipchains ftp site:
|
the ipchains ftp site:
|
||||||
|
|
||||||
<url url="ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz"
|
<url url="http://netfilter.filewatcher.org/ipchains/ipchains-scripts-1.1.2.tar.gz"
|
||||||
name="ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz">
|
name="http://netfilter.filewatcher.org/ipchains/ipchains-scripts-1.1.2.tar.gz">
|
||||||
|
|
||||||
|
|
||||||
This contains a shell script called <tt>ipfwadm-wrapper</tt> which
|
This contains a shell script called <tt>ipfwadm-wrapper</tt> which
|
||||||
|
@ -262,8 +266,8 @@ case "$1" in
|
||||||
stop)
|
stop)
|
||||||
echo -n "Turning off packet filtering:"
|
echo -n "Turning off packet filtering:"
|
||||||
echo 0 > /proc/sys/net/ipv4/ip_forward
|
echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||||
/sbin/ipchains -X
|
|
||||||
/sbin/ipchains -F
|
/sbin/ipchains -F
|
||||||
|
/sbin/ipchains -X
|
||||||
/sbin/ipchains -P input ACCEPT
|
/sbin/ipchains -P input ACCEPT
|
||||||
/sbin/ipchains -P output ACCEPT
|
/sbin/ipchains -P output ACCEPT
|
||||||
/sbin/ipchains -P forward ACCEPT
|
/sbin/ipchains -P forward ACCEPT
|
||||||
|
@ -322,10 +326,10 @@ Use ifconfig to find out, and adjust to taste.
|
||||||
<p>
|
<p>
|
||||||
You can buy off-the-shelf firewalls. An excellent one is WatchGuard's
|
You can buy off-the-shelf firewalls. An excellent one is WatchGuard's
|
||||||
FireBox. It's excellent because I like it, it's secure, it's
|
FireBox. It's excellent because I like it, it's secure, it's
|
||||||
Linux-based, and because they are funding the maintenance of ipchains
|
Linux-based, and because they funded the maintenance of ipchains as
|
||||||
as well as the new firewalling code (aimed for 2.3). In short,
|
well as the new firewalling code (for 2.4). In short, WatchGuard were
|
||||||
WatchGuard are paying for me to eat while I work for you. So please
|
paying for me to eat while I work for you. So please consider their
|
||||||
consider their stuff.
|
stuff.
|
||||||
|
|
||||||
<url url="http://www.watchguard.com" name="http://www.watchguard.com">
|
<url url="http://www.watchguard.com" name="http://www.watchguard.com">
|
||||||
|
|
||||||
|
@ -346,8 +350,8 @@ common. Read carefully, because they are each subtly different.
|
||||||
<p>
|
<p>
|
||||||
In this scenario, packets from the private network never traverse the
|
In this scenario, packets from the private network never traverse the
|
||||||
Internet, and vice versa. The IP addresses of the private network
|
Internet, and vice versa. The IP addresses of the private network
|
||||||
should be assigned from the RFC1597 Private Network Allocations
|
should be assigned from the RFC1918 Address Allocation for Private
|
||||||
(ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).
|
Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.* or 192.168.*.*).
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The only way things ever connect to the Internet is by connecting to
|
The only way things ever connect to the Internet is by connecting to
|
||||||
|
@ -411,8 +415,8 @@ is made from 192.168.1.100 (myhost) port 1050, to 192.168.1.1
|
||||||
<p>
|
<p>
|
||||||
In this scenario, packets from the private network never traverse the
|
In this scenario, packets from the private network never traverse the
|
||||||
Internet, and vice versa. The IP addresses of the private network
|
Internet, and vice versa. The IP addresses of the private network
|
||||||
should be assigned from the RFC1597 Private Network Allocations
|
should be assigned from the RFC1918 Address Allocation for Private
|
||||||
(ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).
|
Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.* or 192.168.*.*).
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The only way things ever connect to the Internet is by connecting to
|
The only way things ever connect to the Internet is by connecting to
|
||||||
|
@ -485,8 +489,9 @@ proxy.
|
||||||
<p>
|
<p>
|
||||||
In this scenario, packets from the private network never traverse the
|
In this scenario, packets from the private network never traverse the
|
||||||
Internet without special treatment, and vice versa. The IP addresses
|
Internet without special treatment, and vice versa. The IP addresses
|
||||||
of the private network should be assigned from the RFC1597 Private
|
of the private network should be assigned from the RFC1918 Address
|
||||||
Network Allocations (ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).
|
Allocation for Private Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.*
|
||||||
|
or 192.168.*.*).
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Instead of using a proxy, we use a special kernel facility called
|
Instead of using a proxy, we use a special kernel facility called
|
||||||
|
@ -534,7 +539,7 @@ local port 1050, and asks the web server (port 80) for the web page.
|
||||||
<item> As the packets from myhost (port 1050) to slashdot.org (port
|
<item> As the packets from myhost (port 1050) to slashdot.org (port
|
||||||
80) pass through the firewall, they are rewritten to come from the PPP
|
80) pass through the firewall, they are rewritten to come from the PPP
|
||||||
interface of the firewall, port 65000. The firewall has a valid
|
interface of the firewall, port 65000. The firewall has a valid
|
||||||
Internet address (1.2.3.4) so reply packets from www.linuxhq.com get
|
Internet address (1.2.3.4) so reply packets from slashdot.org get
|
||||||
routed back OK.
|
routed back OK.
|
||||||
|
|
||||||
<item> As packets from slashdot.org (port 80) to
|
<item> As packets from slashdot.org (port 80) to
|
||||||
|
@ -628,16 +633,13 @@ Internet host to the server.
|
||||||
|
|
||||||
<sect1>More Information on Masquerading
|
<sect1>More Information on Masquerading
|
||||||
|
|
||||||
|
<p>
|
||||||
David Ranch has written an excellent new HOWTO on Masquerading, which
|
David Ranch has written an excellent new HOWTO on Masquerading, which
|
||||||
has a large amount of overlap with this HOWTO. You can currently find
|
has a large amount of overlap with this HOWTO. You can currently find
|
||||||
that HOWTO at
|
that HOWTO at
|
||||||
|
|
||||||
<htmlurl url="http://www.ecst.csuchico.edu/~dranch/LINUX/index-LINUX.html#ipmasq" name="http://www.ecst.csuchico.edu/~dranch/LINUX/index-LINUX.html#ipmasq">
|
<htmlurl url="http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html"
|
||||||
|
name="http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html">
|
||||||
<p>
|
|
||||||
Soon I would expect it to be found under the auspices of the Linux
|
|
||||||
Documentation Project, at
|
|
||||||
<url url="http://www.metalab.unc.edu/LDP" name="http://www.metalab.unc.edu/LDP">
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The official Masquerading home page is at
|
The official Masquerading home page is at
|
||||||
|
@ -802,6 +804,15 @@ The final (and perhaps the most useful) function allows you to check
|
||||||
what would happen to a given packet if it were to traverse a given
|
what would happen to a given packet if it were to traverse a given
|
||||||
chain.
|
chain.
|
||||||
|
|
||||||
|
<sect2> What You'll See When Your Computer Starts Up
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Before any ipchains commands have been run (be careful: some
|
||||||
|
distributions run ipchains in their initialization scripts), there
|
||||||
|
will be no rules in any of the built-in chains (`input', `forward' and
|
||||||
|
`output'), and each of the chains will have a policy of ACCEPT. This
|
||||||
|
is as wide-open as you can get.
|
||||||
|
|
||||||
<sect2> Operations on a Single Rule
|
<sect2> Operations on a Single Rule
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -895,7 +906,7 @@ address such as `127.0.0.1'.
|
||||||
<p>
|
<p>
|
||||||
The third and fourth ways allow specification of a group of IP
|
The third and fourth ways allow specification of a group of IP
|
||||||
addresses, such as `199.95.207.0/24' or `199.95.207.0/255.255.255.0'.
|
addresses, such as `199.95.207.0/24' or `199.95.207.0/255.255.255.0'.
|
||||||
These both specify any IP address from 192.95.207.0 to 192.95.207.255
|
These both specify any IP address from 199.95.207.0 to 199.95.207.255
|
||||||
inclusive; the digits after the `/' tell which parts of the IP address
|
inclusive; the digits after the `/' tell which parts of the IP address
|
||||||
are significant. `/32' or `/255.255.255.255' is the default (match
|
are significant. `/32' or `/255.255.255.255' is the default (match
|
||||||
all of the IP address). To specify any IP address at all `/0' can be
|
all of the IP address). To specify any IP address at all `/0' can be
|
||||||
|
@ -916,6 +927,9 @@ preceded by `!' (pronounced `not') to match addresses NOT equal to the
|
||||||
ones given. For example. `-s ! localhost' matches any packet not
|
ones given. For example. `-s ! localhost' matches any packet not
|
||||||
coming from localhost.
|
coming from localhost.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Don't forget the spaces around the `!': they really are needed.
|
||||||
|
|
||||||
<sect3>Specifying Protocol
|
<sect3>Specifying Protocol
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -1800,7 +1814,7 @@ Minimum delay for web traffic & telnet.
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
# ipchains -A ppp-out -p TCP -d proxy.virtual.net.au 8080 -t 0x01 0x10
|
# ipchains -A ppp-out -p TCP -d proxy.virtual.net.au 8080 -t 0x01 0x10
|
||||||
# ipchains -A ppp-out -p TCP -d 0.0.0.0 telnet -t 0x01 0x10
|
# ipchains -A ppp-out -p TCP -d 0.0.0.0/0 telnet -t 0x01 0x10
|
||||||
#
|
#
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
|
@ -1847,6 +1861,14 @@ be going to a port above 1023, and not the X11 ports around 6000).
|
||||||
#
|
#
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
I allow TCP reply packets back in
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
# ipchains -A ppp-in -p TCP ! -y -j ACCEPT
|
||||||
|
#
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Finally, local-to-local packets are OK:
|
Finally, local-to-local packets are OK:
|
||||||
|
|
||||||
|
@ -2106,7 +2128,7 @@ following:
|
||||||
This drops all packets for the duration of the changes.
|
This drops all packets for the duration of the changes.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you changes are restricted to a single chain, you might want to
|
If your changes are restricted to a single chain, you might want to
|
||||||
create a new chain with the new rules, and then replace (`-R') the
|
create a new chain with the new rules, and then replace (`-R') the
|
||||||
rule that pointed to the old chain with one that points to the new
|
rule that pointed to the old chain with one that points to the new
|
||||||
chain: then you can delete the old chain. This replacement will occur
|
chain: then you can delete the old chain. This replacement will occur
|
||||||
|
@ -2243,16 +2265,17 @@ patterns.
|
||||||
|
|
||||||
<p> Michael Hasenstein of SuSE has written a kernel patch which adds
|
<p> Michael Hasenstein of SuSE has written a kernel patch which adds
|
||||||
ftp connection tracking to ipchains. It can currently be found at
|
ftp connection tracking to ipchains. It can currently be found at
|
||||||
<url url="http://www.csn.tu-chemnitz.de/~mha/patch.ftp-data-2.gz"
|
<url url="http://www.suse.de/~mha/patch.ftp-data-2.gz"
|
||||||
name="http://www.csn.tu-chemnitz.de/~mha/patch.ftp-data-2.gz">
|
name="http://www.suse.de/~mha/patch.ftp-data-2.gz">
|
||||||
|
|
||||||
<sect1> Future Enhancements
|
<sect1> Future Enhancements
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Firewalling and NAT are being redesigned for 2.3. Plans and
|
Firewalling and NAT have being redesigned for 2.4. Plans and
|
||||||
discussions are available on the netdev archive, and ipchains-dev
|
discussions are available on the netfilter list (see <url
|
||||||
list. These enhancements should clear up many outstanding usability
|
url="http://lists.samba.org" name="http://lists.samba.org">). These
|
||||||
issues (really, firewalling and masquerading shouldn't be <em>this
|
enhancements should clear up many outstanding usability issues
|
||||||
|
(really, firewalling and masquerading shouldn't be <em>this
|
||||||
hard</em>), and allow growth for far more flexible firewalling.
|
hard</em>), and allow growth for far more flexible firewalling.
|
||||||
|
|
||||||
<sect> Common Problems
|
<sect> Common Problems
|
||||||
|
@ -2265,6 +2288,21 @@ You're probably blocking DNS lookups; it will eventually time out.
|
||||||
Try using the `-n' (numeric) flag to ipchains, which suppresses the
|
Try using the `-n' (numeric) flag to ipchains, which suppresses the
|
||||||
lookup of names.
|
lookup of names.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<sect1> Inverse doesn't work!
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You must put the `!' option by itself, with spaces either side. A
|
||||||
|
classic mistake (warned about in 1.3.10) is:
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
# ipchains -A input -i !eth0 -j DENY
|
||||||
|
#
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
There will never be an interface called `!eth0', but ipchains doesn't
|
||||||
|
know that.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<sect1> Masquerading/Forwarding Doesn't Work!
|
<sect1> Masquerading/Forwarding Doesn't Work!
|
||||||
|
|
||||||
|
@ -2614,9 +2652,12 @@ don't. Since noone in the internal network should be trying to do
|
||||||
evil things, we log any packets that get denied.
|
evil things, we log any packets that get denied.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Note that old versions of Debian called `pop3' `pop-3' in
|
||||||
|
/etc/services, which disagrees with RFC1700.
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
ipchains -A good-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
|
ipchains -A good-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
|
||||||
ipchains -A good-dmz -p tcp -d 192.84.219.128 pop-3 -j ACCEPT
|
ipchains -A good-dmz -p tcp -d 192.84.219.128 pop3 -j ACCEPT
|
||||||
ipchains -A good-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
|
ipchains -A good-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
|
||||||
ipchains -A good-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
|
ipchains -A good-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
|
||||||
ipchains -A good-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
|
ipchains -A good-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
|
||||||
|
@ -2684,12 +2725,13 @@ ipchains -A bad-dmz -j DENY
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> Log violations.
|
<item> Log violations.
|
||||||
<item> Passive FTP handled by masq. module.
|
<item> Passive FTP handled by masq. module.
|
||||||
|
<item> UDP destination ports 33434 and up are used by traceroute.
|
||||||
</itemize>
|
</itemize>
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
ipchains -A good-bad -p tcp --dport www -j MASQ
|
ipchains -A good-bad -p tcp --dport www -j MASQ
|
||||||
ipchains -A good-bad -p tcp --dport ssh -j MASQ
|
ipchains -A good-bad -p tcp --dport ssh -j MASQ
|
||||||
ipchains -A good-bad -p udp --dport 33434:33500 -j MASQ
|
ipchains -A good-bad -p udp --dport 33434:33500 -j MASQ
|
||||||
ipchains -A good-bad -p tcp --dport ftp --j MASQ
|
ipchains -A good-bad -p tcp --dport ftp -j MASQ
|
||||||
ipchains -A good-bad -p icmp --icmp-type ping -j MASQ
|
ipchains -A good-bad -p icmp --icmp-type ping -j MASQ
|
||||||
ipchains -A good-bad -j REJECT -l
|
ipchains -A good-bad -j REJECT -l
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
@ -2721,7 +2763,7 @@ ipchains -A dmz-good -p tcp ! -y -s 192.84.219.129 domain -j ACCEPT
|
||||||
ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
|
ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
|
||||||
ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 rsync -j ACCEPT
|
ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 rsync -j ACCEPT
|
||||||
ipchains -A dmz-good -p icmp -j icmp-acc
|
ipchains -A dmz-good -p icmp -j icmp-acc
|
||||||
ipchains -A dmz-bad -j DENY -l
|
ipchains -A dmz-good -j DENY -l
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
|
@ -2806,13 +2848,14 @@ ipchains -A input -d 192.168.1.250 -j good-if
|
||||||
<item> Access DNS
|
<item> Access DNS
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
<item> External interface also receives replies to masqueraded packets,
|
<item> External interface also receives replies to masqueraded packets
|
||||||
and ICMP errors for them and PING replies.
|
(masquerading uses source ports 61000 to 65095) and ICMP errors for
|
||||||
|
them and PING replies.
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
ipchains -A bad-if -i ! ppp0 -j DENY -l
|
ipchains -A bad-if -i ! ppp0 -j DENY -l
|
||||||
ipchains -A bad-if -p TCP --dport 61000:65096 -j ACCEPT
|
ipchains -A bad-if -p TCP --dport 61000:65095 -j ACCEPT
|
||||||
ipchains -A bad-if -p UDP --dport 61000:65096 -j ACCEPT
|
ipchains -A bad-if -p UDP --dport 61000:65095 -j ACCEPT
|
||||||
ipchains -A bad-if -p ICMP --icmp-type pong -j ACCEPT
|
ipchains -A bad-if -p ICMP --icmp-type pong -j ACCEPT
|
||||||
ipchains -A bad-if -j icmp-acc
|
ipchains -A bad-if -j icmp-acc
|
||||||
ipchains -A bad-if -j DENY
|
ipchains -A bad-if -j DENY
|
||||||
|
@ -3072,7 +3115,7 @@ or directing the standard output of the script to /dev/null.
|
||||||
<p>
|
<p>
|
||||||
If you should find any mistakes in this script, or any changes between
|
If you should find any mistakes in this script, or any changes between
|
||||||
the real ipfwadm and this script, <em>please</em> report a bug to me: send
|
the real ipfwadm and this script, <em>please</em> report a bug to me: send
|
||||||
an EMail to ipchains@rustcorp.com with "BUG-REPORT" in the subject.
|
an EMail to rusty@linuxcare.com with "BUG-REPORT" in the subject.
|
||||||
Please list your old version of <tt>ipfwadm</tt> (<tt>ipfwadm -h</tt>), your
|
Please list your old version of <tt>ipfwadm</tt> (<tt>ipfwadm -h</tt>), your
|
||||||
version of <tt>ipchains</tt> (<tt>ipchains --version</tt>), the version of the
|
version of <tt>ipchains</tt> (<tt>ipchains --version</tt>), the version of the
|
||||||
ipfwadm wrapper script (<tt>ipfwadm-wrapper --version</tt>). Also send the
|
ipfwadm wrapper script (<tt>ipfwadm-wrapper --version</tt>). Also send the
|
||||||
|
@ -3108,7 +3151,29 @@ Franck Sicard, Kevin Littlejohn, Matt Kemner, John D. Hardin, Alexey
|
||||||
Kuznetsov, Leos Bitto, Jim Kunzman, Gerard Gerritsen, Serge Sivkov,
|
Kuznetsov, Leos Bitto, Jim Kunzman, Gerard Gerritsen, Serge Sivkov,
|
||||||
Andrew Burgess, Steve Schmidtke, Richard Offer, Bernhard Weisshuhn,
|
Andrew Burgess, Steve Schmidtke, Richard Offer, Bernhard Weisshuhn,
|
||||||
Larry Auton, Ambrose Li, Pavel Krauz, Steve Chadsey, Francesco
|
Larry Auton, Ambrose Li, Pavel Krauz, Steve Chadsey, Francesco
|
||||||
Potorti` and Alain Knaff.
|
Potorti`, Alain Knaff, Casper Boden-Cummins and Henry Hollenberg.
|
||||||
|
|
||||||
|
<sect1>Translations
|
||||||
|
|
||||||
|
<p>
|
||||||
|
People who do translations should put themselves at the <em>top</em>
|
||||||
|
of the Thanks page, like so: `Special thanks to XXX, for translating
|
||||||
|
everything exactly from my English.'. Then tell me about your
|
||||||
|
translation so I can include it here.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Arnaud Launay, asl@launay.org:
|
||||||
|
<url url="http://www.freenix.fr/unix/linux/HOWTO/IPCHAINS-HOWTO.html"
|
||||||
|
name="http://www.freenix.fr/unix/linux/HOWTO/IPCHAINS-HOWTO.html">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Giovanni Bortolozzo, borto@pluto.linux.it:
|
||||||
|
<url url="http://www.pluto.linux.it/ildp/HOWTO/IPCHAINS-HOWTO.html"
|
||||||
|
name="http://www.pluto.linux.it/ildp/HOWTO/IPCHAINS-HOWTO.html">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Herman Rodríguez, herman@maristas.dhis.org:
|
||||||
|
<url url="http://netfilter.kernelnotes.org/ipchains/spanish/HOWTO.html"
|
||||||
|
name="http://netfilter.kernelnotes.org/ipchains/spanish/HOWTO.html">
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,13 +1,19 @@
|
||||||
<!doctype linuxdoc system>
|
<!doctype linuxdoc system>
|
||||||
<article>
|
<article>
|
||||||
<title>The Linux Modem-HOWTO </title>
|
<title>Modem-HOWTO </title>
|
||||||
<author>David S.Lawyer
|
<author>David S.Lawyer
|
||||||
<tt><url url="mailto:dave@lafn.org"></tt>
|
<tt><url url="mailto:dave@lafn.org"></tt>
|
||||||
|
|
||||||
<date> v0.10, May 2000
|
<date> v0.11, June 2000
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Change log: + => added more info ++ => added new topic
|
Change log: + => added more info ++ => added new topic
|
||||||
v0.10 Modem-Sharing mini-howto, digital modems.
|
:::::v
|
||||||
|
v0.11 Winmodems-and-Linux-HOWTO, removed general info re obsolete modems:
|
||||||
|
dip switches & no stored profiles, "modem busy", "no OK from AT" apt
|
||||||
|
to be a seial port problem. 2 serial drivers active problem.
|
||||||
|
v0.10 May 2000 Modem-Sharing mini-howto, digital modems, Newcom modem,
|
||||||
|
more re "no response to AT" and "can't find modem"
|
||||||
v0.09 +mwave, K->k, fax data, typos
|
v0.09 +mwave, K->k, fax data, typos
|
||||||
v0.08 Vern's url, leased line modems, finding modem, Lucent winmodem,
|
v0.08 Vern's url, leased line modems, finding modem, Lucent winmodem,
|
||||||
multiport modem cards, clarity for 56K sect
|
multiport modem cards, clarity for 56K sect
|
||||||
|
@ -44,8 +50,9 @@ v0.00 Dec. 1998 Combined Serial-HOWTO with my own additions
|
||||||
|
|
||||||
<sect1> DSL, Cable, and ISDN Modems in other HOWTOs
|
<sect1> DSL, Cable, and ISDN Modems in other HOWTOs
|
||||||
<p> This HOWTO covers conventional modems for PC's, mainly modems on
|
<p> This HOWTO covers conventional modems for PC's, mainly modems on
|
||||||
the ISA bus. However each new version sees more info added about
|
the ISA bus. However each new version usually finds more info added
|
||||||
modems for the PCI bus.
|
about modems for the PCI bus.
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> DSL modems: see the mini-howto: ADSL
|
<item> DSL modems: see the mini-howto: ADSL
|
||||||
<item> Cable-Modems-HOWTO (was once a LDP mini-Howto) <url
|
<item> Cable-Modems-HOWTO (was once a LDP mini-Howto) <url
|
||||||
|
@ -106,6 +113,7 @@ cannot be held legally responsible for any errors.
|
||||||
be a trademark). Such trademarks belong to their respective owners.
|
be a trademark). Such trademarks belong to their respective owners.
|
||||||
<!-- copyright.H end -->
|
<!-- copyright.H end -->
|
||||||
|
|
||||||
|
|
||||||
"Hayes" is a trademark of Microcomputer Products Inc. I use
|
"Hayes" is a trademark of Microcomputer Products Inc. I use
|
||||||
"winmodem" to mean any modem which requires MS-Windows and not in the
|
"winmodem" to mean any modem which requires MS-Windows and not in the
|
||||||
trademark sense.
|
trademark sense.
|
||||||
|
@ -139,11 +147,10 @@ available to browse and/or download at LDP mirror sites. For a list
|
||||||
of such sites see: <url url="http://metalab.unc.edu/LDP/mirrors.html">
|
of such sites see: <url url="http://metalab.unc.edu/LDP/mirrors.html">
|
||||||
If you only want to quickly check the date of the latest version go to
|
If you only want to quickly check the date of the latest version go to
|
||||||
<url url="http://metalab.unc.edu/LDP/HOWTO/Modem-HOWTO.html"> and
|
<url url="http://metalab.unc.edu/LDP/HOWTO/Modem-HOWTO.html"> and
|
||||||
compare it to the version you are currently reading: v0.10, May 2000
|
compare it to the version you are currently reading: v0.11, June 2000
|
||||||
|
|
||||||
<sect1> New in this Version
|
<sect1> New in this Version
|
||||||
<p> Modem-Sharing mini-howto, digital modems, Newcom
|
<p>
|
||||||
modem, more re "no response to AT" and "can't find modem".
|
|
||||||
|
|
||||||
<sect1> What is a Modem ? <label id="what_is_modem">
|
<sect1> What is a Modem ? <label id="what_is_modem">
|
||||||
<p> A modem is a device that lets one send digital signals over
|
<p> A modem is a device that lets one send digital signals over
|
||||||
|
@ -378,7 +385,10 @@ Linux drivers for these modems, specs were not made available so this
|
||||||
couldn't be done. Prior to about 2000, no software modem could be
|
couldn't be done. Prior to about 2000, no software modem could be
|
||||||
used with Linux due to no drivers for them under Linux.
|
used with Linux due to no drivers for them under Linux.
|
||||||
|
|
||||||
Then finally in late 1999 two software modems appeared that could work
|
See the new (April 2000) Winmodems-and-Linux-HOWTO for details of how
|
||||||
|
to get some winmodems to work under Linux.
|
||||||
|
|
||||||
|
Finally in late 1999 two software modems appeared that could work
|
||||||
under Linux. Lucent Technologies unofficially released a Linux
|
under Linux. Lucent Technologies unofficially released a Linux
|
||||||
binary-only code to support its PCI software modems but bugs were
|
binary-only code to support its PCI software modems but bugs were
|
||||||
reported in early versions. PC-TEL introduced a new software
|
reported in early versions. PC-TEL introduced a new software
|
||||||
|
@ -611,10 +621,9 @@ an ISP?">. Cyclades promotes their own products here so please do
|
||||||
comparison shopping before buying anything.
|
comparison shopping before buying anything.
|
||||||
|
|
||||||
|
|
||||||
<p> Before reading this
|
<sect> Serial Port and Modem Basics <label id="basics_">
|
||||||
|
<!-- basics.H begin <sect> Serial Port and Modem Basics
|
||||||
<sect> Modem & Serial Port
|
or <sect> Serial Port Basics In SS and MM -->
|
||||||
Basics <label id="basics_"> <!-- basics.H begin <sect> Serial Port & Modem Basics -->
|
|
||||||
<!-- Change log: Nov. '99: 2 serial drivers concurrently NG
|
<!-- Change log: Nov. '99: 2 serial drivers concurrently NG
|
||||||
-->
|
-->
|
||||||
<!-- ifdef MODEM_ -->
|
<!-- ifdef MODEM_ -->
|
||||||
|
@ -1183,8 +1192,10 @@ always very user friendly. This may create a difficult problem for
|
||||||
you. The next section will go into this in much more detail.
|
you. The next section will go into this in much more detail.
|
||||||
|
|
||||||
<sect>Configuring the Serial Port
|
<sect>Configuring the Serial Port
|
||||||
<!-- configure.H begin
|
<!-- configure.H begin (in MM, SS)
|
||||||
<sect>Configuring the Serial Port -->
|
<sect>Configuring the Serial Port
|
||||||
|
Change-log:
|
||||||
|
-->
|
||||||
|
|
||||||
<sect1> PCI Bus Support Underway <label id="PCI_">
|
<sect1> PCI Bus Support Underway <label id="PCI_">
|
||||||
<p> The kernel 2.2 serial driver contains no special support for the
|
<p> The kernel 2.2 serial driver contains no special support for the
|
||||||
|
@ -1412,23 +1423,32 @@ that they only show what the device driver thinks. Some people view
|
||||||
certain "files" in the /proc directory and erroneously think that what
|
certain "files" in the /proc directory and erroneously think that what
|
||||||
they see is set in the hardware but "it ain't necessarily so".
|
they see is set in the hardware but "it ain't necessarily so".
|
||||||
|
|
||||||
/proc/ioports will show the IO addresses that the drivers are using.
|
<tt>/proc/ioports</tt> will show the IO addresses that the drivers are using.
|
||||||
/proc/interrupts shows the IRQs that are used by drivers of
|
<tt>/proc/interrupts</tt> shows the IRQs that are used by drivers of
|
||||||
currently running processes (that have devices open). Note that
|
currently running processes (that have devices open). It shows how
|
||||||
in both cases above you are only seeing what the driver thinks and not
|
many interrupts have actually be issued.
|
||||||
necessarily what is actually set in the hardware. /proc/interrupts also
|
<tt>/proc/tty/driver/serial</tt> shows most of the above, plus the
|
||||||
shows how many interrupts have been issued (often thousands) for each
|
number of bytes that have been received and sent (even if the device
|
||||||
device. You can get a clue from this because if you see a large
|
is not now open).
|
||||||
number of interrupts that have been issued it means that there is a
|
|
||||||
piece of hardware somewhere that is using that interrupt. Sometimes a
|
Note that for the IO addresses and IRQ assignments, you are only seeing
|
||||||
showing of just a few interrupts doesn't mean that that interrupt is
|
what the driver thinks and not necessarily what is actually set in the
|
||||||
actually being physically generated by any serial port. Thus if you
|
hardware. The data on the actual number of interrupts issued and
|
||||||
see almost no interrupts for a port that you're trying to use, that
|
bytes processed is real however. If you see a large number of
|
||||||
interrupt might not be set in the hardware and it implies that the
|
interrupts and/or bytes then it probably means that the device is (or
|
||||||
driver is using the wrong interrupt. To view /proc/interrupts to
|
was in the case of bytes) working. If there are no bytes received
|
||||||
check on a program that you're currently running (such as "minicom")
|
(rx:0) but bytes were transmitted (tx:3749 for example), then only one
|
||||||
you need to keep the program running while you view it. To do this,
|
direction of flow is working (or being utilized).
|
||||||
try to jump to a shell without exiting the program.
|
|
||||||
|
Sometimes a showing of just a few interrupts doesn't mean that the
|
||||||
|
interrupt is actually being physically generated by any serial port.
|
||||||
|
Thus if you see almost no interrupts for a port that you're trying to
|
||||||
|
use, that interrupt might not be set in the hardware and it implies
|
||||||
|
that the driver is using the wrong interrupt. To view
|
||||||
|
/proc/interrupts to check on a program that you're currently running
|
||||||
|
(such as "minicom") you need to keep the program running while you
|
||||||
|
view it. To do this, try to jump to a shell without exiting the
|
||||||
|
program.
|
||||||
|
|
||||||
<sect2> What is set in my serial port hardware ? <label
|
<sect2> What is set in my serial port hardware ? <label
|
||||||
id="io-irq_in_hdw"
|
id="io-irq_in_hdw"
|
||||||
|
@ -1572,18 +1592,20 @@ conflicts.
|
||||||
<sect1> Choosing Addresses --Video card conflict with ttyS3
|
<sect1> Choosing Addresses --Video card conflict with ttyS3
|
||||||
|
|
||||||
<p> The IO address of the IBM 8514 video board (and others like it) is
|
<p> The IO address of the IBM 8514 video board (and others like it) is
|
||||||
allegedly 0x?2e8 where ? is 2, 4, 8, or 9. This may conflict (but
|
allegedly 0x?2e8 where ? is 2, 4, 8, or 9. This may conflict with the
|
||||||
shouldn't if the serial port is well designed) with the IO address of
|
IO address of <tt/ttyS3/ at 0x02e8. Your may think that this shouldn't
|
||||||
<tt/ttyS3/ at 0x02e8 if the serial port ignores the leading 0 hex
|
happen since the addresses are different in the high order digit (the
|
||||||
digit (many do). That is bad news if you try to use <tt/ttyS3/ at
|
leading 0 in 02e8). You're right, but a poorly designed serial port
|
||||||
this IO address.
|
may ignore the high order digit and respond to any address that ends
|
||||||
|
in 2e8. That is bad news if you try to use <tt/ttyS3/ at this IO
|
||||||
|
address.
|
||||||
|
|
||||||
In most cases you should use the default addresses if feasible.
|
In most cases you should use the default addresses if feasible.
|
||||||
Addresses shown represent the first address of an 8-byte range. For
|
Addresses shown represent the first address of an 8-byte range. For
|
||||||
example 3f8 is really the range 3f8-3ff. Each serial device (as well
|
example 3f8 is really the range 3f8-3ff. Each serial device (as well
|
||||||
as other types of devices that use IO addresses) needs its own unique
|
as other types of devices that use IO addresses) needs its own unique
|
||||||
address range. There should be no overlaps (conflicts). Here are the
|
address range. There should be no overlaps (conflicts). Here are the
|
||||||
default addresses for the serial ports:
|
default addresses for commonly used serial ports:
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
ttyS0 address 0x3f8
|
ttyS0 address 0x3f8
|
||||||
|
@ -1592,6 +1614,13 @@ ttyS2 address 0x3e8
|
||||||
ttyS3 address 0x2e8
|
ttyS3 address 0x2e8
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
|
Suppose there is an address conflict (as reported by <tt>setserial -g
|
||||||
|
/dev/ttyS*</tt>) between a real serial port and another port which
|
||||||
|
does not physically exist (and shows UART: unknown). Such a conflict
|
||||||
|
shouldn't cause problems but it sometimes does in older kernels. To
|
||||||
|
avoid this problem don't permit such address conflicts or delete
|
||||||
|
/dev/ttyS? if it doesn't physically exist.
|
||||||
|
|
||||||
<sect1> Set IO Address & IRQ in the hardware (mostly for PnP)
|
<sect1> Set IO Address & IRQ in the hardware (mostly for PnP)
|
||||||
<label id="io-irq_methods">
|
<label id="io-irq_methods">
|
||||||
|
|
||||||
|
@ -1739,22 +1768,23 @@ is used to send data.
|
||||||
|
|
||||||
Most modems use an AT command set. These are cryptic and short ASCII
|
Most modems use an AT command set. These are cryptic and short ASCII
|
||||||
commands where all command strings are prefaced by the letters AT.
|
commands where all command strings are prefaced by the letters AT.
|
||||||
For example: ATZ&K3 There are two commands here Z and &K3.
|
For example: ATZ&K3<return> There are two commands here: Z
|
||||||
|
and &K3. The command string is terminated by a return character
|
||||||
|
(use the <enter> key if you are manually typing it).
|
||||||
Unfortunately there are many different variations of the AT command
|
Unfortunately there are many different variations of the AT command
|
||||||
set so that what works for one modem may or may not work for another
|
set so that what works for one modem may or may not work for another
|
||||||
modem. Thus there is no guarantee that the AT commands given in this
|
modem. Thus there is no guarantee that the AT commands given in this
|
||||||
section will work on your modem. Another point is that to get the
|
section will work on your modem.
|
||||||
modem to act on the AT command string, a return character must be sent
|
|
||||||
at the end of the string.
|
|
||||||
|
|
||||||
Such command strings are either automatically sent to the modem by
|
Such command strings are either automatically sent to the modem by
|
||||||
communication programs or are sent directly by you. Most
|
communication programs or are manually typed in by you. Most
|
||||||
communication programs provide a screen where you can type commands
|
communication programs provide a screen where you may type such
|
||||||
directly to your modem. This is good for setting up the modem as you
|
commands. You may type in some commands to create the configuration
|
||||||
can have it remember how it was set even after its powered off.
|
you want and then save this this configuration (profile) for later
|
||||||
|
use. It gets saved inside the modem itself.
|
||||||
|
|
||||||
If you have a manual for your modem you can likely look up the AT
|
If you have a manual for your modem you can likely look up the AT
|
||||||
command set in it. Otherwise, you may try to find it on the Internet.
|
command set. Otherwise, you may try to find it on the Internet.
|
||||||
One may use a search engine and include some actual commands in the
|
One may use a search engine and include some actual commands in the
|
||||||
search terms to avoid finding sites that just talk about such commands
|
search terms to avoid finding sites that just talk about such commands
|
||||||
but fail to list them. You might also try a few of the sites listed
|
but fail to list them. You might also try a few of the sites listed
|
||||||
|
@ -1763,80 +1793,80 @@ in the subsection <ref id="web_sites" name="Web Sites">
|
||||||
<sect1> Init Strings: Saving and Recalling
|
<sect1> Init Strings: Saving and Recalling
|
||||||
<p> The examples given in this subsection are from the Hayes AT modem
|
<p> The examples given in this subsection are from the Hayes AT modem
|
||||||
command set. All command strings must be prefaced by the two letters
|
command set. All command strings must be prefaced by the two letters
|
||||||
AT (for example: AT&C1&D3 ). When a modem is powered on, it
|
AT. For example: AT&C1&D3^M (^M is the return character).
|
||||||
automatically configures itself with one of the configurations it has
|
When a modem is powered on, it automatically configures itself with
|
||||||
stored in its non-volatile memory. If this configuration is
|
one of the several configurations it has stored in its non-volatile
|
||||||
satisfactory there is nothing further to do.
|
memory. If this configuration is satisfactory there is nothing
|
||||||
|
further to do.
|
||||||
|
|
||||||
If it's not satisfactory, then one may either alter the stored
|
If it's not satisfactory, then one may either alter the stored
|
||||||
configuration or configure the modem each time you use it by sending
|
configuration or configure the modem each time you use it by sending
|
||||||
it a string of commands known as an "init string" (= initialization
|
it a string of commands known as an "init string" (= initialization
|
||||||
string). Normally a a communication program does this. What it sends
|
string). Normally, a a communication program does this. What it
|
||||||
will depend on how you configured the communications program or what
|
sends will depend on how you configured the communications program.
|
||||||
script you wrote for it if you use Kermit. You can usually edit the
|
You can usually edit the init string your communication program uses
|
||||||
init string your communication program uses and change it to whatever
|
and change it to whatever you want. Sometimes the communications
|
||||||
you want. Sometimes the communications program will let you select
|
program will let you select the model of your modem and then it will
|
||||||
the model of your modem and then it will use an init string that it
|
use an init string that it thinks is best for that modem.
|
||||||
thinks is best for that modem.
|
|
||||||
|
|
||||||
The configuration of the modem uses when it's first powered on could
|
The configuration of the modem when it's first powered on may be
|
||||||
be expressed by an init string. You might think of this as the
|
expressed by an init string. You might think of this as the default
|
||||||
default "string" (called a profile). If your communications program
|
"string" (called a profile). If your communications program sends the
|
||||||
sends the modem another string (the init string), then this string
|
modem another string (the init string), then this string will modify
|
||||||
will modify the default configuration. For example, if the init
|
the default configuration. For example, if the init string only
|
||||||
string only contains two commands, then only those two items will be
|
contains two commands, then only those two items will be changed.
|
||||||
changed. However, some commands will recall a stored profile from
|
However, some commands will recall a stored profile from inside the
|
||||||
inside the modem so a single such command in the init string can
|
modem so a single such command in the init string can thereby change
|
||||||
thereby change everything in the configuration.
|
everything in the configuration.
|
||||||
|
|
||||||
Modern modems have a few different stored profiles to choose from that
|
Modern modems have a few different stored profiles to choose from that
|
||||||
are stored in the modem's non-volatile memory (it's still there when
|
are stored in the modem's non-volatile memory (it's still there when
|
||||||
you turn it off). In my modem there are two factory profiles (0 and
|
you turn it off). In my modem there are two factory profiles (0 and
|
||||||
1, neither of which you can change) and two user defined profiles (0
|
1, neither of which you can change) and two user defined profiles (0
|
||||||
and 1) that the user may set and store. Your modem may have more.
|
and 1) that the user may set and store. Your modem may have more.
|
||||||
Which one of these user-defined profiles is used at power-up depends
|
To view some of these profiles send the command &V.
|
||||||
on another item stored in the profile. If the command &Y0 is
|
At power-up one of the user-defined profiles is loaded. For example,
|
||||||
given then in the future profile 0 will be used at power-on. If it's
|
if you type the command &Y0 then in the future profile 0 will be
|
||||||
a 1 instead of a 0 then profile 1 will be used at power-on.
|
used at power-on.
|
||||||
|
|
||||||
There are also commands to recall (use it now) any of the 4 stored
|
There are also commands to load (activate) any of the stored profiles.
|
||||||
profiles. One may put such a command in an init string. Of course if
|
Such a load command may be put in an init string. Of course if it
|
||||||
it recalls the same profile as was automatically loaded at power-up,
|
loads the same profile that was automatically loaded at power-up,
|
||||||
nothing is changed unless the active profile has been modified since
|
nothing is changed (unless the active profile has been modified since
|
||||||
power-up. Since it could have been modified It's a good idea to use
|
power-up). Since it could have been modified it's a good idea to use
|
||||||
some kind of an init string even if it does nothing more than
|
some kind of an init string even if it does nothing more than load a
|
||||||
recalling a stored profile.
|
stored profile.
|
||||||
|
|
||||||
Recalling a saved profile (use 1 instead of 0 for profile 1):<newline>
|
Examples of loading saved profiles:<newline>
|
||||||
Z0 recalls user-defined profile 0 and resets (hangs up, etc.)<newline>
|
Z0 loads user-defined profile 0 and resets (hangs up, etc.)<newline>
|
||||||
&F0 recalls factory profile 0
|
&F1 loads factory profile 1
|
||||||
|
|
||||||
Once you have sent commands to the modem to configure it the way you
|
Once you have sent commands to the modem to configure it the way you
|
||||||
want (including recalling a factory profile and modifying it a little)
|
want (such as loading a factory profile and modifying it a little)
|
||||||
you may save this as a user-defined profile:<newline>
|
you may save this as a user-defined profile:<newline>
|
||||||
&W0 saves the current configuration to user-profile 0
|
&W0 saves the current configuration to user-profile 0
|
||||||
|
|
||||||
Many people don't bother saving a good configuration in their modem,
|
Many people don't bother saving a good configuration in their modem,
|
||||||
but instead, send the modem a longer init string each time the modem
|
but instead, send the modem a longer init string each time the modem
|
||||||
is used. Another method is to restore the factory default at the
|
is used. Another method is to restore the factory default by &F1
|
||||||
start of the init string and then modify it a little by adding a few
|
at the start of the init string and then modify it a little by adding
|
||||||
other commands to the end of the init string. By doing it this way no
|
a few other commands to the end of the init string. By doing it this
|
||||||
one can cause problems by modifying the user-defined profile which is
|
way no one can cause problems by modifying the user-defined profile
|
||||||
loaded at power-on.
|
which is loaded at power-on.
|
||||||
|
|
||||||
You may pick an init string supplied by someone else that they think
|
You may choose an init string supplied by someone else that they think
|
||||||
is right for your modem. Some communication programs have a library
|
is right for your modem. Some communication programs have a library
|
||||||
of init strings to select from. The most difficult method (and one
|
of init strings to select from. The most difficult method (and one
|
||||||
which will teach you the most about modems) is to study the modem
|
which will teach you the most about modems) is to study the modem
|
||||||
manual and write one yourself. You could save this configuration
|
manual and write one yourself. You could save this configuration
|
||||||
inside the modem so that you don't need an init string. A third
|
inside the modem so that you don't need an init string. A third
|
||||||
alternative is to start with an init string someone else wrote, but
|
alternative is to start with an init string that someone else wrote,
|
||||||
modify it to suit your purposes.
|
but modify it to suit your purposes.
|
||||||
|
|
||||||
Now if you look at init strings used by communication programs you may
|
If you look at init strings used by communication programs you may see
|
||||||
see symbols which are not valid modem commands. These symbols are
|
symbols which are not valid modem commands. These symbols are
|
||||||
commands to the communication program itself (such as ~ meaning to
|
commands to the communication program itself and will not be sent to
|
||||||
pause briefly) and will not be sent to the modem.
|
the modem. For example, ~ means to pause briefly.
|
||||||
|
|
||||||
<sect1> Other Modem Commands <label id="modem_commands">
|
<sect1> Other Modem Commands <label id="modem_commands">
|
||||||
<p> Future editions of Modem-HOWTO may contain more AT commands but
|
<p> Future editions of Modem-HOWTO may contain more AT commands but
|
||||||
|
@ -1848,22 +1878,18 @@ default or by a saved configuration).
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
E1 command echo ON
|
E1 command echo ON
|
||||||
Q0 result codes are reported
|
Q0 result codes are reported
|
||||||
V1 verbose ON
|
V1 result codes are verbose
|
||||||
S0=0 never answer (uugetty does this with the WAITFOR option)
|
S0=0 never answer (uugetty does this with the WAITFOR option)
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
Here's some more codes concerning modem control lines DCD and DSR:
|
Here's some more codes concerning modem control lines DCD and DSR:
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
&ero;C1 DCD is on after connect only
|
&ero;C1 DCD is on only after connect
|
||||||
&ero;S0 DSR is always on
|
&ero;S0 DSR is always on
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
These affect what your modem does when calls start and end.
|
These affect what your modem does when calls start and end.
|
||||||
What DTR does may also be set up but it's more complicated.
|
What DTR does may also be set up but it's more complicated since it
|
||||||
|
depends on both the &D and &Q commands.
|
||||||
<p> If your modem does not support a stored profile, you can set these
|
|
||||||
through the <tt/INIT/ string in a config file (or the like). Some
|
|
||||||
older modems come with DIP switches that affect register settings. Be
|
|
||||||
sure these are set correctly, too.
|
|
||||||
|
|
||||||
<p> Greg Hankins has a collection of modem setups for different types
|
<p> Greg Hankins has a collection of modem setups for different types
|
||||||
of modems. If you would like to send him your working configuration,
|
of modems. If you would like to send him your working configuration,
|
||||||
|
@ -1955,15 +1981,18 @@ even when the modem fails to assert DCD (since no one has called into
|
||||||
it and there's no carrier). That's why cua was once used for dial-out
|
it and there's no carrier). That's why cua was once used for dial-out
|
||||||
and ttyS used for dial-in.
|
and ttyS used for dial-in.
|
||||||
|
|
||||||
Starting with Linux kernel 2.2, a warning message will be put in the
|
Starting with Linux kernel 2.2, a warning message is put in the
|
||||||
kernel log when one uses cua. This is an omen that cua is on the way
|
kernel log when one uses cua. This is an omen that cua is defunct and
|
||||||
out.
|
should be avoided if possible.
|
||||||
|
|
||||||
<sect>Interesting Programs You Should Know About
|
<sect>Interesting Programs You Should Know About
|
||||||
|
|
||||||
<sect1>What is setserial ? <label id="set_serial">
|
<sect1>What is setserial ? <label id="set_serial">
|
||||||
<!-- setserial.H begin (in MM TT SS)
|
<!-- setserial.H begin (in MM TT SS)
|
||||||
<sect1>What is Setserial ? <label id="set_serial"> -->
|
<sect1>What is Setserial ? <label id="set_serial">
|
||||||
|
Change Log:
|
||||||
|
May 2000: <sect2> IRQs near end ttyS0 -> ttyS1 + clarity
|
||||||
|
-->
|
||||||
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
||||||
are some minor differences, depending on which HOWTO it appears in.
|
are some minor differences, depending on which HOWTO it appears in.
|
||||||
|
|
||||||
|
@ -1975,8 +2004,8 @@ set in the port's hardware, what type of UART you have, etc. It can
|
||||||
also show how the driver is currently set. In addition, it can be
|
also show how the driver is currently set. In addition, it can be
|
||||||
made to probe the hardware and try to determine the UART type and IRQ,
|
made to probe the hardware and try to determine the UART type and IRQ,
|
||||||
but this has severe limitations. See <ref id="probing_ss"
|
but this has severe limitations. See <ref id="probing_ss"
|
||||||
name="Probing">. Note that it can't set the IRQ, etc in the hardware
|
name="Probing">. Note that it can't set the IRQ or the port address
|
||||||
of PnP serial ports.
|
in the hardware of PnP serial ports.
|
||||||
|
|
||||||
If you only have one or two built-in serial ports, they will usually
|
If you only have one or two built-in serial ports, they will usually
|
||||||
get set up correctly without using setserial. Otherwise (or if there
|
get set up correctly without using setserial. Otherwise (or if there
|
||||||
|
@ -1993,10 +2022,10 @@ equivalent was compiled into your kernel). If you should (for some
|
||||||
reason) unload the serial module later on, the changes previously made
|
reason) unload the serial module later on, the changes previously made
|
||||||
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
||||||
must be run again to reestablish them. In addition to running via a
|
must be run again to reestablish them. In addition to running via a
|
||||||
start-up script, something akin to <tt/setserial/ also runs when the
|
start-up script, something akin to <tt/setserial/ also runs earlier
|
||||||
serial module is loaded (or the like). Thus when you watch the
|
when the serial module is loaded (or the like). Thus when you watch
|
||||||
start-up messages on the screen it may look like it ran twice, and in
|
the start-up messages on the screen it may look like it ran twice, and
|
||||||
fact it has.
|
in fact it has.
|
||||||
|
|
||||||
Setserial can set the time that the port will keep operating after
|
Setserial can set the time that the port will keep operating after
|
||||||
it's closed (in order to output any characters still in its buffer in
|
it's closed (in order to output any characters still in its buffer in
|
||||||
|
@ -2021,7 +2050,14 @@ Note that setserial calls an IO address a "port". If you type:
|
||||||
setserial -g /dev/ttyS*
|
setserial -g /dev/ttyS*
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
you'll see some info about how that device driver is configured for
|
you'll see some info about how that device driver is configured for
|
||||||
your ports. Add a -a to the option -g to see more info although few
|
your ports. Note that where it says <tt>"UART: unknown"</tt> it
|
||||||
|
probably means that no uart exists. In other words you probably have
|
||||||
|
no such serial port and the other info shown about the port is
|
||||||
|
meaningless and should be ignored. If you really do have such a
|
||||||
|
serial port, setserial doesn't recognize it and that needs to be
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
If you add -a to the option -g you will see more info although few
|
||||||
people need to deal with (or understand) this additional info since
|
people need to deal with (or understand) this additional info since
|
||||||
the default settings you see usually work fine. In normal cases the
|
the default settings you see usually work fine. In normal cases the
|
||||||
hardware is set up the same way as "setserial" reports, but if you are
|
hardware is set up the same way as "setserial" reports, but if you are
|
||||||
|
@ -2030,7 +2066,11 @@ In fact, you can run "setserial" and assign a purely fictitious I/O
|
||||||
port address, any IRQ, and whatever uart type you would like to have.
|
port address, any IRQ, and whatever uart type you would like to have.
|
||||||
Then the next time you type "setserial ..." it will display these
|
Then the next time you type "setserial ..." it will display these
|
||||||
bogus values without complaint. Of course the serial port driver will
|
bogus values without complaint. Of course the serial port driver will
|
||||||
not work correctly (if at all) with such bogus values.
|
not work correctly (if at all) if you attempt to use such a port.
|
||||||
|
Thus when giving parameters to "setserial" anything goes. It gives
|
||||||
|
you no warning if what you tell it is incorrect and will allow you to
|
||||||
|
create conflicts in IRQs and I/O port addresses that will have
|
||||||
|
disastrous results later on.
|
||||||
|
|
||||||
While assignments made by setserial are lost when the PC is powered
|
While assignments made by setserial are lost when the PC is powered
|
||||||
off, a configuration file may restore them (or a previous
|
off, a configuration file may restore them (or a previous
|
||||||
|
@ -2243,10 +2283,11 @@ Debian labeled obsolete files with "...pre-2.15".
|
||||||
|
|
||||||
<sect2> IRQs
|
<sect2> IRQs
|
||||||
|
|
||||||
<p> By default, both ttyS0 and ttyS2 share IRQ 4, while ttyS0 and
|
<p> By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
|
||||||
ttyS3 share IRQ 3. But sharing serial interrupts is not permitted
|
ttyS3 share IRQ 3. But actually sharing serial interrupts (using them
|
||||||
unless you: 1. have kernel 2.2 or better, and 2. you've complied in
|
in running programs) is not permitted unless you: 1. have kernel 2.2
|
||||||
support for this, and 3. your serial hardware supports it. See
|
or better, and 2. you've complied in support for this, and 3. your
|
||||||
|
serial hardware supports it. See
|
||||||
|
|
||||||
|
|
||||||
<ref id="int_share-2.2" name="Interrupt sharing and Kernels 2.2+">
|
<ref id="int_share-2.2" name="Interrupt sharing and Kernels 2.2+">
|
||||||
|
@ -2320,12 +2361,12 @@ you may use stty again.
|
||||||
<sect1> Are You Ready to Dial Out ?
|
<sect1> Are You Ready to Dial Out ?
|
||||||
<p> Once you've plugged in your modem and know which serial port it's
|
<p> Once you've plugged in your modem and know which serial port it's
|
||||||
on you're ready to try using it. Before you try to get the Internet
|
on you're ready to try using it. Before you try to get the Internet
|
||||||
on it or have people call in to you, first try something simpler like
|
on it or have people call in to you, you could first try something
|
||||||
dialing out to some number to see if your modem is working OK. Find a
|
simpler like dialing out to some number to see if your modem is
|
||||||
phone number that is connected to a modem. It you don't know what
|
working OK. Find a phone number that is connected to a modem. If you
|
||||||
number to call, ask at computer stores for such phone numbers of bulletin
|
don't know what number to call, ask at computer stores for such phone
|
||||||
boards, etc. or see if a local library has a phone number for their
|
numbers of bulletin boards, etc. or see if a local library has a phone
|
||||||
on-line catalog.
|
number for their on-line catalog.
|
||||||
|
|
||||||
Then make sure you are ready to phone. Do you know what serial port
|
Then make sure you are ready to phone. Do you know what serial port
|
||||||
(such as ttyS2) your modem is on? You should have found this out when
|
(such as ttyS2) your modem is on? You should have found this out when
|
||||||
|
@ -3269,7 +3310,7 @@ Minicom). If you have installed an internal modem (serial port is
|
||||||
builtin) or are using an external one and don't know what serial port
|
builtin) or are using an external one and don't know what serial port
|
||||||
it's connected to then the problem is to find the serial port. See
|
it's connected to then the problem is to find the serial port. See
|
||||||
<ref id="cant_find_port" name="My Serial Port is Physically There but
|
<ref id="cant_find_port" name="My Serial Port is Physically There but
|
||||||
Can't be Found"> This section is about finding out which serial port
|
Can't be Found">. This section is about finding out which serial port
|
||||||
has the modem on it.
|
has the modem on it.
|
||||||
|
|
||||||
There's a program that looks for modems on commonly used serial ports
|
There's a program that looks for modems on commonly used serial ports
|
||||||
|
@ -3287,7 +3328,7 @@ will not detect modems on them. Thus "wvdialconf" is best to try
|
||||||
first.
|
first.
|
||||||
|
|
||||||
Another way try to find out if there's a modem on a port is to start
|
Another way try to find out if there's a modem on a port is to start
|
||||||
"minicom" on the port (after first setting up minicon for the correct
|
"minicom" on the port (after first setting up minicom for the correct
|
||||||
serial port --you will need to save the setup and then exit minicom
|
serial port --you will need to save the setup and then exit minicom
|
||||||
and start it again). Then type "AT" and you should see OK (or 0 if
|
and start it again). Then type "AT" and you should see OK (or 0 if
|
||||||
it's set for "digit result codes"). The results may be:
|
it's set for "digit result codes"). The results may be:
|
||||||
|
@ -3297,7 +3338,7 @@ it's set for "digit result codes"). The results may be:
|
||||||
(including only the cursor moving down one line). See <ref id="slow_"
|
(including only the cursor moving down one line). See <ref id="slow_"
|
||||||
name="Extremely Slow: Text appears on the screen slowly after long
|
name="Extremely Slow: Text appears on the screen slowly after long
|
||||||
delays">
|
delays">
|
||||||
<item> Some stange characters appear but they are not in response to
|
<item> Some strange characters appear but they are not in response to
|
||||||
AT. This likely means that your modem is still connected to something
|
AT. This likely means that your modem is still connected to something
|
||||||
at the other end of the phone line which is sending some cryptic
|
at the other end of the phone line which is sending some cryptic
|
||||||
packets or the like.
|
packets or the like.
|
||||||
|
@ -3306,24 +3347,28 @@ packets or the like.
|
||||||
<sect2> No response to AT <label id="no_AT">
|
<sect2> No response to AT <label id="no_AT">
|
||||||
<p> The modem should send you "OK" in response to your "AT" which you
|
<p> The modem should send you "OK" in response to your "AT" which you
|
||||||
type to the modem (using minicom or the like). If you don't see "OK"
|
type to the modem (using minicom or the like). If you don't see "OK"
|
||||||
(and in most cases don't even see the "AT" you typed either) the modem
|
(and in most cases don't even see the "AT" you typed either) then the
|
||||||
is not responding (assuming there is really a modem on the port you
|
modem is not responding (often because what you type doesn't even get
|
||||||
are typing to).
|
to the modem).
|
||||||
|
|
||||||
One reason that a real modem doesn't respond is that it is in
|
A common cause is that there is no modem on the serial port you are
|
||||||
"online data" mode where it can't accept any AT commands. It may be
|
typing to. For the case of an internal modem, that serial port likely
|
||||||
in use by another process. If such a process is running on the port you
|
doesn't exist either. That's because the PnP modem card (which has a
|
||||||
may see it by typing "ps -t ttyS2" or the like. However the process
|
built-in serial port) has either not been configured (by isapnp or the
|
||||||
that's using the serial port (where the modem is) may be running on a
|
like) or has been configured incorrectly. See <ref
|
||||||
terminal such at /dev/tty1 and will not be found using the above command.
|
id="cant_find_port" name="My Serial Port is Physically There but Can't
|
||||||
|
be Found">.
|
||||||
|
|
||||||
You may have been using the modem and then abruptly disconnected (such
|
If what you type is really getting thru to a modem, then the lack of
|
||||||
as killing the process with signal 9). In that case your modem did
|
response could be due to the modem being in "online data" mode where
|
||||||
not get reset to "command mode" where it can interact to AT commands.
|
it can't accept any AT commands. You may have been using the modem
|
||||||
Thus the message from minicom "You are already online. Hangup first."
|
and then abruptly disconnected (such as killing the process with
|
||||||
Well, you are sort of online but you are may not be connected to
|
signal 9). In that case your modem did not get reset to "command
|
||||||
anything over the phone line. wvdial will report "modem not
|
mode" where it can interact to AT commands. Thus the message from
|
||||||
responding" for the same situation.
|
minicom "You are already online. Hangup first." Well, you are sort
|
||||||
|
of online but you are may not be connected to anything over the phone
|
||||||
|
line. Wvdial will report "modem not responding" for the same
|
||||||
|
situation.
|
||||||
|
|
||||||
To fix this as a last resort you could reboot the computer. Another
|
To fix this as a last resort you could reboot the computer. Another
|
||||||
way to try to fix this is to send +++ to the modem to tell it to
|
way to try to fix this is to send +++ to the modem to tell it to
|
||||||
|
@ -3332,13 +3377,24 @@ of the +++ sequence there must be about 1 second of delay (nothing
|
||||||
sent during "guard time"). This may not work if another process is
|
sent during "guard time"). This may not work if another process is
|
||||||
using the modem since the +++ sequence could wind up with other
|
using the modem since the +++ sequence could wind up with other
|
||||||
characters inserted in between them or after the +++ (during the guard
|
characters inserted in between them or after the +++ (during the guard
|
||||||
time). Ironically, even if the modem line is idle, putting an
|
time). Ironically, even if the modem line is idle, typing an
|
||||||
unexpected +++ is likely to set off an exchange of packets (or the
|
unexpected +++ is likely to set off an exchange of control packets
|
||||||
like) that will violate the required guard time so that the +++
|
(that you never see) that will violate the required guard time so
|
||||||
doesn't do what you wanted. +++ is usually in the string that is
|
that the +++ doesn't do what you wanted. +++ is usually in the string
|
||||||
named "hangup string" so if you command minicom (or the like) to
|
that is named "hangup string" so if you command minicom (or the like)
|
||||||
hangup it might work. Another way to do this is to just exit minicom
|
to hangup it might work. Another way to do this is to just exit
|
||||||
and then run minicom again.
|
minicom and then run minicom again.
|
||||||
|
|
||||||
|
<sect1> "Modem busy"
|
||||||
|
<p> The modem could actually be in use (busy). Another cause reported
|
||||||
|
for the SuSE distribution is that there may be two serial drivers
|
||||||
|
present instead of one. Both try to work at the same time with
|
||||||
|
confusing results. One driver may run ahead of the other and the
|
||||||
|
second driver finds the modem "busy" since the first driver is trying
|
||||||
|
(in vain) to use it. If serial driver support is built-in, don't also
|
||||||
|
compile it in. Also, don't let the serial module load if serial
|
||||||
|
support is already built-in (or compiled-in). There are likely other
|
||||||
|
causes for a false "modem busy".
|
||||||
|
|
||||||
<sect1> I can't get near 56k on my 56k modem
|
<sect1> I can't get near 56k on my 56k modem
|
||||||
<p> There must be very low noise on the line for it to work at even
|
<p> There must be very low noise on the line for it to work at even
|
||||||
|
@ -3438,8 +3494,10 @@ it.
|
||||||
<!-- <sect>Troubleshooting started above -->
|
<!-- <sect>Troubleshooting started above -->
|
||||||
<!-- troubleshooting.H begin
|
<!-- troubleshooting.H begin
|
||||||
Change Log:
|
Change Log:
|
||||||
Apr. 00: 2 ports on same address -->
|
Apr. 00: 2 ports on same address
|
||||||
<sect1> The following subsections are in both the Serial and Modem HOWTOs:
|
May 00: address conflict
|
||||||
|
-->
|
||||||
|
<sect1>(The following subsections are in both the Serial and Modem HOWTOs)
|
||||||
|
|
||||||
<sect1> My Serial Port is Physically There but Can't be Found
|
<sect1> My Serial Port is Physically There but Can't be Found
|
||||||
<label id="cant_find_port">
|
<label id="cant_find_port">
|
||||||
|
@ -3447,25 +3505,28 @@ Apr. 00: 2 ports on same address -->
|
||||||
serial port that it's on has been found. If it doesn't work at all, then
|
serial port that it's on has been found. If it doesn't work at all, then
|
||||||
you need to make sure your serial port can be found.
|
you need to make sure your serial port can be found.
|
||||||
|
|
||||||
Check the BIOS menus and BIOS messages. For the PCI bus use lspci.
|
Check the BIOS menus and BIOS messages. For the PCI bus use lspci or
|
||||||
If it's an ISA bus PnP serial port, try "pnpdump --dumpregs" and/or
|
scanpci. If it's an ISA bus PnP serial port, try "pnpdump --dumpregs"
|
||||||
see Plug-and-Play-HOWTO. Using "scanport" will scan all ISA bus ports
|
and/or see Plug-and-Play-HOWTO. Using "scanport" will scan all ISA
|
||||||
and may discover an unknown port that could be a serial port (but it
|
bus ports and may discover an unknown port that could be a serial port
|
||||||
doesn't probe the port). It could hang your PC. You may try probing
|
(but it doesn't probe the port). It could hang your PC. You may try
|
||||||
with setserial. See <ref id="probing_ss" name="Probing">. If
|
probing with setserial. See <ref id="probing_ss" name="Probing">. If
|
||||||
nothing seems to get thru the port it may be accessible but have a bad
|
nothing seems to get thru the port it may be accessible but have a bad
|
||||||
interrupt. See <ref id="slow_" name="Extremely Slow: Text appears on
|
interrupt. See <ref id="slow_" name="Extremely Slow: Text appears on
|
||||||
the screen slowly after long delays">.
|
the screen slowly after long delays">. Use <tt>setserial -g</tt> to
|
||||||
|
see what the serial driver thinks and check for IRQ and I0 address
|
||||||
|
conflicts. Even if you see no conflicts the driver may have incorrect
|
||||||
|
information and conflicts may still exist.
|
||||||
|
|
||||||
If two ports have the same IO address then probing it will erroneously
|
If two ports have the same IO address then probing it will erroneously
|
||||||
indicate only one port. Plug-and-play detection will find both ports
|
indicate only one port. Plug-and-play detection will find both ports
|
||||||
so this should only be a problem if at least one port is not
|
so this should only be a problem if at least one port is not
|
||||||
plug-and-play. All sorts of errors may be reported/observed for
|
plug-and-play. All sorts of errors may be reported/observed for
|
||||||
devices on "sharing" a port but the fact that there are two devices on
|
devices illegally "sharing" a port but the fact that there are two
|
||||||
the same a port doesn't seem to get detected (except hopefully by
|
devices on the same a port doesn't seem to get detected (except
|
||||||
you). If the IRQs are different then probing for IRQs with setserial
|
hopefully by you). In the above case, if the IRQs are different then
|
||||||
might "detect" this situation by failing to detect an IRQ. See <ref
|
probing for IRQs with setserial might "detect" this situation by
|
||||||
id="probing_ss" name="Probing">.
|
failing to detect any IRQ. See <ref id="probing_ss" name="Probing">.
|
||||||
|
|
||||||
<sect1> Extremely Slow: Text appears on the screen slowly after long delays
|
<sect1> Extremely Slow: Text appears on the screen slowly after long delays
|
||||||
<label id="slow_">
|
<label id="slow_">
|
||||||
|
@ -3615,11 +3676,15 @@ start the second device (without quitting the first device) you get a
|
||||||
keeps track of what IRQs are actually in use and conflicts don't
|
keeps track of what IRQs are actually in use and conflicts don't
|
||||||
happen unless the devices are in use (open).
|
happen unless the devices are in use (open).
|
||||||
|
|
||||||
There are two cases. There may be a real interrupt conflict that is
|
There are two possible cases when you see this message:
|
||||||
being avoided. But if setserial has it wrong, there may be no reason
|
<enum>
|
||||||
why <tt/ttyS2/ can't be used, except that setserial erroneously predicts a
|
<item> There may be a real interrupt conflict that is being avoided.
|
||||||
conflict. What you need to do is to find the interrupt setserial
|
<item> Setserial has it wrong and the only reason <tt/ttyS2/ can't be
|
||||||
thinks <tt/ttyS2/ is using. This is easier said than done since you can't
|
used is that setserial erroneously predicts a conflict.
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
What you need to do is to find the interrupt setserial thinks
|
||||||
|
<tt/ttyS2/ is using. This is easier said than done since you can't
|
||||||
use the "setserial" command for <tt/ttyS2/ since the IRQ for ttyS2 is
|
use the "setserial" command for <tt/ttyS2/ since the IRQ for ttyS2 is
|
||||||
supposedly "busy" and you will get the same "... busy" error message.
|
supposedly "busy" and you will get the same "... busy" error message.
|
||||||
To fix this either reboot or: exit or gracefully kill all likely
|
To fix this either reboot or: exit or gracefully kill all likely
|
||||||
|
@ -3629,14 +3694,14 @@ messages for the serial ports. 2. Hope that the file that runs
|
||||||
again.
|
again.
|
||||||
|
|
||||||
If you think you know what IRQ <tt/ttyS2/ is using then you may look
|
If you think you know what IRQ <tt/ttyS2/ is using then you may look
|
||||||
at /proc/interrupts to find what else is currently using this IRQ.
|
at /proc/interrupts to find what else (besides another serial port) is
|
||||||
You might also want to double check that any suspicious IRQs shown
|
currently using this IRQ. You might also want to double check that
|
||||||
here (and by "setserial") are correct (the same as set in the
|
any suspicious IRQs shown here (and by "setserial") are correct (the
|
||||||
hardware). A way to test whether or not it is a potential interrupt
|
same as set in the hardware). A way to test whether or not it is a
|
||||||
conflict is to set the IRQ to 0 (polling) using "setserial". Then if
|
potential interrupt conflict is to set the IRQ to 0 (polling) using
|
||||||
the busy message goes away, it was likely a potential interrupt
|
"setserial". Then if the busy message goes away, it was likely a
|
||||||
conflcit. It's not a good idea to leave it permanently set at 0 since
|
potential interrupt conflcit. It's not a good idea to leave it
|
||||||
more CPU resources will be used.
|
permanently set at 0 since more CPU resources will be used.
|
||||||
|
|
||||||
This paragraph is mainly for the case when a modem is used for both
|
This paragraph is mainly for the case when a modem is used for both
|
||||||
dial-in and dial-out. If the DCD signal is sent to a port, that port
|
dial-in and dial-out. If the DCD signal is sent to a port, that port
|
||||||
|
|
|
@ -4,11 +4,12 @@
|
||||||
<author>David S.Lawyer
|
<author>David S.Lawyer
|
||||||
<tt><url url="mailto:dave@lafn.org"></tt>
|
<tt><url url="mailto:dave@lafn.org"></tt>
|
||||||
|
|
||||||
<date> v0.11, May 2000
|
<date> v0.12, June 2000
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Change log:
|
Change log:
|
||||||
v0.11 scanport utility, many typos fixed.
|
v0.12 scanpci, workaround for Dos zeroing PCI IRQs.
|
||||||
|
v0.11 May 2000 scanport utility, many typos fixed, setpci hard to use
|
||||||
v0.10 2 March 2000 typo: /bus/pnp/devices, lspci+, book "Programming
|
v0.10 2 March 2000 typo: /bus/pnp/devices, lspci+, book "Programming
|
||||||
..."
|
..."
|
||||||
v0.09 /proc/bus/pci/devices too cryptic,
|
v0.09 /proc/bus/pci/devices too cryptic,
|
||||||
|
@ -72,7 +73,13 @@ be a trademark). Such trademarks belong to their respective owners.
|
||||||
|
|
||||||
|
|
||||||
<sect2> Credits
|
<sect2> Credits
|
||||||
<p> Daniel Scott proofread this in March 2000 and found many typos, etc.
|
<p>
|
||||||
|
<itemize>
|
||||||
|
<item> Daniel Scott proofread this in March 2000 and found many
|
||||||
|
typos, etc.
|
||||||
|
<item> Pete Barrett gave a workaround to prevent Windows from zeroing
|
||||||
|
PCI IRQs.
|
||||||
|
</itemize>
|
||||||
|
|
||||||
<sect1> Future Plans; You Can Help
|
<sect1> Future Plans; You Can Help
|
||||||
<p> Please let me know of any errors in facts, opinions, logic,
|
<p> Please let me know of any errors in facts, opinions, logic,
|
||||||
|
@ -95,9 +102,8 @@ url="http://linuxdoc.org/mirrors.html">. Various formats are
|
||||||
available. If you only want to quickly check the date of the latest
|
available. If you only want to quickly check the date of the latest
|
||||||
version look at: <url
|
version look at: <url
|
||||||
url="http://linuxdoc.org/HOWTO/Plug-and-Play-HOWTO.html">.
|
url="http://linuxdoc.org/HOWTO/Plug-and-Play-HOWTO.html">.
|
||||||
The version you are now reading is: v0.11, May 2000 . New is this version are:
|
The version you are now reading is: v0.12, June 2000 . New is this version are:
|
||||||
scanport utility, many typos fixed, setpci hard to
|
scanpci, workaround for Dos zeroing PCI IRQs. .
|
||||||
use .
|
|
||||||
|
|
||||||
<sect> What PnP Should Do: Allocate "Bus-Resources"
|
<sect> What PnP Should Do: Allocate "Bus-Resources"
|
||||||
<sect1> What is Plug-and-Play (PnP)?
|
<sect1> What is Plug-and-Play (PnP)?
|
||||||
|
@ -108,8 +114,9 @@ is to match up physical devices with the software (device drivers)
|
||||||
that operates them and to establish channels of communication between
|
that operates them and to establish channels of communication between
|
||||||
each device and its driver. In order to achieve this, PnP allocates
|
each device and its driver. In order to achieve this, PnP allocates
|
||||||
the following "bus-resources" to both drivers and hardware: I/O
|
the following "bus-resources" to both drivers and hardware: I/O
|
||||||
addresses, IRQs, DMA channels (ISA bus only), and memory regions. If
|
addresses, IRQs, DMA channels (ISA bus only), and memory regions.
|
||||||
you don't understand what these 4 bus-resources are, read the following
|
These 4 things are sometimes called 1st order resources. If you don't
|
||||||
|
understand what these 4 bus-resources are, read the following
|
||||||
subsections of this HOWTO: I/O Addresses, IRQs, DMA Channels, Memory
|
subsections of this HOWTO: I/O Addresses, IRQs, DMA Channels, Memory
|
||||||
Regions. An article in Linux Gazette about 3 of these bus-resources
|
Regions. An article in Linux Gazette about 3 of these bus-resources
|
||||||
is <htmlurl url="http://www.linuxgazette.com/issue38/blanchard.html"
|
is <htmlurl url="http://www.linuxgazette.com/issue38/blanchard.html"
|
||||||
|
@ -231,26 +238,28 @@ direction? Suppose the device needs to tell its device driver
|
||||||
something immediately? For example, the device may have just received
|
something immediately? For example, the device may have just received
|
||||||
a lot of bytes destined for main memory and the device needs to call
|
a lot of bytes destined for main memory and the device needs to call
|
||||||
its driver to fetch these bytes at once and transfer them from the
|
its driver to fetch these bytes at once and transfer them from the
|
||||||
device's nearly full buffer into main memory.
|
device's nearly full buffer into main memory. Another example is to
|
||||||
|
signal the driver that the device has finished sending a bunch of
|
||||||
|
bytes and is now waiting for some more bytes to send.
|
||||||
|
|
||||||
How should the device call for help? It can't use the main data bus
|
How should the device signal its driver? It can't use the main data
|
||||||
since it's likely already in use. Instead it puts a voltage on a
|
bus since it's likely already in use. Instead it puts a voltage on a
|
||||||
dedicated interrupt wire (part of the bus) which is often reserved for
|
dedicated interrupt wire (part of the bus) which is often reserved for
|
||||||
that device alone. This signal is called an interrupt. There are the
|
that device alone. This signal is called an interrupt. There are the
|
||||||
equivalent of 16 such wires in a PC and each wire leads (indirectly) to
|
equivalent of 16 such wires in a PC and each wire leads (indirectly)
|
||||||
a certain device driver. Each wire has a unique IRQ (Interrupt
|
to a certain device driver. Each wire has a unique IRQ (Interrupt
|
||||||
ReQuest) number. The device must put its interrupt on the correct
|
ReQuest) number. The device must put its interrupt on the correct
|
||||||
wire and the device driver must listen for the interrupt on the
|
wire and the device driver must listen for the interrupt on the
|
||||||
correct wire. Which wire it's put on is determined by the IRQ number
|
correct wire. Which wire the device uses is determined by the IRQ
|
||||||
stored in the device. This same IRQ number must be known to the
|
number stored in the device. This same IRQ number must be known to
|
||||||
device driver so that the device driver knows which IRQ line to listen
|
the device driver so that the device driver knows which IRQ line to
|
||||||
to.
|
listen to.
|
||||||
|
|
||||||
Once the device driver gets the interrupt (a call for help) it must
|
Once the device driver gets the interrupt from the device it must find
|
||||||
find out why the interrupt was issued and take appropriate action to
|
out why the interrupt was issued and take appropriate action to
|
||||||
service the interrupt. On the ISA bus each device needs its own
|
service the interrupt. On the ISA bus each device needs its own
|
||||||
unique IRQ number. For the PCI bus and other special cases the sharing of IRQs
|
unique IRQ number. For the PCI bus and other special cases the
|
||||||
is allowed.
|
sharing of IRQs is allowed.
|
||||||
|
|
||||||
<sect1> DMA Channels <label id="dma_">
|
<sect1> DMA Channels <label id="dma_">
|
||||||
<p> DMA channels are only for the ISA bus. DMA stands for "Direct Memory
|
<p> DMA channels are only for the ISA bus. DMA stands for "Direct Memory
|
||||||
|
@ -485,10 +494,10 @@ rest of the PnP configuring of devices (but not their drivers).
|
||||||
faster bus from Intel. The PCI bus was designed for what is today
|
faster bus from Intel. The PCI bus was designed for what is today
|
||||||
called PnP. It makes it easy (as compared to the ISA bus) to find out
|
called PnP. It makes it easy (as compared to the ISA bus) to find out
|
||||||
how PnP bus-resources have been assigned to hardware devices. To see
|
how PnP bus-resources have been assigned to hardware devices. To see
|
||||||
what has happened use the <tt/lspci/ command and/or look at
|
what has happened use the commands <tt/lspci/ or scanpci (Xwindows)
|
||||||
<tt>/proc/pci</tt> or possibly <tt>/proc/bus/pci</tt>. The boot-up
|
and/or look at <tt>/proc/pci</tt> or possibly <tt>/proc/bus/pci</tt>.
|
||||||
messages on your display are useful (use shift-PageUp to back up).
|
The boot-up messages on your display are useful (use shift-PageUp to
|
||||||
See <ref id="boot_time_msgs" name="Boot-time Messages">
|
back up). See <ref id="boot_time_msgs" name="Boot-time Messages">
|
||||||
|
|
||||||
For the ISA bus there is a real problem with implementing PnP since no
|
For the ISA bus there is a real problem with implementing PnP since no
|
||||||
one had PnP in mind when the ISA bus was designed and there are almost
|
one had PnP in mind when the ISA bus was designed and there are almost
|
||||||
|
@ -522,8 +531,8 @@ while the purpose of PnP was to make it simple.
|
||||||
In a sense, Linux is already somewhat PnP for the PCI bus. When the
|
In a sense, Linux is already somewhat PnP for the PCI bus. When the
|
||||||
PC starts up you may note from the messages on the screen that some
|
PC starts up you may note from the messages on the screen that some
|
||||||
Linux device drivers often find their hardware devices (and the
|
Linux device drivers often find their hardware devices (and the
|
||||||
bus-resources the BIOS has assigned them). But there are situations that
|
bus-resources the BIOS has assigned them). But there are situations
|
||||||
a PnP operating system could handle better:
|
that a PnP operating system could handle better:
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>A shortage of bus-resources
|
<item>A shortage of bus-resources
|
||||||
<item>More than one driver for a physical device
|
<item>More than one driver for a physical device
|
||||||
|
@ -604,8 +613,8 @@ are in sync. If this works for you (and this is the latest version of
|
||||||
this HOWTO), let me know as I only have one report of this working out
|
this HOWTO), let me know as I only have one report of this working out
|
||||||
OK.
|
OK.
|
||||||
|
|
||||||
Another method is to "remove" devices that are causing problems in
|
Another method is to remove devices that are causing problems in
|
||||||
Windows by clicking on remove in the Device Manager. Then reboot with
|
Windows by clicking on "remove" in the Device Manager. Then reboot with
|
||||||
"Not a PnP OS" (set it in the CMOS as you start to boot). Windows
|
"Not a PnP OS" (set it in the CMOS as you start to boot). Windows
|
||||||
will then reinstall the devices, hopefully using the bus-resource
|
will then reinstall the devices, hopefully using the bus-resource
|
||||||
settings configured by the BIOS. Be warned that Windows will likely
|
settings configured by the BIOS. Be warned that Windows will likely
|
||||||
|
@ -802,15 +811,15 @@ another (perhaps about the same) stored on the hard disk. To look at
|
||||||
(the one in memory?) this indirectly in Windows98 or to force changes
|
(the one in memory?) this indirectly in Windows98 or to force changes
|
||||||
you use the Device Manager.
|
you use the Device Manager.
|
||||||
|
|
||||||
In Windows98 There are 2 ways to get to the Device Manager: 1. My
|
In Windows98 there are 2 ways to get to the Device Manager: 1. My
|
||||||
Computer --> Control Panel --> System Properties --> Device Manager.
|
Computer --> Control Panel --> System Properties --> Device Manager.
|
||||||
2. (right-click) My Computer --> Properties --> Device Manager. Then
|
2. (right-click) My Computer --> Properties --> Device Manager. Then
|
||||||
in Device Manager you select a device (sometimes a multi-step process
|
in Device Manager you select a device (sometimes a multi-step process
|
||||||
if there are a few devices of the same class). Then click on
|
if there are a few devices of the same class). Then click on
|
||||||
Properties and then on Resources. To attempt to change the resource
|
"Properties" and then on "Resources". To attempt to change the
|
||||||
configuration manually, uncheck "Use automatic settings" and then
|
resource configuration manually, uncheck "Use automatic settings" and
|
||||||
click on "Change Settings". Now try to change the setting, but it
|
then click on "Change Settings". Now try to change the setting, but
|
||||||
may not let you change it. If it does let you, you have "forced" a
|
it may not let you change it. If it does let you, you have "forced" a
|
||||||
change. A message should inform you that it's being forced. If you
|
change. A message should inform you that it's being forced. If you
|
||||||
want to keep the existing setting shown by Windows but make it
|
want to keep the existing setting shown by Windows but make it
|
||||||
"forced" then you will have to force a change to something else and
|
"forced" then you will have to force a change to something else and
|
||||||
|
@ -821,7 +830,7 @@ hardware" list: Start --> Programs --> Accessories --> System Tools
|
||||||
--> System Information --> Hardware Resources --> Forced Hardware.
|
--> System Information --> Hardware Resources --> Forced Hardware.
|
||||||
When you "force" a change of bus-resources in Windows, it should put
|
When you "force" a change of bus-resources in Windows, it should put
|
||||||
your change into the ESCD (provided you exit Windows normally).
|
your change into the ESCD (provided you exit Windows normally).
|
||||||
From the "System Information" window you may also inspect how IRQs and
|
>From the "System Information" window you may also inspect how IRQs and
|
||||||
IO ports have been allocated under Windows.
|
IO ports have been allocated under Windows.
|
||||||
|
|
||||||
Even if Windows shows no conflict of bus-resources, there may be a
|
Even if Windows shows no conflict of bus-resources, there may be a
|
||||||
|
@ -886,13 +895,13 @@ A single card may contain several physical devices but the above
|
||||||
explanation was for just one of these devices.
|
explanation was for just one of these devices.
|
||||||
|
|
||||||
<sect1> PCI Utilities <label id="pciutils_">
|
<sect1> PCI Utilities <label id="pciutils_">
|
||||||
<p> The new package PCI Utilities (= pciutils, incorrectly called
|
<p> The package PCI Utilities (= pciutils, incorrectly called
|
||||||
"pcitools"), should let you manually PnP-configure the PCI bus.
|
"pcitools"), should let you manually PnP-configure the PCI bus.
|
||||||
"lspci" lists bus-resources while "setpci" sets resource allocations
|
"lspci" or "scanpci" (Xwindows) lists bus-resources while "setpci"
|
||||||
in the hardware devices. It appears that setpci is mainly intended
|
sets resource allocations in the hardware devices. It appears that
|
||||||
for use in scipts and presently one needs to know the details of the
|
setpci is mainly intended for use in scripts and presently one needs to
|
||||||
PCI configuation registers in order to use it. That's a topic not
|
know the details of the PCI configuration registers in order to use it.
|
||||||
explained here nor in the manual page for setpci.
|
That's a topic not explained here nor in the manual page for setpci.
|
||||||
|
|
||||||
<sect1> Patch the Kernel to Make Linux PnP <label id="patch_kernel">
|
<sect1> Patch the Kernel to Make Linux PnP <label id="patch_kernel">
|
||||||
<p> David Howells has created a patch to do this called "Linux Kernel
|
<p> David Howells has created a patch to do this called "Linux Kernel
|
||||||
|
@ -914,9 +923,42 @@ url="http://www.astarte.free-online.co.uk">
|
||||||
<sect1> Windows Configures <label id="windows_conf">
|
<sect1> Windows Configures <label id="windows_conf">
|
||||||
<p> If you have Windows9x (or 2k) on the same PC, then just start
|
<p> If you have Windows9x (or 2k) on the same PC, then just start
|
||||||
Windows and let it configure PnP. Then start Linux from Windows (or
|
Windows and let it configure PnP. Then start Linux from Windows (or
|
||||||
DOS). It has been reported that Windows erased the IRQs from PCI
|
DOS). But there may be a problem with IRQs for PCI devices. As
|
||||||
devices registers. Then Linux complained that it found a zero IRQ.
|
Windows shuts down to make way for Linux, it may erase (zero) the IRQ
|
||||||
Thus you may not be able to use this method.
|
which is stored in one of the PCI device's configuration registers.
|
||||||
|
Linux will complain that it has found an IRQ of zero.
|
||||||
|
|
||||||
|
The above is reported to happen if you start Linux using a shortcut
|
||||||
|
(PIF file). But a workaround is reported where you still use the
|
||||||
|
shortcut PIF. A shortcut is something like a symbolic link in Linux
|
||||||
|
but it's more than that since it may be "configured". To start Linux
|
||||||
|
(from DOS you create a batch file (script) which starts Linux. (The
|
||||||
|
program that starts Linux is in the package called "loadlin"). Then
|
||||||
|
create a PIF shortcut to that batch file and get to the "Properties"
|
||||||
|
dialog box for the shortcut. Select "Advanced" and then check "MS-DOS
|
||||||
|
mode" to get it to start in genuine MS-DOS.
|
||||||
|
|
||||||
|
Now here's the trick to prevent zeroing the PCI IRQs. Check "Specify
|
||||||
|
a new MS-DOS configuration". Then either accept the default
|
||||||
|
configuration presented to you or click on "Configuration" to change
|
||||||
|
it. Now when you start Linux by clicking on the shortcut, new
|
||||||
|
configuration files (Config.sys and Autoexec.bat) will be created per
|
||||||
|
your new configuration. The old files are stored as "Config.wos and
|
||||||
|
Autoexec.wos". Windows would normally restore these files to their
|
||||||
|
original names if Windows were to be entered again and shut down. But
|
||||||
|
after Linux boots you don't get back to Windows again so you should
|
||||||
|
enter commands in the batch file to rename these files to their *.bat
|
||||||
|
and *.sys names. Put the renaming commands into the batch file before
|
||||||
|
the line that loads Linux. This will permit Windows (and not Linux)
|
||||||
|
to start the next time the PC is powered on.
|
||||||
|
|
||||||
|
Also it's reported that you should click on the "General" tab (of the
|
||||||
|
"Properties" dialog) and check "Read-only". Otherwise Windows may
|
||||||
|
reset the "Advanced Settings" to "Use current MS-DOS configuration"
|
||||||
|
and PCI IRQs get zeroed. Thus Windows erases the IRQs when you use the
|
||||||
|
current MS-DOS configuration but doesn't erase when you use a new
|
||||||
|
configuration (which may actually configure things identical to
|
||||||
|
the old configuration). Windows does not seem to be very consistent.
|
||||||
|
|
||||||
<sect1> Device Driver Configures <label id="dev_d_conf">
|
<sect1> Device Driver Configures <label id="dev_d_conf">
|
||||||
<p> A few device drivers will use PnP methods to set the bus-resources in
|
<p> A few device drivers will use PnP methods to set the bus-resources in
|
||||||
|
@ -1098,11 +1140,11 @@ the kernel) may still issue some interrupts for various reasons.
|
||||||
|
|
||||||
<sect1> How Are My Hardware Devices Configured?
|
<sect1> How Are My Hardware Devices Configured?
|
||||||
<p> It's easy to find out what bus-resources have been assigned to
|
<p> It's easy to find out what bus-resources have been assigned to
|
||||||
devices on the PCI bus with the "lspci" command. For for kernels <
|
devices on the PCI bus with the "lspci" or "scanpci" commands. For
|
||||||
2.2: see <tt>/proc/pci</tt> or <tt>/proc/bus/pci</tt>. Note that IRQs
|
for kernels < 2.2: see <tt>/proc/pci</tt> or <tt>/proc/bus/pci</tt>
|
||||||
for <tt>/proc/pci</tt> are in hexadecimal. Don't bother trying to
|
for later kernels. Note that IRQs for <tt>/proc/pci</tt> are in
|
||||||
decipher <tt>/proc/bus/pci/devices</tt> since "lspci" will do that for
|
hexadecimal. Don't bother trying to decipher
|
||||||
you.
|
<tt>/proc/bus/pci/devices</tt> since "lspci" will do that for you.
|
||||||
|
|
||||||
For the ISA bus you may try running <tt>pnpdump --dumpregs</tt>
|
For the ISA bus you may try running <tt>pnpdump --dumpregs</tt>
|
||||||
but it's not a sure thing. The results may be seem cryptic but they
|
but it's not a sure thing. The results may be seem cryptic but they
|
||||||
|
@ -1240,9 +1282,10 @@ starting with Kernel 2.2) it's possible for two (or more) devices to
|
||||||
share the same IRQ number. When such an interrupt is issued, the CPU
|
share the same IRQ number. When such an interrupt is issued, the CPU
|
||||||
runs all interrupt service routines for all devices using that
|
runs all interrupt service routines for all devices using that
|
||||||
interrupt. The first thing the first service routine does is to check
|
interrupt. The first thing the first service routine does is to check
|
||||||
to see if an interrupt actually happened for its device. If there was
|
the device registers to see if an interrupt actually happened for its
|
||||||
no interrupt (false alarm) it likely will exit and the next service
|
device. If it finds that its device didn't issue an interrupt (a false
|
||||||
routine starts, etc.
|
alarm) it likely will immediately exit and the next service routine
|
||||||
|
starts, etc.
|
||||||
|
|
||||||
<sect1> PCI Interrupts
|
<sect1> PCI Interrupts
|
||||||
<p> PCI interrupts are different but since they are normally mapped to
|
<p> PCI interrupts are different but since they are normally mapped to
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
<!doctype linuxdoc system>
|
<!doctype linuxdoc system>
|
||||||
<article>
|
<article>
|
||||||
<title>The Linux Serial HOWTO
|
<title> Serial HOWTO
|
||||||
<author>David S.Lawyer
|
<author>David S.Lawyer
|
||||||
<tt><htmlurl url="mailto:dave@lafn.org" name="dave@lafn.org"></tt>
|
<tt><htmlurl url="mailto:dave@lafn.org" name="dave@lafn.org"></tt>
|
||||||
original by Greg Hankins
|
original by Greg Hankins
|
||||||
|
|
||||||
<date> v2.07 May 2000
|
<date> v2.08 June 2000
|
||||||
|
|
||||||
<!-- Change log:
|
<!-- Change log:
|
||||||
v2.07 Apr. locking methods, clarity re uart protocol, sticky parity
|
v2.08 /proc/tty, fixed link to Gary's Encyclopedia.
|
||||||
|
v2.07 May 2000. locking methods, clarity re uart protocol, sticky parity
|
||||||
v2.06 2 March 2000 more on multiport, not 3-3 for null modem,
|
v2.06 2 March 2000 more on multiport, not 3-3 for null modem,
|
||||||
butter -> buffer,
|
butter -> buffer,
|
||||||
v2.05 Vern's & my url, ref to multiport modem cards
|
v2.05 Vern's & my url, ref to multiport modem cards
|
||||||
|
@ -108,21 +109,6 @@ to Ted Ts'o for answering questions about the serial drivers.
|
||||||
Approximately half of v2.00 was from Greg Hankins HOWTO and the other
|
Approximately half of v2.00 was from Greg Hankins HOWTO and the other
|
||||||
half is by David Lawyer. Ted Ts'o has continued to be helpful.
|
half is by David Lawyer. Ted Ts'o has continued to be helpful.
|
||||||
|
|
||||||
<sect1> Release Notes
|
|
||||||
<p> 2.00 was a major revision which has removed info on Terminals and
|
|
||||||
Modems from the old Serial-HOWTO and put such info into:
|
|
||||||
<itemize>
|
|
||||||
<item> Text-Terminal-HOWTO
|
|
||||||
<item> Modem-HOWTO
|
|
||||||
</itemize>
|
|
||||||
|
|
||||||
2.01: Added info on Plug-and-Play from Modem-HOWTO and more. Info on
|
|
||||||
setserial and stty has been updated. I still haven't checked out all
|
|
||||||
the info on multiport cards to see if it's up-to-date. The fact that
|
|
||||||
this HOWTO was pieced together from various sources has resulted in a
|
|
||||||
certain lack of integration. This may be improved on in future
|
|
||||||
versions.
|
|
||||||
|
|
||||||
<sect1> New Versions of this Serial-HOWTO
|
<sect1> New Versions of this Serial-HOWTO
|
||||||
<p> New versions of the Serial-HOWTO will be available to
|
<p> New versions of the Serial-HOWTO will be available to
|
||||||
browse and/or download at LDP mirror sites. For a list of mirror
|
browse and/or download at LDP mirror sites. For a list of mirror
|
||||||
|
@ -130,8 +116,7 @@ sites see: <url url="http://metalab.unc.edu/LDP/mirrors.html">.
|
||||||
Various formats are available. If you only want to quickly check the
|
Various formats are available. If you only want to quickly check the
|
||||||
date of the latest version look at <url
|
date of the latest version look at <url
|
||||||
url="http://metalab.unc.edu/LDP/HOWTO/Serial-HOWTO.html"> and compare
|
url="http://metalab.unc.edu/LDP/HOWTO/Serial-HOWTO.html"> and compare
|
||||||
it to this version: v2.07 May 2000 . New in this version is: locking methods, clarity re uart protocol,
|
it to this version: v2.08 June 2000 . New in this version is: /proc/tty, fixed link to Gary's Encyclopedia.
|
||||||
sticky parity.
|
|
||||||
|
|
||||||
<sect1> Related HOWTO's re the Serial Port <label id="related_howtos">
|
<sect1> Related HOWTO's re the Serial Port <label id="related_howtos">
|
||||||
<p> Modems, Text-Terminals, some printers, and other peripherals often
|
<p> Modems, Text-Terminals, some printers, and other peripherals often
|
||||||
|
@ -143,9 +128,12 @@ explained above.
|
||||||
<item><tt>Printing-HOWTO</tt> has info on using a serial printer
|
<item><tt>Printing-HOWTO</tt> has info on using a serial printer
|
||||||
<item><tt>Serial-Programming-HOWTO</tt> helps you write
|
<item><tt>Serial-Programming-HOWTO</tt> helps you write
|
||||||
C programs (or parts of them) that read and write to the serial port
|
C programs (or parts of them) that read and write to the serial port
|
||||||
and/or check/set its state. A new version is expected soon.
|
and/or check/set its state. A new version has been written by Vern
|
||||||
|
Hoxie but not submitted. A copy is at <ref id="vern_" name="Internet">.
|
||||||
<item><tt>Text-Terminal-HOWTO</tt> is about how they work, how to install
|
<item><tt>Text-Terminal-HOWTO</tt> is about how they work, how to install
|
||||||
configure, and repair them.
|
configure, and repair them. It includes a section on "Make a
|
||||||
|
Terminal the Console" which is useful for using a remote terminal to
|
||||||
|
control a server (via the serial port).
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
<sect1>Feedback
|
<sect1>Feedback
|
||||||
|
@ -327,7 +315,8 @@ transmit buffer in main memory and puts them into the small 16-byte
|
||||||
transmit buffer in the hardware.
|
transmit buffer in the hardware.
|
||||||
|
|
||||||
<sect> Serial Port Basics <label id="basics_">
|
<sect> Serial Port Basics <label id="basics_">
|
||||||
<!-- basics.H begin <sect> Serial Port & Modem Basics -->
|
<!-- basics.H begin <sect> Serial Port and Modem Basics
|
||||||
|
or <sect> Serial Port Basics In SS and MM -->
|
||||||
<!-- Change log: Nov. '99: 2 serial drivers concurrently NG
|
<!-- Change log: Nov. '99: 2 serial drivers concurrently NG
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -908,7 +897,7 @@ linux# ./MAKEDEV ttyS17
|
||||||
|
|
||||||
Besides the listing of various brands of multiports found in this
|
Besides the listing of various brands of multiports found in this
|
||||||
HOWTO there is <url
|
HOWTO there is <url
|
||||||
url="http://members.aa.net/~swear/serialcards.html" name="Gary's
|
url="http://members.aa.net/~swear/pedia/serialcards.html" name="Gary's
|
||||||
Encyclopedia - Serial Cards">. It's not as complete, but may have
|
Encyclopedia - Serial Cards">. It's not as complete, but may have
|
||||||
some different links.
|
some different links.
|
||||||
|
|
||||||
|
@ -1185,8 +1174,10 @@ name="http://www.ssc.com/lj/issue14"></tt>.
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
<sect>Configuring the Serial Port
|
<sect>Configuring the Serial Port
|
||||||
<!-- configure.H begin
|
<!-- configure.H begin (in MM, SS)
|
||||||
<sect>Configuring the Serial Port -->
|
<sect>Configuring the Serial Port
|
||||||
|
Change-log:
|
||||||
|
-->
|
||||||
|
|
||||||
<sect1> PCI Bus Support Underway <label id="PCI_">
|
<sect1> PCI Bus Support Underway <label id="PCI_">
|
||||||
<p> The kernel 2.2 serial driver contains no special support for the
|
<p> The kernel 2.2 serial driver contains no special support for the
|
||||||
|
@ -1414,23 +1405,32 @@ that they only show what the device driver thinks. Some people view
|
||||||
certain "files" in the /proc directory and erroneously think that what
|
certain "files" in the /proc directory and erroneously think that what
|
||||||
they see is set in the hardware but "it ain't necessarily so".
|
they see is set in the hardware but "it ain't necessarily so".
|
||||||
|
|
||||||
/proc/ioports will show the IO addresses that the drivers are using.
|
<tt>/proc/ioports</tt> will show the IO addresses that the drivers are using.
|
||||||
/proc/interrupts shows the IRQs that are used by drivers of
|
<tt>/proc/interrupts</tt> shows the IRQs that are used by drivers of
|
||||||
currently running processes (that have devices open). Note that
|
currently running processes (that have devices open). It shows how
|
||||||
in both cases above you are only seeing what the driver thinks and not
|
many interrupts have actually be issued.
|
||||||
necessarily what is actually set in the hardware. /proc/interrupts also
|
<tt>/proc/tty/driver/serial</tt> shows most of the above, plus the
|
||||||
shows how many interrupts have been issued (often thousands) for each
|
number of bytes that have been received and sent (even if the device
|
||||||
device. You can get a clue from this because if you see a large
|
is not now open).
|
||||||
number of interrupts that have been issued it means that there is a
|
|
||||||
piece of hardware somewhere that is using that interrupt. Sometimes a
|
Note that for the IO addresses and IRQ assignments, you are only seeing
|
||||||
showing of just a few interrupts doesn't mean that that interrupt is
|
what the driver thinks and not necessarily what is actually set in the
|
||||||
actually being physically generated by any serial port. Thus if you
|
hardware. The data on the actual number of interrupts issued and
|
||||||
see almost no interrupts for a port that you're trying to use, that
|
bytes processed is real however. If you see a large number of
|
||||||
interrupt might not be set in the hardware and it implies that the
|
interrupts and/or bytes then it probably means that the device is (or
|
||||||
driver is using the wrong interrupt. To view /proc/interrupts to
|
was in the case of bytes) working. If there are no bytes received
|
||||||
check on a program that you're currently running (such as "minicom")
|
(rx:0) but bytes were transmitted (tx:3749 for example), then only one
|
||||||
you need to keep the program running while you view it. To do this,
|
direction of flow is working (or being utilized).
|
||||||
try to jump to a shell without exiting the program.
|
|
||||||
|
Sometimes a showing of just a few interrupts doesn't mean that the
|
||||||
|
interrupt is actually being physically generated by any serial port.
|
||||||
|
Thus if you see almost no interrupts for a port that you're trying to
|
||||||
|
use, that interrupt might not be set in the hardware and it implies
|
||||||
|
that the driver is using the wrong interrupt. To view
|
||||||
|
/proc/interrupts to check on a program that you're currently running
|
||||||
|
(such as "minicom") you need to keep the program running while you
|
||||||
|
view it. To do this, try to jump to a shell without exiting the
|
||||||
|
program.
|
||||||
|
|
||||||
<sect2> What is set in my serial port hardware ? <label
|
<sect2> What is set in my serial port hardware ? <label
|
||||||
id="io-irq_in_hdw"
|
id="io-irq_in_hdw"
|
||||||
|
@ -1574,18 +1574,20 @@ conflicts.
|
||||||
<sect1> Choosing Addresses --Video card conflict with ttyS3
|
<sect1> Choosing Addresses --Video card conflict with ttyS3
|
||||||
|
|
||||||
<p> The IO address of the IBM 8514 video board (and others like it) is
|
<p> The IO address of the IBM 8514 video board (and others like it) is
|
||||||
allegedly 0x?2e8 where ? is 2, 4, 8, or 9. This may conflict (but
|
allegedly 0x?2e8 where ? is 2, 4, 8, or 9. This may conflict with the
|
||||||
shouldn't if the serial port is well designed) with the IO address of
|
IO address of <tt/ttyS3/ at 0x02e8. Your may think that this shouldn't
|
||||||
<tt/ttyS3/ at 0x02e8 if the serial port ignores the leading 0 hex
|
happen since the addresses are different in the high order digit (the
|
||||||
digit (many do). That is bad news if you try to use <tt/ttyS3/ at
|
leading 0 in 02e8). You're right, but a poorly designed serial port
|
||||||
this IO address.
|
may ignore the high order digit and respond to any address that ends
|
||||||
|
in 2e8. That is bad news if you try to use <tt/ttyS3/ at this IO
|
||||||
|
address.
|
||||||
|
|
||||||
In most cases you should use the default addresses if feasible.
|
In most cases you should use the default addresses if feasible.
|
||||||
Addresses shown represent the first address of an 8-byte range. For
|
Addresses shown represent the first address of an 8-byte range. For
|
||||||
example 3f8 is really the range 3f8-3ff. Each serial device (as well
|
example 3f8 is really the range 3f8-3ff. Each serial device (as well
|
||||||
as other types of devices that use IO addresses) needs its own unique
|
as other types of devices that use IO addresses) needs its own unique
|
||||||
address range. There should be no overlaps (conflicts). Here are the
|
address range. There should be no overlaps (conflicts). Here are the
|
||||||
default addresses for the serial ports:
|
default addresses for commonly used serial ports:
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
ttyS0 address 0x3f8
|
ttyS0 address 0x3f8
|
||||||
|
@ -1594,6 +1596,13 @@ ttyS2 address 0x3e8
|
||||||
ttyS3 address 0x2e8
|
ttyS3 address 0x2e8
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
|
Suppose there is an address conflict (as reported by <tt>setserial -g
|
||||||
|
/dev/ttyS*</tt>) between a real serial port and another port which
|
||||||
|
does not physically exist (and shows UART: unknown). Such a conflict
|
||||||
|
shouldn't cause problems but it sometimes does in older kernels. To
|
||||||
|
avoid this problem don't permit such address conflicts or delete
|
||||||
|
/dev/ttyS? if it doesn't physically exist.
|
||||||
|
|
||||||
<sect1> Set IO Address & IRQ in the hardware (mostly for PnP)
|
<sect1> Set IO Address & IRQ in the hardware (mostly for PnP)
|
||||||
<label id="io-irq_methods">
|
<label id="io-irq_methods">
|
||||||
|
|
||||||
|
@ -1817,12 +1826,14 @@ the use of getty with directly connected terminals now found in
|
||||||
Text-Terminal-HOWTO.
|
Text-Terminal-HOWTO.
|
||||||
|
|
||||||
<sect1> Serial Monitoring/Diagnostics Programs <label id="serial_mon">
|
<sect1> Serial Monitoring/Diagnostics Programs <label id="serial_mon">
|
||||||
<p> A few Linux programs will monitor various modem control lines and
|
<p> A few Linux programs (and one "file") will monitor various modem
|
||||||
indicate if they are positive (1 or green) or negative (0 or red).
|
control lines and indicate if they are positive (1 or green) or
|
||||||
|
negative (0 or red).
|
||||||
<itemize>
|
<itemize>
|
||||||
|
<item> The "file": /proc/tty/driver/serial lists those that are positive
|
||||||
<item> modemstat (Only works correctly on Linux PC consoles. Status
|
<item> modemstat (Only works correctly on Linux PC consoles. Status
|
||||||
monitored in a tiny window. Color-coded and compact. Must kill
|
monitored in a tiny window. Color-coded and compact. Must kill
|
||||||
process to quit.)
|
it (a process) to quit.
|
||||||
<item> statserial (Info displayed on entire screen)
|
<item> statserial (Info displayed on entire screen)
|
||||||
<item> serialmon (Doesn't monitor RTS, CTS, DSR but logs other
|
<item> serialmon (Doesn't monitor RTS, CTS, DSR but logs other
|
||||||
functions)
|
functions)
|
||||||
|
@ -1842,7 +1853,10 @@ for the serial port.
|
||||||
|
|
||||||
<sect1>What is Setserial ? <label id="set_serial">
|
<sect1>What is Setserial ? <label id="set_serial">
|
||||||
<!-- setserial.H begin (in MM TT SS)
|
<!-- setserial.H begin (in MM TT SS)
|
||||||
<sect1>What is Setserial ? <label id="set_serial"> -->
|
<sect1>What is Setserial ? <label id="set_serial">
|
||||||
|
Change Log:
|
||||||
|
May 2000: <sect2> IRQs near end ttyS0 -> ttyS1 + clarity
|
||||||
|
-->
|
||||||
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
||||||
are some minor differences, depending on which HOWTO it appears in.
|
are some minor differences, depending on which HOWTO it appears in.
|
||||||
|
|
||||||
|
@ -1854,8 +1868,8 @@ set in the port's hardware, what type of UART you have, etc. It can
|
||||||
also show how the driver is currently set. In addition, it can be
|
also show how the driver is currently set. In addition, it can be
|
||||||
made to probe the hardware and try to determine the UART type and IRQ,
|
made to probe the hardware and try to determine the UART type and IRQ,
|
||||||
but this has severe limitations. See <ref id="probing_ss"
|
but this has severe limitations. See <ref id="probing_ss"
|
||||||
name="Probing">. Note that it can't set the IRQ, etc in the hardware
|
name="Probing">. Note that it can't set the IRQ or the port address
|
||||||
of PnP serial ports.
|
in the hardware of PnP serial ports.
|
||||||
|
|
||||||
If you only have one or two built-in serial ports, they will usually
|
If you only have one or two built-in serial ports, they will usually
|
||||||
get set up correctly without using setserial. Otherwise (or if there
|
get set up correctly without using setserial. Otherwise (or if there
|
||||||
|
@ -1872,10 +1886,10 @@ equivalent was compiled into your kernel). If you should (for some
|
||||||
reason) unload the serial module later on, the changes previously made
|
reason) unload the serial module later on, the changes previously made
|
||||||
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
||||||
must be run again to reestablish them. In addition to running via a
|
must be run again to reestablish them. In addition to running via a
|
||||||
start-up script, something akin to <tt/setserial/ also runs when the
|
start-up script, something akin to <tt/setserial/ also runs earlier
|
||||||
serial module is loaded (or the like). Thus when you watch the
|
when the serial module is loaded (or the like). Thus when you watch
|
||||||
start-up messages on the screen it may look like it ran twice, and in
|
the start-up messages on the screen it may look like it ran twice, and
|
||||||
fact it has.
|
in fact it has.
|
||||||
|
|
||||||
Setserial can set the time that the port will keep operating after
|
Setserial can set the time that the port will keep operating after
|
||||||
it's closed (in order to output any characters still in its buffer in
|
it's closed (in order to output any characters still in its buffer in
|
||||||
|
@ -1900,7 +1914,14 @@ Note that setserial calls an IO address a "port". If you type:
|
||||||
setserial -g /dev/ttyS*
|
setserial -g /dev/ttyS*
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
you'll see some info about how that device driver is configured for
|
you'll see some info about how that device driver is configured for
|
||||||
your ports. Add a -a to the option -g to see more info although few
|
your ports. Note that where it says <tt>"UART: unknown"</tt> it
|
||||||
|
probably means that no uart exists. In other words you probably have
|
||||||
|
no such serial port and the other info shown about the port is
|
||||||
|
meaningless and should be ignored. If you really do have such a
|
||||||
|
serial port, setserial doesn't recognize it and that needs to be
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
If you add -a to the option -g you will see more info although few
|
||||||
people need to deal with (or understand) this additional info since
|
people need to deal with (or understand) this additional info since
|
||||||
the default settings you see usually work fine. In normal cases the
|
the default settings you see usually work fine. In normal cases the
|
||||||
hardware is set up the same way as "setserial" reports, but if you are
|
hardware is set up the same way as "setserial" reports, but if you are
|
||||||
|
@ -1909,7 +1930,11 @@ In fact, you can run "setserial" and assign a purely fictitious I/O
|
||||||
port address, any IRQ, and whatever uart type you would like to have.
|
port address, any IRQ, and whatever uart type you would like to have.
|
||||||
Then the next time you type "setserial ..." it will display these
|
Then the next time you type "setserial ..." it will display these
|
||||||
bogus values without complaint. Of course the serial port driver will
|
bogus values without complaint. Of course the serial port driver will
|
||||||
not work correctly (if at all) with such bogus values.
|
not work correctly (if at all) if you attempt to use such a port.
|
||||||
|
Thus when giving parameters to "setserial" anything goes. It gives
|
||||||
|
you no warning if what you tell it is incorrect and will allow you to
|
||||||
|
create conflicts in IRQs and I/O port addresses that will have
|
||||||
|
disastrous results later on.
|
||||||
|
|
||||||
While assignments made by setserial are lost when the PC is powered
|
While assignments made by setserial are lost when the PC is powered
|
||||||
off, a configuration file may restore them (or a previous
|
off, a configuration file may restore them (or a previous
|
||||||
|
@ -2122,10 +2147,11 @@ Debian labeled obsolete files with "...pre-2.15".
|
||||||
|
|
||||||
<sect2> IRQs
|
<sect2> IRQs
|
||||||
|
|
||||||
<p> By default, both ttyS0 and ttyS2 share IRQ 4, while ttyS0 and
|
<p> By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
|
||||||
ttyS3 share IRQ 3. But sharing serial interrupts is not permitted
|
ttyS3 share IRQ 3. But actually sharing serial interrupts (using them
|
||||||
unless you: 1. have kernel 2.2 or better, and 2. you've complied in
|
in running programs) is not permitted unless you: 1. have kernel 2.2
|
||||||
support for this, and 3. your serial hardware supports it. See
|
or better, and 2. you've complied in support for this, and 3. your
|
||||||
|
serial hardware supports it. See
|
||||||
|
|
||||||
<ref id="int_share-2.2" name="Interrupt sharing and Kernels 2.2+">
|
<ref id="int_share-2.2" name="Interrupt sharing and Kernels 2.2+">
|
||||||
|
|
||||||
|
@ -2523,7 +2549,6 @@ available via FTP, if they didn't come with your distribution.
|
||||||
portable, scriptable, serial and TCP/IP communications including file
|
portable, scriptable, serial and TCP/IP communications including file
|
||||||
transfer, character-set translation, and zmodem support
|
transfer, character-set translation, and zmodem support
|
||||||
<item><tt/minicom/ - <tt/telix/-like communications program
|
<item><tt/minicom/ - <tt/telix/-like communications program
|
||||||
<item><tt/procomm/ - <tt/procomm/-like communications program with zmodem
|
|
||||||
<item><tt/seyon/ - X based communication program
|
<item><tt/seyon/ - X based communication program
|
||||||
<item><tt/xc/ - xcomm communication package
|
<item><tt/xc/ - xcomm communication package
|
||||||
|
|
||||||
|
@ -2666,8 +2691,10 @@ id="serial_mon" name="Serial Monitoring/Diagnostics">
|
||||||
<!-- currently in <sect>Troubleshooting -->
|
<!-- currently in <sect>Troubleshooting -->
|
||||||
<!-- troubleshooting.H begin
|
<!-- troubleshooting.H begin
|
||||||
Change Log:
|
Change Log:
|
||||||
Apr. 00: 2 ports on same address -->
|
Apr. 00: 2 ports on same address
|
||||||
<sect1> The following subsections are in both the Serial and Modem HOWTOs:
|
May 00: address conflict
|
||||||
|
-->
|
||||||
|
<sect1>(The following subsections are in both the Serial and Modem HOWTOs)
|
||||||
|
|
||||||
<sect1> My Serial Port is Physically There but Can't be Found
|
<sect1> My Serial Port is Physically There but Can't be Found
|
||||||
<label id="cant_find_port">
|
<label id="cant_find_port">
|
||||||
|
@ -2675,25 +2702,28 @@ Apr. 00: 2 ports on same address -->
|
||||||
serial port that it's on has been found. If it doesn't work at all, then
|
serial port that it's on has been found. If it doesn't work at all, then
|
||||||
you need to make sure your serial port can be found.
|
you need to make sure your serial port can be found.
|
||||||
|
|
||||||
Check the BIOS menus and BIOS messages. For the PCI bus use lspci.
|
Check the BIOS menus and BIOS messages. For the PCI bus use lspci or
|
||||||
If it's an ISA bus PnP serial port, try "pnpdump --dumpregs" and/or
|
scanpci. If it's an ISA bus PnP serial port, try "pnpdump --dumpregs"
|
||||||
see Plug-and-Play-HOWTO. Using "scanport" will scan all ISA bus ports
|
and/or see Plug-and-Play-HOWTO. Using "scanport" will scan all ISA
|
||||||
and may discover an unknown port that could be a serial port (but it
|
bus ports and may discover an unknown port that could be a serial port
|
||||||
doesn't probe the port). It could hang your PC. You may try probing
|
(but it doesn't probe the port). It could hang your PC. You may try
|
||||||
with setserial. See <ref id="probing_ss" name="Probing">. If
|
probing with setserial. See <ref id="probing_ss" name="Probing">. If
|
||||||
nothing seems to get thru the port it may be accessible but have a bad
|
nothing seems to get thru the port it may be accessible but have a bad
|
||||||
interrupt. See <ref id="slow_" name="Extremely Slow: Text appears on
|
interrupt. See <ref id="slow_" name="Extremely Slow: Text appears on
|
||||||
the screen slowly after long delays">.
|
the screen slowly after long delays">. Use <tt>setserial -g</tt> to
|
||||||
|
see what the serial driver thinks and check for IRQ and I0 address
|
||||||
|
conflicts. Even if you see no conflicts the driver may have incorrect
|
||||||
|
information and conflicts may still exist.
|
||||||
|
|
||||||
If two ports have the same IO address then probing it will erroneously
|
If two ports have the same IO address then probing it will erroneously
|
||||||
indicate only one port. Plug-and-play detection will find both ports
|
indicate only one port. Plug-and-play detection will find both ports
|
||||||
so this should only be a problem if at least one port is not
|
so this should only be a problem if at least one port is not
|
||||||
plug-and-play. All sorts of errors may be reported/observed for
|
plug-and-play. All sorts of errors may be reported/observed for
|
||||||
devices on "sharing" a port but the fact that there are two devices on
|
devices illegally "sharing" a port but the fact that there are two
|
||||||
the same a port doesn't seem to get detected (except hopefully by
|
devices on the same a port doesn't seem to get detected (except
|
||||||
you). If the IRQs are different then probing for IRQs with setserial
|
hopefully by you). In the above case, if the IRQs are different then
|
||||||
might "detect" this situation by failing to detect an IRQ. See <ref
|
probing for IRQs with setserial might "detect" this situation by
|
||||||
id="probing_ss" name="Probing">.
|
failing to detect any IRQ. See <ref id="probing_ss" name="Probing">.
|
||||||
|
|
||||||
<sect1> Extremely Slow: Text appears on the screen slowly after long delays
|
<sect1> Extremely Slow: Text appears on the screen slowly after long delays
|
||||||
<label id="slow_">
|
<label id="slow_">
|
||||||
|
@ -2841,11 +2871,15 @@ start the second device (without quitting the first device) you get a
|
||||||
keeps track of what IRQs are actually in use and conflicts don't
|
keeps track of what IRQs are actually in use and conflicts don't
|
||||||
happen unless the devices are in use (open).
|
happen unless the devices are in use (open).
|
||||||
|
|
||||||
There are two cases. There may be a real interrupt conflict that is
|
There are two possible cases when you see this message:
|
||||||
being avoided. But if setserial has it wrong, there may be no reason
|
<enum>
|
||||||
why <tt/ttyS2/ can't be used, except that setserial erroneously predicts a
|
<item> There may be a real interrupt conflict that is being avoided.
|
||||||
conflict. What you need to do is to find the interrupt setserial
|
<item> Setserial has it wrong and the only reason <tt/ttyS2/ can't be
|
||||||
thinks <tt/ttyS2/ is using. This is easier said than done since you can't
|
used is that setserial erroneously predicts a conflict.
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
What you need to do is to find the interrupt setserial thinks
|
||||||
|
<tt/ttyS2/ is using. This is easier said than done since you can't
|
||||||
use the "setserial" command for <tt/ttyS2/ since the IRQ for ttyS2 is
|
use the "setserial" command for <tt/ttyS2/ since the IRQ for ttyS2 is
|
||||||
supposedly "busy" and you will get the same "... busy" error message.
|
supposedly "busy" and you will get the same "... busy" error message.
|
||||||
To fix this either reboot or: exit or gracefully kill all likely
|
To fix this either reboot or: exit or gracefully kill all likely
|
||||||
|
@ -2855,14 +2889,14 @@ messages for the serial ports. 2. Hope that the file that runs
|
||||||
again.
|
again.
|
||||||
|
|
||||||
If you think you know what IRQ <tt/ttyS2/ is using then you may look
|
If you think you know what IRQ <tt/ttyS2/ is using then you may look
|
||||||
at /proc/interrupts to find what else is currently using this IRQ.
|
at /proc/interrupts to find what else (besides another serial port) is
|
||||||
You might also want to double check that any suspicious IRQs shown
|
currently using this IRQ. You might also want to double check that
|
||||||
here (and by "setserial") are correct (the same as set in the
|
any suspicious IRQs shown here (and by "setserial") are correct (the
|
||||||
hardware). A way to test whether or not it is a potential interrupt
|
same as set in the hardware). A way to test whether or not it is a
|
||||||
conflict is to set the IRQ to 0 (polling) using "setserial". Then if
|
potential interrupt conflict is to set the IRQ to 0 (polling) using
|
||||||
the busy message goes away, it was likely a potential interrupt
|
"setserial". Then if the busy message goes away, it was likely a
|
||||||
conflcit. It's not a good idea to leave it permanently set at 0 since
|
potential interrupt conflcit. It's not a good idea to leave it
|
||||||
more CPU resources will be used.
|
permanently set at 0 since more CPU resources will be used.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3726,7 +3760,7 @@ Monitoring/Diagnostics">
|
||||||
of mailing lists.
|
of mailing lists.
|
||||||
|
|
||||||
<sect1> Internet
|
<sect1> Internet
|
||||||
<p>
|
<p> <label id="vern_">
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> <url url="ftp://scicom.alphacdc.com/pub/linux" name="Serial
|
<item> <url url="ftp://scicom.alphacdc.com/pub/linux" name="Serial
|
||||||
Suite"> by Vern Hoxie is a collection of blurbs about the care and
|
Suite"> by Vern Hoxie is a collection of blurbs about the care and
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
<title> Text-Terminal-HOWTO </title>
|
<title> Text-Terminal-HOWTO </title>
|
||||||
<author> David S. Lawyer <url url="mailto:dave@lafn.org">
|
<author> David S. Lawyer <url url="mailto:dave@lafn.org">
|
||||||
|
|
||||||
<date> v1.12, May 2000
|
<date> v1.13, June 2000
|
||||||
<!--
|
<!--
|
||||||
Change log:
|
Change log:
|
||||||
v1.12 lilo.conf for serial console, reset -> setterm -reset (due to
|
v1.13 killing getty permanently, reset bug+, man lilo
|
||||||
|
v1.12 May 2000 lilo.conf for serial console, reset -> setterm -reset (due to
|
||||||
bug), scrolling region 25-line problem, sharing+, JavaStation-HOWTO.
|
bug), scrolling region 25-line problem, sharing+, JavaStation-HOWTO.
|
||||||
v1.11 2 March 2000 New link to vtprint, links to char-sets +, typos
|
v1.11 2 March 2000 New link to vtprint, links to char-sets +, typos
|
||||||
v1.10 Modem status interrupts work, Rubini said no. DoubleVision.
|
v1.10 Modem status interrupts work, Rubini said no. DoubleVision.
|
||||||
|
@ -138,10 +139,8 @@ sites see: <url url="http://linuxdoc.org/mirrors.html">.
|
||||||
Various formats are available. If you only want to quickly check the
|
Various formats are available. If you only want to quickly check the
|
||||||
date of the latest version look at <url
|
date of the latest version look at <url
|
||||||
url="http://linuxdoc.org/HOWTO/Text-Terminal-HOWTO.html">. The
|
url="http://linuxdoc.org/HOWTO/Text-Terminal-HOWTO.html">. The
|
||||||
version your are currently reading is: v1.12, May 2000 . New in this version
|
version your are currently reading is: v1.13, June 2000 . New in this version
|
||||||
is: lilo.conf for serial console, reset -> setterm -reset
|
is: killing getty permanently, reset bug+, man lilo. .
|
||||||
(due to bug), scrolling region 25-line problem, sharing+,
|
|
||||||
JavaStation-HOWTO .
|
|
||||||
|
|
||||||
<sect1> Related HOWTO's <label id="related_howtos">
|
<sect1> Related HOWTO's <label id="related_howtos">
|
||||||
<p> Go to the websites shown above to get these.
|
<p> Go to the websites shown above to get these.
|
||||||
|
@ -1893,16 +1892,15 @@ everything works OK because each inline coupler is also a null-modem
|
||||||
adapter. Two null-modem devices in series result in a straight-thru
|
adapter. Two null-modem devices in series result in a straight-thru
|
||||||
connection.
|
connection.
|
||||||
|
|
||||||
RJ45 and RJ48 are 8-conductor (or 10-conductor for some computer
|
RJ45 and RJ48 are usually 8-conductor modular telephone plugs.
|
||||||
applications) telephone plugs. The 10-conductor ones are allegedly
|
However some are 10-conductor and are allegedly wider and will not
|
||||||
wider and will not mate with 8-conductor ones. They are used for both
|
mate with 8-conductor ones. They are used for both flat telephone
|
||||||
flat telephone cable and round twisted pair cable. The cable end of
|
cable and round twisted pair cable. The cable end of the connector
|
||||||
the connector may be different for round and flat cable and both RJ45
|
may be different for round and flat cable and both RJ45 and RJ48 may
|
||||||
and RJ48 may be 8 or 10 conductor so make sure you get the right one.
|
be 8 or 10 conductor so make sure you get the right one. RJ48 has an
|
||||||
RJ48 has an extra tab so that a RJ48 plug will not push into a RJ45
|
extra tab so that a RJ48 plug will not push into a RJ45 jack (but a
|
||||||
jack (but a RJ45 plug will mate with a RJ48 jack). They're used on
|
RJ45 plug will mate with a RJ48 jack). They're used on some multiport
|
||||||
some multiport serial cards and networks. Heres the pin numbers for
|
serial cards and networks. Heres the pin numbers for an 8-conductor:
|
||||||
an 8-conductor:
|
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
Plug Jack
|
Plug Jack
|
||||||
|
@ -2998,7 +2996,10 @@ which runs <tt/stty/ since on seldom need it.
|
||||||
|
|
||||||
<sect1> Setserial <label id="set_serial">
|
<sect1> Setserial <label id="set_serial">
|
||||||
<!-- setserial.H begin (in MM TT SS)
|
<!-- setserial.H begin (in MM TT SS)
|
||||||
<sect1>What is Setserial ? <label id="set_serial"> -->
|
<sect1>What is Setserial ? <label id="set_serial">
|
||||||
|
Change Log:
|
||||||
|
May 2000: <sect2> IRQs near end ttyS0 -> ttyS1 + clarity
|
||||||
|
-->
|
||||||
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
<p> This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal. There
|
||||||
are some minor differences, depending on which HOWTO it appears in.
|
are some minor differences, depending on which HOWTO it appears in.
|
||||||
|
|
||||||
|
@ -3010,8 +3011,8 @@ set in the port's hardware, what type of UART you have, etc. It can
|
||||||
also show how the driver is currently set. In addition, it can be
|
also show how the driver is currently set. In addition, it can be
|
||||||
made to probe the hardware and try to determine the UART type and IRQ,
|
made to probe the hardware and try to determine the UART type and IRQ,
|
||||||
but this has severe limitations. See <ref id="probing_ss"
|
but this has severe limitations. See <ref id="probing_ss"
|
||||||
name="Probing">. Note that it can't set the IRQ, etc in the hardware
|
name="Probing">. Note that it can't set the IRQ or the port address
|
||||||
of PnP serial ports.
|
in the hardware of PnP serial ports.
|
||||||
|
|
||||||
If you only have one or two built-in serial ports, they will usually
|
If you only have one or two built-in serial ports, they will usually
|
||||||
get set up correctly without using setserial. Otherwise (or if there
|
get set up correctly without using setserial. Otherwise (or if there
|
||||||
|
@ -3028,10 +3029,10 @@ equivalent was compiled into your kernel). If you should (for some
|
||||||
reason) unload the serial module later on, the changes previously made
|
reason) unload the serial module later on, the changes previously made
|
||||||
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
by <tt/setserial/ will be forgotten by the kernel. So <tt/setserial/
|
||||||
must be run again to reestablish them. In addition to running via a
|
must be run again to reestablish them. In addition to running via a
|
||||||
start-up script, something akin to <tt/setserial/ also runs when the
|
start-up script, something akin to <tt/setserial/ also runs earlier
|
||||||
serial module is loaded (or the like). Thus when you watch the
|
when the serial module is loaded (or the like). Thus when you watch
|
||||||
start-up messages on the screen it may look like it ran twice, and in
|
the start-up messages on the screen it may look like it ran twice, and
|
||||||
fact it has.
|
in fact it has.
|
||||||
|
|
||||||
Setserial can set the time that the port will keep operating after
|
Setserial can set the time that the port will keep operating after
|
||||||
it's closed (in order to output any characters still in its buffer in
|
it's closed (in order to output any characters still in its buffer in
|
||||||
|
@ -3057,7 +3058,14 @@ Note that setserial calls an IO address a "port". If you type:
|
||||||
setserial -g /dev/ttyS*
|
setserial -g /dev/ttyS*
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
you'll see some info about how that device driver is configured for
|
you'll see some info about how that device driver is configured for
|
||||||
your ports. Add a -a to the option -g to see more info although few
|
your ports. Note that where it says <tt>"UART: unknown"</tt> it
|
||||||
|
probably means that no uart exists. In other words you probably have
|
||||||
|
no such serial port and the other info shown about the port is
|
||||||
|
meaningless and should be ignored. If you really do have such a
|
||||||
|
serial port, setserial doesn't recognize it and that needs to be
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
If you add -a to the option -g you will see more info although few
|
||||||
people need to deal with (or understand) this additional info since
|
people need to deal with (or understand) this additional info since
|
||||||
the default settings you see usually work fine. In normal cases the
|
the default settings you see usually work fine. In normal cases the
|
||||||
hardware is set up the same way as "setserial" reports, but if you are
|
hardware is set up the same way as "setserial" reports, but if you are
|
||||||
|
@ -3066,7 +3074,11 @@ In fact, you can run "setserial" and assign a purely fictitious I/O
|
||||||
port address, any IRQ, and whatever uart type you would like to have.
|
port address, any IRQ, and whatever uart type you would like to have.
|
||||||
Then the next time you type "setserial ..." it will display these
|
Then the next time you type "setserial ..." it will display these
|
||||||
bogus values without complaint. Of course the serial port driver will
|
bogus values without complaint. Of course the serial port driver will
|
||||||
not work correctly (if at all) with such bogus values.
|
not work correctly (if at all) if you attempt to use such a port.
|
||||||
|
Thus when giving parameters to "setserial" anything goes. It gives
|
||||||
|
you no warning if what you tell it is incorrect and will allow you to
|
||||||
|
create conflicts in IRQs and I/O port addresses that will have
|
||||||
|
disastrous results later on.
|
||||||
|
|
||||||
While assignments made by setserial are lost when the PC is powered
|
While assignments made by setserial are lost when the PC is powered
|
||||||
off, a configuration file may restore them (or a previous
|
off, a configuration file may restore them (or a previous
|
||||||
|
@ -3279,10 +3291,11 @@ Debian labeled obsolete files with "...pre-2.15".
|
||||||
|
|
||||||
<sect2> IRQs
|
<sect2> IRQs
|
||||||
|
|
||||||
<p> By default, both ttyS0 and ttyS2 share IRQ 4, while ttyS0 and
|
<p> By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
|
||||||
ttyS3 share IRQ 3. But sharing serial interrupts is not permitted
|
ttyS3 share IRQ 3. But actually sharing serial interrupts (using them
|
||||||
unless you: 1. have kernel 2.2 or better, and 2. you've complied in
|
in running programs) is not permitted unless you: 1. have kernel 2.2
|
||||||
support for this, and 3. your serial hardware supports it. See
|
or better, and 2. you've complied in support for this, and 3. your
|
||||||
|
serial hardware supports it. See
|
||||||
Serial-HOWTO: Interrupt sharing and Kernels 2.2+.
|
Serial-HOWTO: Interrupt sharing and Kernels 2.2+.
|
||||||
|
|
||||||
|
|
||||||
|
@ -3837,7 +3850,8 @@ commands commonly used at the terminal are:
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> clear (to clear the screen)
|
<item> clear (to clear the screen)
|
||||||
<item> setterm -reset (to reset the terminal)
|
<item> reset (to reset the terminal
|
||||||
|
<item> setterm -reset (alternative for "reset" in case of bug)
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
<sect1> Starting Up the Terminal
|
<sect1> Starting Up the Terminal
|
||||||
|
@ -3948,7 +3962,7 @@ leave some temporary files lying around as well as a corrupted
|
||||||
interface. Killing the login shell should result in a startup of
|
interface. Killing the login shell should result in a startup of
|
||||||
getty with a new login prompt.
|
getty with a new login prompt.
|
||||||
|
|
||||||
<label id="ctrl-s">
|
<label id="ctrl_s">
|
||||||
People new to Linux may unintentionally press Ctrl-S (^S) (or the "No
|
People new to Linux may unintentionally press Ctrl-S (^S) (or the "No
|
||||||
Scroll" key) which mysteriously freezes the screen (although that is
|
Scroll" key) which mysteriously freezes the screen (although that is
|
||||||
what this key is supposed to do if you use software flow-control). To
|
what this key is supposed to do if you use software flow-control). To
|
||||||
|
@ -3962,23 +3976,29 @@ using hardware flow-control is to prevent such freezes.
|
||||||
<p> This includes the case of a "frozen display" = "hung terminal" of
|
<p> This includes the case of a "frozen display" = "hung terminal" of
|
||||||
the previous section.
|
the previous section.
|
||||||
|
|
||||||
<sect2> Symptoms
|
<sect2> Symptoms and Some Fixes <label id="symptoms_">
|
||||||
<p> When the display doesn't look right, or when what you type doesn't
|
<p> When the display doesn't look right, or when what you type doesn't
|
||||||
display correctly (if at all), or nothing happens when you type a
|
display correctly (if at all), or nothing happens when you type a
|
||||||
command, you may have a corrupted terminal interface. In rare cases
|
command, you may have a corrupted terminal interface. In rare cases
|
||||||
when the serial port hardware gets itself corrupted, the only fix may
|
when the serial port hardware gets itself corrupted, the only fix may
|
||||||
be to cycle power (turn off the PC and reboot). The corruption may be
|
be to cycle power (turn off the PC and reboot). Sometimes logging in
|
||||||
due to things such as bug in the program you're using, a hardware
|
again will solve the problem. To do this kill the shell process
|
||||||
failure (including an obscure hardware defect that you can normally
|
running on the terminal (or kill getty if it's running). You do this
|
||||||
live with), or possibly an incorrect configuration. If everything was
|
from another terminal. Once killed, a new getty process respawns
|
||||||
working normally but it suddenly goes bad, it may be that the
|
which hopefully will end the corruption. Recycling power (or
|
||||||
interface got corrupted by something you did. Three mistakes you
|
resetting) for the terminal may help too.
|
||||||
might have made to corrupt the interface are:
|
|
||||||
|
The corruption may be due to things such as bug in the program you're
|
||||||
|
using, a hardware failure (including an obscure hardware defect that
|
||||||
|
you can normally live with), or possibly an incorrect configuration.
|
||||||
|
If everything was working normally but it suddenly goes bad, it may be
|
||||||
|
that the interface got corrupted by something you did. Three mistakes
|
||||||
|
you might have made to corrupt the interface are:
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item> <ref id="sent_bin" name="Sent Terminal Binary">
|
<item> <ref id="sent_bin" name="Sent Terminal Binary">
|
||||||
<item> <ref id="abnormal_exit" name="Abnormally Exited a Program">
|
<item> <ref id="abnormal_exit" name="Abnormally Exited a Program">
|
||||||
<item> <ref id="ctrl-s" name="Typed ctrl-S by mistake">
|
<item> <ref id="ctrl_s" name="Typed ctrl-S by mistake">
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
<sect2> Sent Terminal Binary Characters <label id="sent_bin">
|
<sect2> Sent Terminal Binary Characters <label id="sent_bin">
|
||||||
|
@ -3998,17 +4018,28 @@ a remote computer may send binary to your screen. There are numerous
|
||||||
other ways it can happen so be prepared for it. Even a supposed ASCII
|
other ways it can happen so be prepared for it. Even a supposed ASCII
|
||||||
file may contain unwanted control codes.
|
file may contain unwanted control codes.
|
||||||
|
|
||||||
To fix this problem reset the terminal. You may try typing "setterm
|
To fix this problem reset the terminal. Type either just "reset" (may
|
||||||
-reset" (although you may not be able to see what you're typing).
|
be broken) or "setterm -reset" (followed by a <return> of
|
||||||
This will send the reset string from the terminfo entry to the
|
course). You may not be able to see what you're typing. This will
|
||||||
terminal. If the correct set-up has been saved inside the terminal,
|
send the reset string from the terminfo entry to the terminal. As an
|
||||||
then pressing a special key(s) (perhaps in setup mode) may restore
|
alternative to this, if the correct set-up has been saved inside the
|
||||||
this setting. Then you might still need to use "tset" to send the
|
terminal then pressing a special key(s) (perhaps in setup mode) may
|
||||||
init string if you use it to set up your terminal. Note that the
|
restore the settings. Then you might still need to use "tset" to send
|
||||||
"reset" command appears to be broken for terminals that have been set
|
the init string if you use it to set up your terminal.
|
||||||
to "clocal" with stty or the like. I've substituted "setterm -reset"
|
|
||||||
for it and submitted a bug report in Mar. 2000.
|
|
||||||
|
|
||||||
|
Note that the "reset" command appears to be broken for terminals that
|
||||||
|
need "clocal" set since "reset" seems to unset "clocal". In this case
|
||||||
|
instead of fixing the problem, "reset" only compounds it by disabling
|
||||||
|
communication between the terminal and computer. You will likely need
|
||||||
|
to log in again and hope the getty sets "clocal". If you see a login
|
||||||
|
prompt without asking for it, you're in luck. Otherwise see <ref
|
||||||
|
id="symptoms_" name="Symptoms and Some Fixes"> for how to get a login
|
||||||
|
prompt. You should try out "reset" before you need it and use
|
||||||
|
"setterm -reset" if "reset" logs you out or otherwise doesn't work
|
||||||
|
right. I submitted a bug report in Mar. 2000 so "reset" could be
|
||||||
|
fixed by now.
|
||||||
|
|
||||||
|
<ref id="symptoms_" name="Symptoms and Some Fixes">
|
||||||
<sect2> Abnormally Exited a Program <label id="abnormal_exit">
|
<sect2> Abnormally Exited a Program <label id="abnormal_exit">
|
||||||
<p> Large application programs (such as editors) often use the stty
|
<p> Large application programs (such as editors) often use the stty
|
||||||
command (or the like) in their code to temporarily change the stty
|
command (or the like) in their code to temporarily change the stty
|
||||||
|
@ -4195,16 +4226,19 @@ file that runs each time you login or start up the computer.
|
||||||
system are normally only sent to the console (the PC monitor). Some
|
system are normally only sent to the console (the PC monitor). Some
|
||||||
of the messages sent to the console at boot-time may also be seen on
|
of the messages sent to the console at boot-time may also be seen on
|
||||||
any terminal after the boot succeeds by typing the command: dmesg. If
|
any terminal after the boot succeeds by typing the command: dmesg. If
|
||||||
the boot fails this will not be of any use. It's possible to modify
|
the boot failed this will not be of any use since the terminal can't
|
||||||
the Linux kernel so as to make a terminal serve as the console and
|
work without an operating system. It's possible to modify the Linux
|
||||||
receive all the messages from Linux intended for the console.
|
kernel so as to make a terminal serve as the console and receive all
|
||||||
Unfortunately, the messages from the BIOS (which display on the
|
the messages from Linux intended for the console. Unfortunately, the
|
||||||
monitor when a PC is first started) will not display on this terminal.
|
messages from the BIOS (which display on the monitor when a PC is
|
||||||
|
first started) will not display on this terminal (but still display on
|
||||||
|
the monitor).
|
||||||
|
|
||||||
Some people do this when they run a PC without a monitor or keyboard.
|
Some people do this when they run a PC without a monitor or keyboard.
|
||||||
Normally a PC will not start up without a keyboard and monitor but
|
Normally, a PC will not start up without a keyboard and video card but
|
||||||
some BIOSs permit one to do it. You will likely need to set this up
|
some BIOSs permit it. If you are lucky enough to have such a BIOS
|
||||||
in the BIOS using the CMOS menus when you start your PC.
|
that supports "console re-direct" you will likely then need to setup
|
||||||
|
the BIOS using the CMOS menus when you start your PC.
|
||||||
|
|
||||||
<sect2> For Kernels 2.2 or higher
|
<sect2> For Kernels 2.2 or higher
|
||||||
<p> The instructions for creating a serial-console are included with
|
<p> The instructions for creating a serial-console are included with
|
||||||
|
@ -4213,9 +4247,10 @@ the device /dev/console is linked to tty0 (the PC console). For a
|
||||||
serial-console you create a new /dev/console which is a true device
|
serial-console you create a new /dev/console which is a true device
|
||||||
(and not linked to something else). You must also put a statement
|
(and not linked to something else). You must also put a statement
|
||||||
regarding the serial-console into /etc/lilo.conf and then run lilo.
|
regarding the serial-console into /etc/lilo.conf and then run lilo.
|
||||||
This is because the equivalent of "setserial" needs to be run to set up
|
This is because the equivalent of "setserial" needs to be run to set
|
||||||
your serial-console before the kernel is loaded. See the above
|
up your serial-console before the kernel is loaded. See the above
|
||||||
mentioned documentation for more details.
|
mentioned documentation and the man page for lilo.conf for more
|
||||||
|
details.
|
||||||
|
|
||||||
Here is an example <tt>/etc/lilo.conf</tt> file contents (for ttyS0):
|
Here is an example <tt>/etc/lilo.conf</tt> file contents (for ttyS0):
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
|
@ -4391,16 +4426,16 @@ the next section.
|
||||||
|
|
||||||
<sect1> Terminal Was Working OK <label id="term_was_ok">
|
<sect1> Terminal Was Working OK <label id="term_was_ok">
|
||||||
<p> When a formerly working terminal suddenly goes bad it is often
|
<p> When a formerly working terminal suddenly goes bad it is often
|
||||||
easy to find the problem. That's because if you think about what
|
easy to find the problem. That's because (except for hardware
|
||||||
recently happened it will likely give a clue to the cause of the
|
failures) the problem is likely due to something that you did (or
|
||||||
problem.
|
something the software you used did).
|
||||||
|
|
||||||
The problem may be obvious such as an error message when the terminal
|
The problem may be obvious such as an error message when the terminal
|
||||||
is first turned on. If it makes a noise it likely needs repair. See
|
is first turned on. If it makes a strange noise it likely needs
|
||||||
<ref id="repair_" name="Repair & Diagnose">. First, think about what
|
repair. See <ref id="repair_" name="Repair & Diagnose">. First,
|
||||||
has been done or changed recently as it's likely the cause of the
|
think about what has been done or changed recently as it's likely the
|
||||||
problem. Did the problem happen just after new system software was
|
cause of the problem. Did the problem happen just after new system
|
||||||
installed or after a change in the configuration?
|
software was installed or after a change in the configuration?
|
||||||
|
|
||||||
If the terminal isn't responding correctly (if at all) to what you
|
If the terminal isn't responding correctly (if at all) to what you
|
||||||
type to it, you may have a <ref id="corrupt_interface" name="Corrupted
|
type to it, you may have a <ref id="corrupt_interface" name="Corrupted
|
||||||
|
@ -5780,6 +5815,10 @@ See <url url="http://www.wyse.com/terminal/">.
|
||||||
<p> Display adjustments (must remove cover): Brightness VR202, Height
|
<p> Display adjustments (must remove cover): Brightness VR202, Height
|
||||||
VR302, Width VR101 (also affects height).
|
VR302, Width VR101 (also affects height).
|
||||||
|
|
||||||
|
<sect2> Wyse 85
|
||||||
|
<p> Can emulate VT52/T100/VT200. Press F3 for setup. Scroll thru
|
||||||
|
setup with up/down keys.
|
||||||
|
|
||||||
<sect2> Wyse 99-GT
|
<sect2> Wyse 99-GT
|
||||||
<p> Here is the setup Menus of the Wyse99GT (late 1980's). Note that
|
<p> Here is the setup Menus of the Wyse99GT (late 1980's). Note that
|
||||||
TERM means "termination" (character) and not "terminal".
|
TERM means "termination" (character) and not "terminal".
|
||||||
|
|
Loading…
Reference in New Issue