# PPP reconnection afrter a closing

**URL:** <https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762>\
**Category:** Rabbit\
**Created:** [November 11, 2007, 9:55am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762 "2007-11-11T09:55:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 11, 2007, 9:55am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/1 "2007-11-11T09:55:21Z")

</div>

Hi all,  
i’m using a LP3500 with a GPRS Modem  
For the setting of the modem and it’s cheking i use a buffering system home-maded.

If i use a cabled modem all works fine.

But when with GPRS Modem i close the PPP on GPRS link all works but after i restart no connection is maded. and i not have any error feed-back.

Anybody has an idea? How to reset communication buffers on PPPlibrary?  
Now i’m working with a routine that poer-dow the GPRS Terminal to ensure to not have any problem with that side, after reboot i wait the modem registration succeded but communication problems with modem persist.

Tnx  
Marco

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 12, 2007, 7:28am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/2 "2007-11-12T07:28:28Z")

</div>

PPP: sending LCP config req i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: LCP NAK on i/f 0  
PPP: sending LCP config req i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: NAKing option 3  
PPP: sending LCP nak i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: accepting option 3  
PPP: sending LCP ack i/f 0  
PPP: sending our credentials a/b  
PPP: sending PAP auth i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc023  
PPP: sending IPCP config i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0x8021  
PPP: IPCP config request i/f 0  
IPCP: peer wants IP addr C0A8FEFE  
PPP: accepting option 3  
PPP: sending IPCP ack i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0x8021  
PPP: IPCP NAK on i/f 0  
PPP: sending IPCP config i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0x8021  
PPP: i/f 0 UP  
AttivaPPP: Indirizzo IP: 217.201.201.126 in 11 s

THE DICONNECTION:  
PPP: LCP terminating on i/f 0  
PPP: sending LCP term i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: Got LCP term ACK, disconnecting  
PPP: LCP terminated on i/f 0 (result=1)

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 12, 2007, 7:31am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/3 "2007-11-12T07:31:59Z")

</div>

PPP: sending LCP config req i/f 0  
PPP: got packet 36EC on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet 36EC on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: NAKing option 3  
PPP: sending LCP nak i/f 0  
PPP: got packet 36EC on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: accepting option 3  
PPP: sending LCP ack i/f 0  
PPP: sending our credentials a/b  
PPP: sending PAP auth i/f 0  
PPP: got packet 36EC on i/f:0 protocol:0xc023  
PPP: sending IPCP config i/f 0  
PPP: got packet 36EC on i/f:0 protocol:0xc021  
PPP: sending LCP term ack i/f 0  
PPP: link i/f 0 is down  
PPP: sending LCP config req i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: NAKing option 3  
PPP: sending LCP nak i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: accepting option 3  
PPP: sending LCP ack i/f 0  
PPP: sending our credentials a/b  
PPP: sending PAP auth i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc023  
PPP: sending IPCP config i/f 0  
PPP: got packet 3723 on i/f:0 protocol:0xc021  
PPP: sending LCP term ack i/f 0  
PPP: link i/f 0 is down

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 13, 2007, 10:28pm UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/4 "2007-11-13T22:28:14Z")

</div>

WHEN THE SCRIPT AND PPP WORKS:  
CHAT: sending ‘ATZ’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,“IP”,“ibox.tim.it”,0,0’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘ATD_99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
AttivaPPP: Indirizzo IP: 217.202.9.18 in 11 s

WHEN DOES’NT:  
CHAT: sending ‘ATZ’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,“IP”,“ibox.tim.it”,0,0’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘ATD_99__1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
CHAT: sending ‘ATZ’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,“IP”,“ibox.tim.it”,0,0’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending 'ATD99__1#’  
CHAT: expecting ‘CONNECT’  
CHAT: timed out  
CHAT: sending ‘ATH0’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: end of script  
CHAT: sending ‘ATZ’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,“IP”,“ibox.tim.it”,0,0’  
CHAT: expecting ‘ok’  
CHAT: found it!  
CHAT: sending 'ATD99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
AttivaPPP: errore di connessione

wHE CAN FIND THE CHAT END BUT DOES’NT STARTS THE LCP AND IP HANDSHAKE.

