PPP not connecting

I am trying to get the sample program /PPP/PPP_ANSWER.C program to work. I could successfully use /SERIAL/EchoChr.C with HyperTerminal.

I am using a direct connection with w/o flow control and this is my modified ipconfig:

ifconfig( IF_PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 19200L,
IFS_IPADDR, aton(“192.168.1.5”),
IFS_PPP_ACCEPTIP, 0,
IFS_PPP_SETREMOTEIP, aton(“192.168.1.13”),
IFS_PPP_ACCEPTDNS, 0,
IFS_PPP_LOCALAUTH, “myname”, “mypwd”,
IFS_UP,
IFS_PPP_PASSIVE, 1,
IFS_END);

Here is the log from verbose output:

PPPLINK: baud rate 19200: setting divisor to 47
PPPLINK: bringing up serial PPP interface 0
PPPLINK: baud rate 19200: setting divisor to 47
PPPLINK: Opened PPP serial on iface 0 at 19200 baud
PPP: sending LCP config req i/f 0
PPPLINK: sendpacket totlen=28 i/f 0

PPP: sending LCP config req i/f 0
PPPLINK: sendpacket totlen=28 i/f 0
PPP: LCP too many retries i/f 0

And then it seems to wait in passive mode.

On my PC I start the login connection and it fails after a few seconds with:

Error 777: The connection attempt failed…

On my PC I am running Windows XP. I have created a dial-up connection using a COM port off a USB adapter, PPP extension and compression disabled. (This connection works fine connecting with a null modem cable to another PC).

Using DC 9.62, BL1800 serial port C.

What should I verify in my setup?
How can I get more information from the PPPLink LIB?

Thanks,
Guenther

The Windows connection does a short handshake. It sends “CLIENT” and expects the server to reply with “CLIENTSERVER”. Here’s my modified ipconfig call:

ifconfig(IF_PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 9600L,
IFS_PPP_FLOWCONTROL, 1,
IFS_PPP_RTSPIN, PCDR, NULL, 4,
IFS_PPP_CTSPIN, PCDR, 5,
IFS_PPP_USEMODEM, 1,
IFS_PPP_SENDEXPECT,
“CLIENTSERVER CLIENT @CLIENTSERVER”,
IFS_IPADDR, aton(“192.168.1.5”),
IFS_PPP_ACCEPTIP, 0,
IFS_PPP_SETREMOTEIP, aton(“192.168.1.6”),
IFS_PPP_ACCEPTDNS, 0,
IFS_PPP_LOCALAUTH, “myname”, “mypwd”,
IFS_UP,
// IFS_DEBUG, 6,
IFS_END);

This works sometimes(!!!). Even with hardware flowcontrol added in and low baud rates it doesn’t always connect.

With all verbose and debugging enabled it connects mostly.

#define PPP_VERBOSE
#define PPP_DEBUG
#define PPPLINK_VERBOSE
#define PPPLINK_DEBUG
#define SERLINK_VERBOSE
#define SERLINK_DEBUG
#define SMTP_VERBOSE
#define SMTP_DEBUG 1
#define CHAT_VERBOSE
#define CHAT_DEBUG

At this point I am becoming more suspicious of the code in PPP.LIB. Either it or Windows (or both) do not follow PPP protocol requirements. I don’t want to spend more time with this and I hope the library routines for Ethernet based connections are “easier” to work with.

My first disappointment with a Rabbit system.

/Guenther

I had two problems.

First, the USB-to-RS323 adapter I was using on my laptop did not handle the communication as it should. Using a PC with a real COM port worked.

Second, the Windows connection assumes a short handshake before it starts the PPP prtotocol. The Windows connection sends “CLIENTCLIENTCLIENT” and expects “CLIENTSERVER” as response followed by “PPP”.

Here’s my ifconfig which worked up to 115200 baud using TXC/RXC:

ifconfig(IF_PPP2,
IFS_PPP_INIT,
IFS_PPP_SPEED, 115200L,
IFS_PPP_FLOWCONTROL, 0,
IFS_PPP_USEMODEM, 1,
IFS_PPP_SENDEXPECT,
“‘’ &CLIENTCLIENTCLIENT CLIENTSERVER ‘’ PPP ‘’”,
IFS_IPADDR, aton(“192.168.1.5”),
IFS_NAMESERVER_SET,aton(“192.168.1.5”),
IFS_PPP_REMOTEIP, aton(“192.168.1.6”),
IFS_PPP_LOCALAUTH, “myname”, “mypwd”,
IFS_UP,
IFS_END);

Cheers,
Guenther