Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 1996 19:13:51 GMT
From:      Stefan Thor Hreinsson <stefan@islandia.is>
To:        freebsd-hardware@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG
Subject:   Re: Problems with PPP and cyclades (Solved)
Message-ID:  <199607121913.TAA15390@hummer.islandia.is>

next in thread | raw e-mail | index | archive | help
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.    
---------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607121913.TAA15390>