I use these commands:  
for(count = 0; count \< 3; count++)  
{  
#ifdef CONNMSG  
printf( "AttivaPPP: tentativo n. %d  
", count+1);  
#endif  
//configure PPP for dialing in to ISP and bring it up  
ifconfig(IF\_DEFAULT, IFS\_PPP\_INIT, IFS\_END);  
ifconfig(IF\_DEFAULT,  
IFS\_PPP\_SPEED, VELMODEM,  
IFS\_PPP\_USEMODEM, 1,  
IFS\_PPP\_RTSPIN, PBDR, NULL, 7, // Note: the NULL is for the shadow register. From DC9.0,  
// this is computed automatically - the value passed here  
// for the shadow register is ignored.  
IFS\_PPP\_CTSPIN, PBDR, 0,  
IFS\_PPP\_FLOWCONTROL, 0,  
IFS\_PPP\_SENDEXPECT, DIALUP\_SENDEXPECT,  
#ifdef GPRSEN  
IFS\_PPP\_HANGUP, “ATH0 #ok”,  
#else  
IFS\_PPP\_HANGUP, “ATH #ok”,  
#endif  
IFS\_PPP\_MODEMESCAPE, 1,  
IFS\_PPP\_ACCEPTIP, 1,  
IFS\_PPP\_ACCEPTDNS, 1,  
IFS\_PPP\_REMOTEAUTH, DIALUP\_NAME, DIALUP\_PASSWORD,  
IFS\_UP,  
IFS\_END);

while(ifpending(IF\_DEFAULT) & 1) {  
tcp\_tick(NULL);  
}  
if (ifstatus(IF\_DEFAULT)) break;  
}

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 14, 2007, 9:16am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/5 "2007-11-14T09:16:44Z")

</div>

First and working connection ( i can reconnect without turning off/on) the gprs modem only resetting the board with the command in dc5.92)

PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: bringing up serial PPP interface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: Opened PPP serial on iface 0 at 19200 baud  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: sendpacket totlen=38 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=28 i/f 0  
PPPLINK: sendpacket totlen=12 i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
PPPLINK: sendpacket totlen=14 i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
AttivaPPP: Indirizzo IP: 217.201.67.76 in 10 s

SECOND AND ABOVE NOT WORKING CONNECTIONS:

PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: bringing up serial PPP interface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: Opened PPP serial on iface 0 at 19200 baud  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: sendpacket totlen=38 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=28 i/f 0  
PPPLINK: sendpacket totlen=12 i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
PPPLINK: sendpacket totlen=8 i/f 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: bringing up serial PPP interface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: Opened PPP serial on iface 0 at 19200 baud  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: sendpacket totlen=38 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=6 i/f 0  
PPPLINK: Closed PPP serial on iface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: bringing up serial PPP interface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: Opened PPP serial on iface 0 at 19200 baud  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: sendpacket totlen=38 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPPLINK: sendpacket totlen=13 i/f 0  
PPPLINK: sendpacket totlen=28 i/f 0  
PPPLINK: sendpacket totlen=12 i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
PPPLINK: sendpacket totlen=8 i/f 0  
AttivaPPP: errore di connessione

How i close the woring connection:  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: bringing down serial PPP interface 0  
PPPLINK: sendpacket totlen=8 i/f 0  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=6 i/f 0  
PPPLINK: Closed PPP serial on iface 0

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [November 14, 2007, 10:48am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/6 "2007-11-14T10:48:54Z")

</div>

i’ve similar problem here. I’m using the RCM3360 to connect to Simens GPRS Modem.

I used ifconfig(…IFS\_UP…) and ifconfig(…IFS\_DOWN…) to bring up and close the interface. First run everything works fine, but if i put the program into a loop, all the subsequence PPP connection will fail…

Guess i need to reset/init the PPP struct… anybody have any idea how to do this?

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 14, 2007, 10:15pm UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/7 "2007-11-14T22:15:02Z")

</div>

Hi, i think is necessary to reset PPP buffers or TCP/ip STACKS.

I posted a question to technical support to have more help.

What kind of provider you are using? I’m using Italian Telecom Italia Mobile

Tomorow i’ll try whit another Cellular line provider

Bye

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [November 15, 2007, 3:36am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/8 "2007-11-15T03:36:41Z")

</div>

i’m using Siemens MC35i Modem to connect to Malaysian ‘Celcom’ ISP.

I dont really think there was a problem with the cellular line provider, instead it is the PPP/TCPIP stack we were using…

When i first run the program, the PPP connection established. If i run again it still running fine. The problem happen when i tried to put the whole program in a loop. In this case, only the first run will the PPP be connected, the subsequence run will fail completely.

So i believe when the program start/restart, something init the PPP/TCPIP stack… Did you find anyting to re-init the stacks? I will be looking into this matter later. If not i will try to dig into the library to see what’s actually happen…

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [November 15, 2007, 7:43am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/9 "2007-11-15T07:43:15Z")

</div>

Below is the PPP conn verbose:

