238 lines
7.5 KiB
HTML
238 lines
7.5 KiB
HTML
<!--startcut ==========================================================-->
|
||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||
<HTML>
|
||
<HEAD>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
<meta name="Author" content="T.P.Smyth">
|
||
<meta name="GENERATOR" content="Mozilla/4.51 [en] (Win95; I) [Netscape]">
|
||
<title>Windows 95 to Linux Direct Cable Connection LG #41</title>
|
||
</HEAD>
|
||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
||
ALINK="#FF0000">
|
||
<!--endcut ============================================================-->
|
||
|
||
<H4>
|
||
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
||
</H4>
|
||
|
||
<P> <HR> <P>
|
||
<!--===================================================================-->
|
||
|
||
<center>
|
||
<H1><font color="maroon">Direct Cable Connection between Win95 and Linux</font></H1>
|
||
<H4>By <a href="mailto:smytht@netscape.net">Thomas P. Smyth</a></H4>
|
||
</center>
|
||
<P> <HR> <P>
|
||
|
||
<b>Abstract</b>
|
||
<br>A serial connection at 115200 baud can be set up between Win95 and
|
||
Linux. The transfer rate is about 10k/sec which approaches the speed achieved
|
||
with a PLIP connection.
|
||
<p><b>Copyright 1999 Thomas P. Smyth</b>
|
||
<br>You may copy this document as is without any alterations.
|
||
<p><b>Disclaimer</b>
|
||
<br>Use this information at your own risk. The author will not be liable
|
||
for any damages that occur as a result of using this document.
|
||
<br>
|
||
<h1>
|
||
|
||
<hr WIDTH="100%"></h1>
|
||
|
||
<dl>
|
||
<h2>
|
||
1. Introduction</h2>
|
||
This document details how I set up a direct serial cable PPP connection
|
||
between a Windows 95 PC and a Linux machine. Essentially, the trick is
|
||
to make the Linux machine emulate a modem to the Windows 95 PC. This allows
|
||
the standard Windows 95 Dial-up networking tools to be used to make the
|
||
connection. I achieved transfer rates of 10k/sec on ftp transfers.
|
||
<h2>
|
||
2. Serial Cable</h2>
|
||
You need a null modem cable which has DSR linked to DCD at each connector.
|
||
I used a cable connected as follows:-</dl>
|
||
|
||
<table BORDER COLS=2 WIDTH="50%" >
|
||
<tr>
|
||
<td>Txd</td>
|
||
|
||
<td>Rxd</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Rxd</td>
|
||
|
||
<td>Txd</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>RTS</td>
|
||
|
||
<td>CTS</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>CTS</td>
|
||
|
||
<td>RTS</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GND</td>
|
||
|
||
<td>GND</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>DTR</td>
|
||
|
||
<td>DSR & DCD</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>DSR & DCD</td>
|
||
|
||
<td>DTR</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p>See the Serial-HOWTO Chapter 8 for more information.
|
||
<h2>
|
||
3. Linux Serial Port Configuration</h2>
|
||
On the Linux machine (I am using Redhat 5.2 on a Pentium 200MMX) set up
|
||
a terminal connection to your serial port. In /etc/inittab put
|
||
<p>S1:2345:respawn:/sbin/getty ttyS1 DT115200 ansi
|
||
<p>and in /etc/gettydefs put
|
||
<p># 115200 fixed baud Dumb Terminal entry
|
||
<br>DT115200# B115200 CS8 CLOCAL CRTSCTS # B115200 SANE -ISTRIP CLOCAL
|
||
CRTSCTS #@S login: #DT115200
|
||
<p>This is a copy of the 38400 entry with all 38400<30>s changed to 115200.
|
||
<p>Run telinit q to reread /etc/inittab.
|
||
<p>Using a terminal program (ie. Hyperterminal) you should be able to login
|
||
to the Linux machine over the serial cable. Remember to set the communication
|
||
parameters to 8N1 and 115200 baud with ansi emulation.
|
||
<p>See the Serial-HOWTO Chapter 8 for more information.
|
||
<h2>
|
||
4. Linux PPP Configuration</h2>
|
||
Create a user ppp95 on the Linux machine, make the shell pppd by editing
|
||
the /etc/passwd entry as follows:-
|
||
<p>ppp95: ........ your password, etc ........... :/home/ppp95:<u>/usr/sbin/pppd</u>
|
||
<p>In /home/ppp95 put a file named .ppprc with contents:-
|
||
<p>connect '/usr/sbin/chat -v ATH OK AT OK ATE0V1 OK ATX3 OK ATDT CONNECT'
|
||
<br>-detach
|
||
<br>modem
|
||
<br>crtscts
|
||
<br>lock
|
||
<br>:192.168.100.4
|
||
<p>The IP number is the address to use for the Win95 computer. The chat
|
||
script mimics a modem so that Win95 can start the PPP connection. See the
|
||
file /usr/doc/ppp-2.3.5/README.linux for information on setting up Linux
|
||
PPP. It is important to setuid the pppd daemon (chmod u+s /usr/sbin/pppd).
|
||
<h2>
|
||
5. Windows 95 Configuration</h2>
|
||
On the Windows 95 computer (using version 4.00.950 B) create a new Dial-up
|
||
networking connection. Put the following settings into it:-
|
||
<br>
|
||
<table BORDER COLS=2 WIDTH="100%" >
|
||
<tr>
|
||
<td>Telephone Number </td>
|
||
|
||
<td>1</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Connect Using</td>
|
||
|
||
<td>Standard Modem</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Modem Configuration</td>
|
||
|
||
<td>COM1 with speed 115200 at 8N1, & no wait for dial tone. Use Hardware
|
||
flow control only. Bring up terminal window before dialing.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Server Type</td>
|
||
|
||
<td>PPP</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Advanced Options </td>
|
||
|
||
<td>Software Compression only</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Network Protocols</td>
|
||
|
||
<td>TCP/IP only. Settings: Server assigned IP address, Server assigned
|
||
name server. Use IP header compression, use default gateway.</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<h2>
|
||
6. Connecting</h2>
|
||
To connect double click the new Dial-up Networking connection icon, and
|
||
press Connect. The terminal screen should appear - login as ppp95, and
|
||
press F7. The dialog box should indicate dialing, and then verifying username,
|
||
etc. Finally, there should be an indication that you have successfully
|
||
logged in to the network.
|
||
<p>From an MSDOS prompt you should be able to ping your Linux machine (using
|
||
the IP address, not the URL), and from your Linux machine ping 192.168.100.4.
|
||
See /usr/doc/ppp-2.3.5/README.linux for other checks of the PPP connection.
|
||
<p>In order to allow telnet and ftp to work, I changed /etc/hosts.allow
|
||
to
|
||
<p>ALL: LOCAL, 192.168.100.4
|
||
<p>You may wish to be more restrictive in the services you allow here.
|
||
You should now be able to telnet from Win95 to your linux machine using
|
||
the IP address.
|
||
<h2>
|
||
7. X Windows</h2>
|
||
To run X Windows on your Win95 computer, get the free MI/X server from
|
||
http://www.sunsite.auc.dk/tucows/xwinserver95.html. Install The MI/X server.
|
||
To get it going:- run the MI/X server, and from a DOS box telnet your linux
|
||
machine. Login as your normal user name, and type the following:-
|
||
<p> DISPLAY=192.168.100.4:0.0
|
||
<br> export DISPLAY
|
||
<br> xterm &
|
||
<p>This should make an xterminal appear in the MI/X server. The interface
|
||
is a bit slow, but it works.
|
||
<p>For more information see Running Remote X Sessions on Windows 95/98/NT/Mac/PPC
|
||
Clients by Ron Jenkins in Issue 32 of Linux Gazette, September 1998.
|
||
<h2>
|
||
8. Other services</h2>
|
||
I also have a ftp server and Apache on my Linux machine - if you run Netscape
|
||
on the Win95 computer and put in the location http://192.168.100.1, you
|
||
will reach Apache, or ftp://192.168.100.1 - you will reach your ftp server.
|
||
<h2>
|
||
9. Shutdown of the Link</h2>
|
||
To shut down the PPP link, disconnect the dialup connection - it hangs
|
||
for a while because Win95 is sending reset commands for a modem, but these
|
||
are being received by the Linux getty as login/passwords. It disconnects
|
||
after a short while, and Linux does not seem to mind.
|
||
<p>
|
||
<hr WIDTH="100%">
|
||
<br>If you have any comments, please email me at <a href="mailto:smytht@netscape.net">smytht@netscape.net</a>
|
||
|
||
<!--===================================================================-->
|
||
<P> <hr> <P>
|
||
<center><H5>Copyright © 1999, Thomas Smyth <BR>
|
||
Published in Issue 41 of <i>Linux Gazette</i>, May 1999</H5></center>
|
||
|
||
<!--===================================================================-->
|
||
<P> <hr> <P>
|
||
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
||
ALT="[ TABLE OF CONTENTS ]"></A>
|
||
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
||
ALT="[ FRONT PAGE ]"></A>
|
||
<A HREF="./searls.html"><IMG SRC="../gx/back2.gif"
|
||
ALT=" Back "></A>
|
||
<A HREF="./gm/gm.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
||
<P> <hr> <P>
|
||
<!--startcut ==========================================================-->
|
||
</BODY>
|
||
</HTML>
|
||
<!--endcut ============================================================-->
|