This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Tiva lwip server and client issue

Hi All,

I'm developing a firmware that acts as http server on port 8080 and as client, making connection to a remote http server.

If I enable only the http server (8080) all works fine, I can connect to the tiva by my pc web browser, but if I enable the http client too (it start making connection every 5 seconds to a remote server sending an alive message), randomly the tiva crash and the watchdog reset the micro. Can the lwip stack manage both server and client at the same time, active and passive connections ?

I have reduced the crash checking the pcb state before pass it to the tcp_close () to close the connection,  if I pass it in closed state the tiva crash too much times, but I don't know if it's a stack bug, varius examples call tcp_close without make this check.

Thanks! !

Riccardo

  • Riccardo Cardinali said:
    I have reduced the crash checking the pcb state before pass it to the tcp_close () to close the connection,  if I pass it in closed state the tiva crash too much times, but I don't know if it's a stack bug, varius examples call tcp_close without make this check.

     Hi Riccardo, I dont' know in deep library but passing a null pointer is forever creating dangling references, maybe this crash seldom or instantly.

     On TI example for Linux (Winzz too)  a similar error was on TCP UDP send receive, I corrected due forever program was core dumping after trying closing an already or never opened  socket. On post mortem dump was clearly reason about pointer reference out of scope.

  • Hi Roberto,

    The pcb is not null,  it can be in closed state, I never pass a null pointer to the close function. The most important think I need know is if this stack can manage active and passive connections at the same time.

    Thanks for your replay! ;)
    Riccardo

  • Riccardo Cardinali said:

    The pcb is not null,  it can be in closed state, I never pass a null pointer to the close function. The most important think I need know is if this stack can manage active and passive connections at the same time.

     Hi Riccardo, I think yes but I left LWIP and UIP too in favour of TIRTOS stack is more close to BSD like standard I know from long time so take an eye to original page describing this protocol: http://lwip.wikia.com/wiki/LwIP_Wiki

    I got no information from old attempt to use it, time elapse at fast rate and oblivion take precedence over unused work, just working project is maintained and prepared to port away from too. It is primary BSD hosted for testability so I follow guidelines of, also LWIP has BSD extension, Adam has worked after graduation and is still working on this project is base for selling his contiki activity.