Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: NDK PPP LCP Disconnect

$
0
0

Just for further information.

Part of handling the PPP interface is the requirement for a function to handle status callbacks

static void hdlcSI( HANDLE hSI, uint Msg, UINT32 Aux, PBM_Handle hPkt )

This function handles

case SI_MSG_CALLSTATUS:

case SI_MSG_PEERCMAP:

case SI_MSG_SENDPACKET:

Part of handling disconnect is to clear the handle for the ppp instance

pi->Status = (uint)Aux;
if( Aux >= SI_CSTATUS_DISCONNECT )
{
// Close PPP - we clear the handle to make sure we
// only call pppFree() once. (We may get multiple
// disconnect messages - one from each protocol.)
if( pi->hPPP )
{
hTmp = pi->hPPP;
pi->hPPP = 0;
pppFree( hTmp );
}
}

This is as per the examples in the NDK and all works fine when the network drops the LCP link.  I have verified this by removing the antenna from the 3G modem so it loses network connectivity and I eventually get the disconnect message and all is handled fine.

What I want is to be able to call the close function for the PPP stack so I can get it to send the LCP disconnect, the modem to respond with disconnected and then the PPP instance is all cleared correctly and neatly.


Viewing all articles
Browse latest Browse all 25965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>