lwip 1.4.1 tcp raw example

Showing results for 
Search instead for 
Did you mean: 

lwip 1.4.1 tcp raw example

NXP Employee
NXP Employee
Content originally posted in LPCWare by micronpn on Fri Aug 01 06:49:38 MST 2014
Hi all,

I tryed the 'standard' echo example using raw sockets and in my configuration it works but sends each message 2 times.
I debugged it and I found that the 2nd time the message is always sent inside the callback function for the received message (it receives the echo replied by the echo server). Considering that the pbuf_free() is executed in the send function I really don't understand why it is already valid when the sent callback is executed. Its address is not null and the content of the payload is always the echo message.

If I remove the tcp_write() inside the message sent callback everything works fine.
I don't understand also why there is the tcp_write() inside the callback considering that every action to receive and transmit a packet is done every 250 milliseconds calling    sys_check_timeouts() and  ethernetif_input().

Is it normal? Wasn't updated the example?
Any answer/help will be appreciated.

I am using lwip 1.4.1 on a NXP LPC1769 on an EA AOAA board using the echo example to test the troughput of the network.
Labels (1)
0 Kudos
0 Replies