CHAT: sending ‘ATZ’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,IP,celcom.net.my’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATD_99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
PPP: sending LCP config req i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0xc021  
PPP: LCP NAK on i/f 0  
PPP: sending LCP config req i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet B3CA on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: sending LCP ack i/f 0  
PPP: sending IPCP config i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0x8021  
PPP: IPCP config request i/f 0  
IPCP: peer wants IP addr C0A8FEFE  
PPP: accepting option 3  
PPP: sending IPCP ack i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0x8021  
PPP: IPCP NAK on i/f 0  
PPP: sending IPCP config i/f 0  
PPP: got packet B3CA on i/f:0 protocol:0x8021  
PPP: i/f 0 UP  
INFO PPP connection established. IP address = 10.131.117.156

// …other SMTP program within here…//

PPP: LCP terminating on i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: sending LCP term i/f 0  
PPP: LCP too many retries during shutdown i/f 0 // -----\> problem not terminating properly  
PPP: LCP terminated on i/f 0 (result=-20)  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: end of script

// ------------second & subsequence loops-----------//

CHAT: sending ‘ATZ’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,IP,celcom.net.my’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATD_99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
PPP: sending LCP config req i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: sending LCP ack i/f 0  
PPP: sending IPCP config i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: sending LCP term ack i/f 0  
PPP: link i/f 0 is down  
ERR PPP connection failed  
GPRS Connection Failed

---

<div class="post-metadata">

