lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwip 1.3.0 problems with UDP and TCP connection simultaneou


From: Felix Baur
Subject: [lwip-users] lwip 1.3.0 problems with UDP and TCP connection simultaneously?
Date: Mon, 25 Oct 2010 18:27:38 +0200

Dear all,

 

I have a little problem to work with a TCP- and UDP connection at the same time.

There are no problems when I establish the TCP connection or the UDP connection separately.  Only if I would use a UDP connection simultaneously  with one TCP link, I could not receive all UDP frames on my  client application. But if I close the TCP now- the UDP connection works very well again.

 

Ok- I thought: a resource problem. But I don’t have any buffer or  udp_send() errors.

Furthermore another point I don’t understand:  If I open a second TCP connection on another PC- all connections will work very well!! (2*TCP + *UDP)

 

Anyone an idea???

 

I use  lwip 1.3.0 (ported for a LM3s89xx MCU with FreeRTOS running)

 

Following code sequence I use in my “UDP Thread” which will be woken every 10ms:

/*******************************************************/

// allocate packet buffer

p = pbuf_alloc(PBUF_TRANSPORT, (1024 + 5) * sizeof(int), PBUF_RAM);

if(p==NULL) {

   // set error...

   break;

}

 

//

// write data to p->payload here

// ...

 

// send the frame

err =udp_send  (udp, p);

if(err != ERR_OK){

   // set error...

}

 

// De-allocate packet buffer

If(p)

  pbuf_free(p);

/*******************************************************/

 

 

Thank you!!

Felix

 

 


reply via email to

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