[En-Nut-Discussion] Re: Closing PPP properly

Eduardo Serantes eserantes at telefonica.net
Thu Jan 13 13:06:21 CET 2005


Hi Harald,

I followed your instructions and I'm currently using the ahdlc driver (it
seems to work ok). For hanging up the modem I use the DTR signal, so this
part is the easiest one. I have reviewing the code and I think the only
solution is to use a hack so the running ppp thread could be "killed"
(releasing the allocated memory first). The ahdlc rx thread should be
running and we could start again the proccess with _open.... NutChat...
NutNetIfConfig... Do I forget anything?

Thx,

Eduardo.

P.S.: Ernst, I didn't forget to add the free function :)

> 
> Message: 2
> Date: Wed, 12 Jan 2005 16:22:56 +0100
> From: Harald Kipp <harald.kipp at egnite.de>
> Subject: Re: [En-Nut-Discussion] Closing PPP properly
> To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
> Message-ID: <5.1.1.6.0.20050112160655.01d97bd8 at egnite.de>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
> 
> Eduardo,
> 
> I'd recommend to use devAhdlc, not devUart. Then make sure
> to close devPPP only, not the UART device.
> 
> Closing the PPP device will finally result in
> 
>    _ioctl(uart_handle, HDLC_SETIFNET, 0);
> 
> The HDLC thread is still running, but in an idle loop
> and not touching the UART input.
> 
> Now comes the tricky part. How to get the modem to
> hangup and accept AT coomands? Also see
> http://www.ethernut.de/en/nuttecnotes/ntn-1_ppp.html
> 
> I must confess, that we always reset the modem and reboot
> Ethernut to establish a new connection. :-(
> 
> Harald
> 
> At 06:38 12.01.2005 +0100, you wrote:
> >Hi all,
> >
> >I'm wondering if there is any way to close a ppp connection and to
> restart
> >another one. I have tried with _close, but it seems some memory remains
> >allocated and/or some thread is still running, and further calls to
> NutChat
> >have no effect. Any idea?
> >
> >Thx and regards,
> >
> >Eduardo




More information about the En-Nut-Discussion mailing list