lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Consecutive calls to sendto() and recvfrom() functions


From: pekez
Subject: Re: [lwip-users] Consecutive calls to sendto() and recvfrom() functions
Date: Fri, 28 Oct 2016 17:55:06 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Thank you both Sergio and David for your answers.

Now, I tried next things:

1) included Davids proposed solution, that is added sleep of 1 sec after the first packet is sent by client. This make app almost work, but it still behaves randomly. For example, most of the time client succesfully sends all 4 packets, and receives all 4, but third received packet doesn't have the right payload (in this example, it receives 'h' instead of 'g'). ZYNQ server did sent 'g' from app layer (I don't know how to check it from lower layers). Sometimes, client doesn't receive the last packet at all, but third packet has the right payload ('g'). Sometimes app works completely how it should.

2) included Davids solution in PC client + set IP_DEBUG and LWIP_DEBUG options in LWIP library. Guess what? In this case the app works always as it should (at least so far). Maybe all those prints give the server app enough time to process everything or something, I am really not sure how that can affect the app.

ARP_QUEUEING option is set to true by default in LWIP.

Sergio, can you just explain what you mean by third sentence, how can I check all those things (port, driver) and what is known-to-work app?

I forgot to mention that everything works completely fine all the time when I send from client 1 message and then receive 1 message, and vice verca at server. So problems occur only when I want to send/receive more messages consecutively.


On 28.10.2016 15:41, Sergio R. Caprile wrote:
If you have lost messages, you should run a capture and see what comes out and what not, maybe there is an ARP operation taking place while you believe messages are being lost. You should check your port and your layer-2 driver with a known-to-work application.

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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