lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] PPPoS: How to config proper PPP_MAXIDLEFLAG?


From: Sylvain Rochet
Subject: Re: [lwip-users] PPPoS: How to config proper PPP_MAXIDLEFLAG?
Date: Thu, 29 Jun 2017 14:35:52 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Axel,


On Thu, Jun 29, 2017 at 08:15:39PM +0800, Axel Lin wrote:
> Hi,
> While reading the code and the comment, I don't quite understanding
> how to config proper PPP_MAXIDLEFLAG.
> The comment says "If the link has been idle, we'll send a fresh flag
> character to flush any noise".
> 
> I'm curious in what kind of situation a user needs to change PPP_MAXIDLEFLAG
> and how to judge a good PPP_MAXIDLEFLAG setting?
> What happened if PPP_MAXIDLEFLAG is too small or too large?

Value mostly depends on how harsh the environment in which your device 
is going to be installed is, on which you will agree is something pretty 
hard if not impossible to guess... :-)

Anyway, max idle time is not really special here, any timeout set to 
retry or recover something is more or less a magic value anyway.


> I google and found some users set PPP_MAXIDLEFLAG to 0:
> (But I don't know if below comment is correct or not.)
> e.g.
> https://github.com/espressif/esp-idf/blob/master/components/lwip/include/lwip/port/lwipopts.h
> 
> /**
>  * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char.
>  * TODO: If PPP_MAXIDLEFLAG > 0 and next package is send during
> PPP_MAXIDLEFLAG time,
>  *       then 0x7E is not added at the begining of PPP package but
> 0x7E termination
>  *       is always at the end. This behaviour brokes PPP dial with GSM 
> (PPPoS).
>  *       The PPP package should always start and end with 0x7E.
>  */

Well, they use a broken GSM modem, HDLC frames separated by a single 
flag character is perfectly conform to HDLC specifications.

Anyway, for GSM modems, since flag characters are not actually sent over 
the air, guarding each frame with two flags character does not consume 
more billed bandwidth so it does not hurt doing so.


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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