From owner-freebsd-questions Fri Jul 12 12:13:53 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA07871 for questions-outgoing; Fri, 12 Jul 1996 12:13:53 -0700 (PDT) Received: from isgate.is (isgate.is [193.4.58.51]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA07829; Fri, 12 Jul 1996 12:13:42 -0700 (PDT) Received: from hummer.islandia.is by isgate.is (8.7.5-M/ISnet/14-10-91); Fri, 12 Jul 1996 19:13:18 GMT Received: from yogurt.islandia.is by hummer.islandia.is (8.7.5/ISnet/12-09-94); Fri, 12 Jul 1996 19:13:51 GMT Date: Fri, 12 Jul 1996 19:13:51 GMT Message-Id: <199607121913.TAA15390@hummer.islandia.is> X-Sender: stefan@islandia.is X-Mailer: Windows Eudora Pro Version 2.1.2 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit To: freebsd-hardware@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG From: Stefan Thor Hreinsson Subject: Re: Problems with PPP and cyclades (Solved) Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk At 09:54 AM 7/12/96 +1000, you wrote: >>I'm trying to get ppp-iij using the tun device to work. I can connect to it >>and everything seems fine until I hangup, the ppp daemon doesn't terminate >>and just holds the device open. This happens only when using Cyclades 16-Ye >>DB25-DB25 device with 16 modems connected (from dmesg: cy0 irq 5 maddr >>0xd4000 msize 8192 on isa). But when using sio everything >>works fine and ppp terminates. I'm using the same modem on both devices. > >>... >>Currently I'm using sliplogin.dynamic with the Cy-16 with the external >>connector box, and there are no trouble with that setup. But some of my >>users want to use ppp to connect to my server. > >ppp polls DCD while slattach waits for a SIGHUP. ppp's method is much >easier to get right for both the daemon and the driver, but there seems >to be a problem with it. > >I use the following program to poll the modem state for all sio and cy >lines. The DCD state should be `-DCD' when nothing is connected and >change to '+DCD' when something is connected and raises DCD and change >to `-DCD' on hangup. This works with a Cyclaydes 8Yo. Perhaps there >is a timing problem in the ppp daemon. You should probably use kernel >ppp if there is more that one ppp session at a time. > [SNAP] Thanks for that program Bruce, it showed us that dcd was still up even though we had already hung up the line. Later I received a fix to modem.c in ppp: >>I have experienced a similar problem. I solved it changing the CLOCAL flag >>to HUPCL, in modem.c. >> >>diff modem.c ~wsj/src/ppp/modem.c >>440c440 >>< rstio.c_cflag = (CS8 | CREAD | CLOCAL | CCTS_OFLOW|CRTS_IFLOW); >>--- >>> rstio.c_cflag = (CS8 | CREAD | HUPCL | CCTS_OFLOW|CRTS_IFLOW); >> >>With this, the ppp program receives a SIGHUP when the modem lost the >>carrier, and it terminates in the expected way. >> >>I have three models of cyclades (8Ys/8Yo/16Ye) and this works fine. >> >>I hope this can help you. Good look! ;-) >> >>Waldemar. >>-------------------------------------------------------------- >>Waldemar Scudeller Jr. wsj@widesoft.com.br >>Widesoft Sistemas Ltda. http://www.widesoft.com.br >>Limeira/SP - Brasil F. +55 194 51 6300 >>-------------------------------------------------------------- This worked, the ppp dies with SIGHUP and the line is ready for the next user. Thanks everyone who helped me solve this problem. Kvedja fra Islandi. --------------------------------------------------------------- Stefan Thor Hreinsson. Isl@ndia Administrator of Islandia.is Gresásveg 7 2.h.th stefan@islandia.is Sími: 5884020 --------------------------------------------------------------- There are two types of people: those who divide people into two types, and those who don't. ---------------------------------------------------------------