lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP PPP - When connecting, int sifup(ppp_pcb *pcb) is


From: Sylvain Rochet
Subject: Re: [lwip-users] LWIP PPP - When connecting, int sifup(ppp_pcb *pcb) is called multiple times
Date: Thu, 29 Oct 2015 20:24:05 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Brian,

On Thu, Oct 29, 2015 at 11:55:50AM -0400, Brian Stull wrote:
> 
> After a little more debugging this morning I'm thinking this problem is
> related to some timeout/retry mechanisms of the PPP stack and how I've
> implemented my sio_write function. 
> 
> In my sio_write function, if the UART is busy (sending previous sio_write
> data) when the function is called I am returning "0". Which, I believe is
> the proper operation. If I put in a 1ms delay when this happens instead of
> just returning "0" immediately I am seeing this problem go away.

There is currently no tx queue in the PPP stack at the serial level, 
your sio_write() function MUST queue or write the data to the serial 
port. Worse, there is no framing information passed with sio_write() so 
you never know if it is safe to drop the data, which could be in a 
middle of a packet.

Anyway, adding the feature would be very welcomed. Basically we'll need 
to keep a pbuf list of pbuf which are not completely sent (with a sio.h 
configurable value of how big the queue can grow) and wait for a call to 
pppos_"something_telling_the_uart_is_ready"().

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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