lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwip hangs after >12 hours of work


From: Artem Moroz
Subject: [lwip-users] lwip hangs after >12 hours of work
Date: Wed, 25 Mar 2020 16:06:47 -0700 (MST)

Hi, All!

I have STM32F7 board with lwip 2.0.3 running PPOS connection with SIMCOM
modem. I am attaching my lwipopts.h file.  lwipopts.h
<http://lwip.100.n7.nabble.com/file/t2270/lwipopts.h>   After some (long)
period of  time when modem fails to transmit data, the PPOS connection seems
to be "hung". It does nothing. No retries. I've tried to simulate the
behavior by dropping connection on counter variable, but it does restore. 

I have the following output function which shows error "MDM tx timeout end"
and then "MDM tx send failed" two times and then gets not invoked. 

static u32_t ppp1_output_cb(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx)
{
        //printf("ppp1_o len %d begin\n", len);
        osEvent evt={0};
        do
        {
                evt = osMessageGet(msgLwipTxUartHandle, 0);

        } while(evt.status == osEventMessage);

        if (!g_bModemNetworkInited)
        {
                printf("MDM tx not inited end\r\n");
                return len;
        }

        if (g_bModemSendFailed)
        {
                printf("MDM tx send failed\r\n");
                return len;
        }

        osSemaphoreWait(semModemHandle, osWaitForever);
        HAL_UART_Transmit_DMA(g_pUartModem, data, len);
        osSemaphoreRelease(semModemHandle);

//      static int nSent = 0;
//
//      if (nSent < 200)
//      {
//      nSent++;
        evt = osMessageGet(msgLwipTxUartHandle, 500);
        if (evt.status == osEventMessage)
        {
                //printf("MDM tx len %lu\n", len);
                return len;
        }
//      }
//      else
//      {
//              osDelay(500);
//
//      }

        g_bModemSendFailed = 1;
        printf("MDM tx timeout end\r\n");
        //pppapi_close(pcb, 1);

        return len;
}

What may be the problem? How can I trace it down?





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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