[ale] PPP 2.2.0f-2 problems

Joe jknapka at mindspring.com
Sun Jan 5 15:59:42 EST 1997


> I'm trying to set up PPP 2.2.0f-2 on a RedHat 4.0 system.  I've tried
> to get this to work with both an internal modem on COM3 and an external

Look at /var/adm/messages to see what ppp and chat are doing as they
try to connect. Send us the messages.

I had a very similar problem at one point, and it turned out that the
cause was that the /dev/cua<?> device needed to be in "local" mode for
chat to work right. Here's the source to a C program I wrote to make
this happen (I imagine there's a standard utility that will do this,
but I don't know which one - maybe setserial?):

--begin rstlcl.cc--

#include <termios.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>

int errno;

main(int argc,char* argv[])
{
  if (argc < 2)
    {
      printf("Please supply a file name (/dev/...)\n");
      exit(1);
    }
  int fd = open(argv[1],O_RDWR | O_NDELAY);
  if (0 >= fd)
    {
      printf("Error: could not open %s (%d)\n",
	     argv[1],
	     errno);
      exit(-1);
    }

  struct termios t;
  int rc = tcgetattr(fd,&t);
  if (0 > rc)
    {
      printf("Error: could not get attributes %s (%d)\n",
	     argv[1],
	     errno);
      exit(-1);
    }

  t.c_cflag |= CLOCAL;

  rc = tcsetattr(fd,TCSANOW,&t);
  if (0 > rc)
    {
      printf("Error: could not set attributes %s (%d)\n",
	     argv[1],
	     errno);
      exit(-1);
    }

  close(fd);

  exit(0);
}

--end rstlcl.cc--

So compile with

gcc -o rstlcl rstlcl.cc

then do

rstlcl /dev/cua1
pppd

I hope this helps.

-- Joe






More information about the Ale mailing list