|
From: | Brian Stull |
Subject: | Re: [lwip-users] LWIP PPP - When connecting, int sifup(ppp_pcb *pcb) is called multiple times |
Date: | Thu, 29 Oct 2015 11:55:50 -0400 |
To follow up: 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. My understanding is that the LWIP PPP stack should be able to handle the retrys during the PPP negotiation phase so I’m not sure what is going on. It’s almost like the PPP stack is trying to send data again too quickly after the transmission fails and this is causing some sort of problem. Any help is appreciated! -Brian From: address@hidden [mailto:address@hidden On Behalf Of Brian Stull I’ve been using the LWIP PPP stack for a while to connect to a cellular modem. It’s been working fine with one modem, but I’ve recently tried another modem (with another carrier) and the PPP sequence is not acting the same. Specifically, what I’m seeing is that the fsm_rconfack() function is being called multiple times during the PPP negotiation which is then calling my PPP link callback function. In fsm_rconfack(): case PPP_FSM_ACKSENT: UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ f->state = PPP_FSM_OPENED; f->retransmits = pcb->settings.fsm_max_conf_req_transmits; if (f->callbacks->up) (*f->callbacks->up)(f); /* Inform upper layers */ break; This case statement is being called which then tells my application that the PPP link is up. The problem is it is being called multiple times. Any ideas is this is valid to be called multiple times? -Brian |
[Prev in Thread] | Current Thread | [Next in Thread] |