[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] GPRS PPP

From: clive
Subject: Re: [lwip-users] GPRS PPP
Date: Thu, 21 Sep 2006 08:22:19 +0100
User-agent: Demon-WebMail/2.0

address@hidden wrote:
> How  to close lwip? 
> My problem is that i have gprs connection and the coonection is closed by
> peer after every 24h. What i have to do to restart lwip (ppp). I use
> lwip_init() to start connection on ecos platform. I search lwip_close() or
> something like that but now found. Any sugestions?
> before i call lwip_init()  i dial to peer sending to modem at commands
> (ATD... etc.) when i recceive CONNECT then i call lwip_init() he negotiate
> LCP,PAP,IPCP then i have got connection, hov to repeat that step without
> reseting program?


LwIP has been implemented such that it starts up fine, but not much thought has 
been given to how to deallocate and destroy it. Indeed, lwip_close() or similar 
does not exist. You are intended to keep the tasks in memory.

I initialise the stack then go into an infinite task command loop as follows:-

   <start up low level data link here>
   <await PPPERR_NONE arg in ppp link status callback>
   <do your TCP/IP app-related stuff here>

This works fine in that you can bring the link and PPP up and down repeatedly. 
However, I currently have a problem (you may have seen the mails) whereby if 
the link unexpectedly disappears (not due to pppClose), the TCP/IP layers do 
not seem to be becoming aware that the network has gone. Unfortunately, I don't 
know enought about the stack to know if I'm asking too much to expect this, or 
whether there should be some kind of fail-safe timeout when sending packets 
from the socket API. At the moment, when the network disappears and I have 
ourstanding un-ACKed packets, the app just waits forever... 8-(

Hope this helps in some way, maybe you might have an opinion on my situation.

Kind regards,

Clive Wilson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]