[Top][All Lists]

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

Re: [lwip-users] PPPoS: Question regarding reconnect after connection lo

From: Ajay Bhargav
Subject: Re: [lwip-users] PPPoS: Question regarding reconnect after connection lost
Date: Thu, 6 Apr 2017 21:12:10 +0530

You can send +++ to your modem to come out of data mode. And send ATH to hang up the ongoing call.

Ajay Bhargav

On Apr 6, 2017 6:28 PM, "Axel Lin" <address@hidden> wrote:
2017-04-06 20:15 GMT+08:00 Sylvain Rochet <address@hidden>:
> Hi Axel,
> On Thu, Apr 06, 2017 at 05:08:12PM +0800, Axel Lin wrote:
>> Hi list,
>> My device sometimes got status_cb: err_code=PPPERR_CONNECT (Connection lost).
>> To reconnect, I call ppp_connect(pcb, 30); if got PPPERR_CONNECT but
>> it seems never success.
>> Initially, I can connect to internet after boot.
>> I usually got below phases:
>>         PPP_PHASE_DEAD
>> When I got PPPERR_CONNECT and calling ppp_connect(pcb, 30);
>> I always got
>>         PPP_PHASE_DEAD
>> It seems the PPP_PHASE_AUTHENTICATE is missed but I'm not sure if I
>> miss anything.
>> I'm mainly reference the doc/ppp.txt.
>> Should I also add ppp_set_auth() before calling ppp_connect() when got
> Looks like you failed to restart your chatscript between connections.

Hi Sylvain,

Thanks a lot for your comments.

Below is what I do to start PPP:

Send "AT+CGDCONT=<cid>,<PDP type>,<APN>"
Send "AT+CGAUTH=<cid>[, <auth_prot>[, <userId>, <password>]]"
Send "AT+CFUN=1"
Send "ATD*99***<cid>#"

ppp_set_usepeerdns(ppp, 1);
ppp_set_auth(ppp, PPPAUTHTYPE_ANY, userId, password);
ppp_connect(ppp, 0);

My understanding is after ATD*99***1#, I cannot send AT commands.
So it's not clear to me if I need to re-send above AT commands after got
PPPERR_CONNECT. Currently I just call ppp_connect(ppp, 30); to reconnect.

I just start testing with PRINTPKT_SUPPORT and PPP_PROTOCOLNAME enabled.
I'm not sure if there is any way to make connection lost happen, or I
just need to wait until it happen.


lwip-users mailing list

reply via email to

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