1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
<!--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 38400s 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="./lg_toc41.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.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 ============================================================-->
|