[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ppp over null modem cable



Below is what I am using.  Note: I don't invoke pppd directly, but use
the "pon" script (don't know which package this is in).  In the
interest of brevity/sanity/netiquette, I have deleted sections that
are commented out.  I think peers/pogo is the only one that really matters.

Quoting Karl Hasselstrom <kha@treskal.com>:
> I am trying to connect an old 486 to my slightly more modern computer
> using ppp over a null modem cable, but no matter what I try, I get the
> same result (see below). I'm guessing this may be caused by incorrect
> configuration of one (or more :-) serial ports. At least I'm sure I'm
> using the right ports, since doing 'cat /dev/ttyS3' on the server
> while the client is trying to connect gives a few bytes of garbage on
> stdout.
> 
> Does anyone have a clue what could be wrong, or how I could
> troubleshoot this?
> 
> On the server (PII running stable with kernel 2.4.18)
> 
> /etc/ppp/options:
> lock
> noauth
> 
# /etc/ppp/options

# async character map -- 32-bit hex; each bit is a character
# that needs to be escaped for pppd to receive it.  0x00000001
# represents '\x01', and 0x80000000 represents '\x1f'.
asyncmap 0

# Require the peer to authenticate itself before allowing network
# packets to be sent or received.
# Please do not disable this setting. It is expected to be standard in
# future releases of pppd. Use the call option (see manpage) to disable
# authentication for specific peers.
auth

# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
# on the serial port.
crtscts

# Specifies that pppd should use a UUCP-style lock on the serial device
# to ensure exclusive access to the device.
lock

# Don't show the passwords when logging the contents of PAP packets.
# This is the default.
hide-password

# Use the modem control lines.  On Ultrix, this option implies hardware
# flow control, as for the crtscts option.  (This option is not fully
# implemented.)
modem

# Add an entry to this system's ARP [Address Resolution Protocol]
# table with the IP address of the peer and the Ethernet address of this
# system.
proxyarp

# If this option is given, pppd will send an LCP echo-request frame to the
# peer every n seconds. Normally the peer should respond to the echo-request
# by sending an echo-reply. This option can be used with the
# lcp-echo-failure option to detect that the peer is no longer connected.
lcp-echo-interval 30

# If this option is given, pppd will presume the peer to be dead if n
# LCP echo-requests are sent without receiving a valid LCP echo-reply.
# If this happens, pppd will terminate the connection.  Use of this
# option requires a non-zero value for the lcp-echo-interval parameter.
# This option can be used to enable pppd to terminate after the physical
# connection has been broken (e.g., the modem has hung up) in
# situations where no hardware modem control lines are available.
lcp-echo-failure 4

# Disable the IPXCP and IPX protocols.
# To let pppd pass IPX packets comment this out --- you'll probably also
# want to install ipxripd, and have the Internal IPX Network option enabled
# in your kernel.  /usr/doc/HOWTO/IPX-HOWTO.gz contains more info.
noipx


# ---<End of File>---

> /etc/ppp/options.ttyS3
> asyncmap 0
> crtscts
> local
> silent
> 192.168.2.1:192.168.2.2
> 9600
> 
# If you need to set up multiple serial lines differently, then copy this
# file to options.<ttyname> for each <ttyname> with a modem on it.
#
# Example:
# options.ttyS1		for the second serial port (a.k.a. COM2)
#
# Edit the following line so that the first IP address mentioned is the is
# the IP address or name of your host, while the second is the IP address
# or name of the remote machine.

(none):remotepeername
# 192.168.0.1:192.168.0.2

# You may also put additional settings in each file, just like in the
# general options file. For example:
#
# noauth
# debug
# defaultroute
# mtu 296
#
# Read pppd(8) for more information.

> I run these as root:
> # setserial -G /dev/ttyS3
> /dev/ttyS3 uart 16550A port 0x02e8 irq 3 baud_base 115200 spd_normal

I dont' do this.

> # pppd /dev/ttyS3 nodetach

I use "pon pogo", see below for /etc/ppp/peers/pogo

> Using interface ppp0
> Connect: ppp0 <--> /dev/ttyS3
> [Nothing more happens, the process just waits.]
> 
> On the client (486 running stable with kernel 2.2.20)
> 

Quibble: PPP is Peer-to-Peer Protocol.  There is no client/server
distinction.  The previous files were from the Debian side where I
always initiate the connection.  The other side (pogo) is a SuSE 7.1
system.  You should be able to run this at 115Kbps.  The 9600 below in
options.ttyS0 is also a speed.  This may be your problem.

> /etc/ppp/options:
> lock
> 
> /etc/ppp/options.ttyS0:
> 9600
> crtscts
> local
> noauth
> 
> I run these as root:
> # setserial -G /dev/ttyS0
> /dev/ttyS0 uart 16450 port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test
> # pppd /dev/ttyS0 nodetach
> Using interface ppp0
> Connect: ppp0 <--> /dev/ttyS0
> [There is a delay of a minute or so.]
> LCP: timeout sending Configure-Requests
> Connection terminated.
> [At this point I get the prompt back.]
> 

Below is the options file specific to the null modem connection.  I may
have editted it by hand.  IIRC, pppconfig assumes a dial-up connection.

HTH,
  Jeffrey

/etc/ppp/peers/pogo:

# This optionfile was generated by pppconfig 2.0.10. 
# 
#
#hide-password 
noauth
#connect "/usr/sbin/chat -v -f /etc/chatscripts/provider"
#debug
/dev/ttyS0
115200
defaultroute
noipdefault 
#user replace_with_name
#remotename provider
#ipparam provider



Reply to: