Simultaneous TCP and UDP communication problem

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

We're using the FreeRTOS and LWIP that came with the EVK1100 evaluation board. (LWIP version 1.2.0)

 

We have implemented a TCP server and a UDP "server" running in the same thread with the lwip_select (). - Both works as command interpreters, sending answer back.

 

Running TCP alone and UDP alone works fine

 

Running TCP and UDP at the same time make the network hang after a while. Other threads are still running.

 

We have traced to problem down to the while loop below when calling a lwip_sendto on the UDP port: (Always the same)

 

 

Does anyone know if this is a known problem of the LWIP port to AVR32 ?

Does anyone know of a fix ?

 

 

Thank you.

 

 

 

 

lwip_sendto()

  lwip_send()

    err = netconn_send(sock->conn, buf);

        sys_mbox_fetch(conn->mbox, NULL);

           sys_arch_mbox_fetch(mbox, msg, 0);

             while( pdTRUE != xQueueReceive( mbox, &(*msg), 10000 ) ) // time is arbitrary
             {

             }

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you check that the thread's stack size is enough?

 

I can't remember how lwIP supports configuring buffer sizes etc, but perhaps check that too? 

/Jakob Selbing

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jaksel,

 

Thank you for your comment.

 

The stacksize of the thread os 384 bytes. How to check if this is enough ?