PPP reconnection afrter a closing

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

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)

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

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 ‘ATD99**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 ‘ATD991#’
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 'ATD
99
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 'ATD
99
**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;
}

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

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?

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

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…

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 ‘ATD99**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 ‘ATD99**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

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

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.

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 ‘ATD99**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 ‘ATD99**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

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?

[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?

You’ve already solved the problem ?

I Have the same problem.

Thanks