lwip-users
[Top][All Lists]
Advanced

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

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


From: Axel Lin
Subject: Re: [lwip-users] PPPoS: Question regarding reconnect after connection lost
Date: Thu, 11 May 2017 19:55:44 +0800

2017-04-07 23:35 GMT+08:00 Axel Lin <address@hidden>:
> 2017-04-06 21:18 GMT+08:00 Sylvain Rochet <address@hidden>:
>> Hi Axel,
>>
>> On Thu, Apr 06, 2017 at 08:58:10PM +0800, Axel Lin wrote:
>>>
>>> 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.
>>
>> You have to resend AT commands to reconnect. You need to switch back
>> your modem to command mode before, either by using DTR signal or by
>> using a predefined escape sequence that could never happen in the PPP
>> flow (which I do not recommend unless you are very careful with the
>> chosen asyncmap).
>
> Hi Sylvain,
> By following your suggestions, now it works.

Hi Sylvain,

In practice, it usually has application code sending data while PPP disconnect.
I use netconn API + FreeRTOS, so I have a thread keep sending data to internet.

While PPP re-connect there is a period I need to send AT commands and
calling ppp_connect(),
is there any thing I need to take care for my application code while
PPP discconect and re-connect?

Thanks,
Axel



reply via email to

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