Hi All,
I am using lwIP + PPP on GPRS module, I use this API to detect whehter PPP
is on/off
/**
* return 1 means PPP on.
*/
int pppStatus(void)
{
int status;
status=0;
if(pppIOCtl(gpppInfo.hppp,PPPCTLG_UPSTATUS,&status)==0)
{
if(status)
{
return 1;
}
}
return -1;
}
It could be detect the PPP is on, but I shutdown the PPP.
int main(void)
{
int status;
/* no stdio-buffering, please! */
setvbuf(stdout, NULL,_IONBF, 0);
main_loop();
#if PPP_SUPPORT
{
int rc;
rc=pppClose(gpppInfo.hppp);
printf("pppClose %d\n", rc);
pppLinkTerminated(gpppInfo.hppp);
printf("pppLinkTerminated\n");
pppLinkDown(gpppInfo.hppp);
printf("pppLinkDown\n");
}
while( pppStatus() == 1)
{
printf("wait PPP shutdown\n");
OSTimeDlyMillisec(1000);
}
printf("PPP really shutdown, i make shutdown gprs module +++, ath\n");
sio_close(gpppInfo.ppp_sio);
#endif
return 0;
}
But the pppStauts() always give me 1.
Where is the problem for I shutdown the PPP link?
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users