**Author:** ![ventunocm](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@ventunocm](https://forums.digi.com/u/ventunocm)\
**Post date:** [November 19, 2007, 12:57am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/10 "2007-11-19T00:57:37Z")

</div>

These is the working modem ( same procedures different hardware and ISP )

PPPLINK: bringing up serial PPP interface 0  
PPPLINK: baud rate 19200: setting divisor to 11  
PPPLINK: Opened PPP serial on iface 0 at 19200 baud  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: sendpacket totlen=9 i/f 0  
PPP: sending LCP config req i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPP: got packet 36D6 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: sending LCP config req i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPP: got packet 36D6 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet 36D6 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 5  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: sending LCP ack i/f 0  
PPPLINK: sendpacket totlen=24 i/f 0  
PPP: sending IPCP config i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
PPP: got packet 36D6 on i/f:0 protocol:0xc021  
PPP: got packet 370D on i/f:0 protocol:0x8021  
PPP: IPCP config request i/f 0  
PPP: rejecting option 2  
IPCP: peer wants IP addr 0A990101  
PPP: sending IPCP reject i/f 0  
PPPLINK: sendpacket totlen=14 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x8021  
PPP: IPCP NAK on i/f 0  
PPP: sending IPCP config i/f 0  
PPPLINK: sendpacket totlen=26 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x8021  
PPP: IPCP config request i/f 0  
IPCP: peer wants IP addr 0A990101  
PPP: accepting option 3  
PPP: sending IPCP ack i/f 0  
PPPLINK: sendpacket totlen=14 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x8021  
PPP: i/f 0 UP  
AttivaPPP: Indirizzo IP: 10.171.49.125 in 16 s  
richiedo invio stato sbas 18/11/2007 23:06:24  
PPPLINK: sendpacket totlen=45 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x21  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: sendpacket totlen=70 i/f 0  
BatteriaALM: 12.585107V  
PPPLINK: sendpacket totlen=409 i/f 0  
PPPLINK: sendpacket totlen=81 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x21  
richiedo invio stato sbas 18/11/2007 23:06:37  
PPPLINK: sendpacket totlen=449 i/f 0  
richiedo invio stato sbas 18/11/2007 23:06:49  
PPPLINK: sendpacket totlen=41 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0xc021  
PPP: got packet 370D on i/f:0 protocol:0x21  
PPPLINK: sendpacket totlen=41 i/f 0  
PPPLINK: bringing down serial PPP interface 0  
PPP: LCP terminating on i/f 0  
PPP: sending LCP term i/f 0  
PPPLINK: sendpacket totlen=8 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0x21  
PPPLINK: sendpacket totlen=41 i/f 0  
PPP: sending LCP term i/f 0  
PPPLINK: sendpacket totlen=8 i/f 0  
PPP: got packet 370D on i/f:0 protocol:0xc021  
PPP: Got LCP term ACK, disconnecting  
PPP: LCP terminated on i/f 0 (result=1)  
PPPLINK: starting modem escape sequence  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=1 i/f 0  
PPPLINK: sendpacket totlen=5 i/f 0  
PPPLINK: Closed PPP serial on iface 0

---

<div class="post-metadata">

**Author:** ![jordan1](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jordan1](https://forums.digi.com/u/jordan1)\
**Post date:** [December 5, 2007, 11:44am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/11 "2007-12-05T11:44:15Z")

</div>

i’m using Siemens MC35i Modem to connect to Malaysian ‘Celcom’ ISP.  
I dont really think there was a problem with the cellular line provider, instead it is the PPP/TCPIP stack we were using.

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [November 23, 2007, 4:55am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/12 "2007-11-23T04:55:06Z")

</div>

i still can’t find a way to solve my problem… i dont have any other modem to test with. So i still have to find a way to get around the PPP re-connection problem… below are the program trace for my PPP re-connection which failed:

CHAT: sending ‘ATZ’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,IP,celcom.net.my’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATD_99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
PPP: sending LCP config req i/f 0  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: LCP NAK on i/f 0  
PPP: sending LCP config req i/f 0  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: sending LCP ack i/f 0  
PPP: sending IPCP config i/f 0  
//-----------------here it successfully received the ICPC protocol (0x8021) packet-------------//  
PPP: got packet B393 on i/f:0 protocol:0x8021  
PPP: IPCP config request i/f 0  
IPCP: peer wants IP addr C0A8FEFE  
PPP: accepting option 3  
PPP: sending IPCP ack i/f 0  
PPP: got packet B393 on i/f:0 protocol:0x8021  
PPP: IPCP NAK on i/f 0  
PPP: sending IPCP config i/f 0  
PPP: got packet B393 on i/f:0 protocol:0x8021  
PPP: i/f 0 UP  
INFO PPP connection established. IP address = 10.131.209.168  
PPP: LCP terminating on i/f 0  
PPP: sending LCP term i/f 0  
PPP: got packet B393 on i/f:0 protocol:0xc021  
PPP: Got LCP term ACK, disconnecting  
PPP: LCP terminated on i/f 0 (result=1)  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: end of script  
GPRS Interface disconnected

//----------------- 2nd & subsequence reconnection in a loop ---------//

CHAT: sending ‘ATZ’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATH’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘AT+CGDCONT=1,IP,celcom.net.my’  
CHAT: expecting ‘OK’  
CHAT: found it!  
CHAT: sending ‘ATD_99_\*\*1#’  
CHAT: expecting ‘CONNECT’  
CHAT: found it!  
CHAT: not sending anything  
CHAT: expecting ‘~’  
CHAT: found it!  
CHAT: end of script  
PPP: sending LCP config req i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: received LCP ACK i/f 0. local\_acked = 1  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: peer requesting authentication, but no credentials  
PPP: rejecting option 3  
PPP: sending LCP reject i/f 0  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: LCP config request i/f 0  
PPP: accepting option 2  
PPP: accepting option 7  
PPP: accepting option 8  
PPP: accepting option 5  
PPP: sending LCP ack i/f 0  
PPP: sending IPCP config i/f 0  
//---------------- but here it received the LCP protocol (0x8021) packet----------------------//  
//---------------- instead of ICPC protocol packet -------------//  
PPP: got packet B401 on i/f:0 protocol:0xc021  
PPP: sending LCP term ack i/f 0  
PPP: link i/f 0 is down  
GPRS Connection Failed

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [November 23, 2007, 5:07am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/13 "2007-11-23T05:07:02Z")

</div>

anybody have any experience on this situation?  
should i re-init the PPP stack or PPP interface before re-connecting it? I’d tried the ifconfig(… IFS\_PPP\_INIT…); but it didn’t solve my problem…

another problem i’m having is ifpending() will not give an updated status of the interface if i manually unplugged the physical cable from the modem. It would only reads the status from the stack which might be the previous status, unless i use the ifconfig(…IFS\_DOWN…) to properly bring down the interface. But i want to take into consideration in case of modem failure, power loss, etc… So is there any other way of checking the status of the PPP link manually?

---

<div class="post-metadata">

**Author:** ![User1080](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@User1080](https://forums.digi.com/u/User1080)\
**Post date:** [December 10, 2007, 7:15am UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/14 "2007-12-10T07:15:19Z")

</div>

[QUOTE=jordan;1121]i’m using Siemens MC35i Modem to connect to Malaysian ‘Celcom’ ISP.  
I dont really think there was a problem with the cellular line provider, instead it is the PPP/TCPIP stack we were using.[/quote]

friend, what are you talking about? Why were you quoting back the sentences i wrote earlier on? what is your point?

---

<div class="post-metadata">

**Author:** ![luis.serrano.aranda](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@luis.serrano.aranda](https://forums.digi.com/u/luis.serrano.aranda)\
**Post date:** [October 27, 2008, 1:42pm UTC](https://forums.digi.com/t/ppp-reconnection-afrter-a-closing/10762/15 "2008-10-27T13:42:23Z")

</div>

You’ve already solved the problem ?

I Have the same problem.

Thanks
