Hi,
I used NetservicesMod lib code (http://mbed.org/users/andrewbonney/libraries/NetServicesMod/lpcb7f) as a starting point and connect a Wavecom modem through to a UART port.
Initially, I couldn't make the PPP connection connect properly. Then I found that after I put a 10ms delay in PPPNetIf::poll() in PPPNetIf.cpp. It connects OK.
Does anyone know why we need to put a delay?
here is the PPPNetIf::poll() I modified:
void PPPNetIf::poll()
{
if(!m_connected)
return;
LwipNetIf::poll();
static u8_t buf[128];
////////////
I put a delay here
wait_ms(10); wait 10 ms
////////////
int len;
do
{
len = sio_tryread((sio_fd_t) m_pIf, m_buf, BUF_SIZE);
if(len > 0)
pppos_input(m_fd, m_buf, len);
} while(len>0);
}
Hi, I used NetservicesMod lib code (http://mbed.org/users/andrewbonney/libraries/NetServicesMod/lpcb7f) as a starting point and connect a Wavecom modem through to a UART port. Initially, I couldn't make the PPP connection connect properly. Then I found that after I put a 10ms delay in PPPNetIf::poll() in PPPNetIf.cpp. It connects OK. Does anyone know why we need to put a delay?
here is the PPPNetIf::poll() I modified:
void PPPNetIf::poll() { if(!m_connected) return; LwipNetIf::poll(); static u8_t buf[128];
//////////// I put a delay here wait_ms(10); wait 10 ms ////////////
int len; do { len = sio_tryread((sio_fd_t) m_pIf, m_buf, BUF_SIZE); if(len > 0) pppos_input(m_fd, m_buf, len); } while(len>0); }