2 Replies Latest reply on Dec 13, 2016 8:43 AM by darec_2125511

    UDP Transmit Callback - v3.5.2 WICED NetX Duo stack

      Using v3.5.2 WICED SDK with ThreadX and NetX stack.  Trying to figure out how to get a callback or other notification that a UDP packet has been sent.  Thus far no luck.  Cannot just blindly wait 1-2 seconds after each send, there must be a more intelligent way than that, taking that approach will make the execution take forever.

       

      I am trying to debug an issue with a remote unit, and I was going to add UDP to transmit out debug info to a listener on my PC so I can try to capture and debug without having direct physical access to the unit.  I know that adding UDP debugging will slow it down, I am trying to minimize that by using a callback to let me know that the UDP message has been sent so I do not try to add data faster than it can be send and create a new problem. 

       

      Suggestions?  I cannot seem to find anything.  Please do not recommend lwIP, I have a lot of energy put into the NetX stack for this project including customization of some functions to address lacking functionality, so looking for NetX based solutions.  The UDP send and receive examples do not have any intelligence when it comes to this, I assume that they rely on a slow messaging rate to help it along, the message will hopefully be sent before the next one.  I am trying to minimize the impact of UDP debugging, so I need some way to know when the packet has been sent out.  How?  Can I look at some field in the packet?  Undocumented callback?

       

      Thanks.

       

      PS - If it makes any difference, this unit is a client, connected to an AP and connected to a remote server downloading files, info.  

        • 1. Re: UDP Transmit Callback - v3.5.2 WICED NetX Duo stack

          As per the discussion, UDP has no callback or ACK functionality like TCP/IP. So once the packet sent you need to believe that it is trasmitted properly. If you are OK then you can go with TCP for the callback.

          • 2. Re: UDP Transmit Callback - v3.5.2 WICED NetX Duo stack

            I realize the limitations of using UDP over TCP/IP and there is no guarantee of delivery, but to follow up on what you said, I am looking for notification that the UDP packet has been sent, it has left the building...

            rash wrote:

             

            As per the discussion, UDP has no callback or ACK functionality like TCP/IP. So once the packet sent you need to believe that it is trasmitted properly. If you are OK then you can go with TCP for the callback.

            So how do I know that the packet has been sent and is no longer queued?  That is what I am looking for.  Surely there must be some method to know when that happens.  Cannot believe that the only thing I can do is insert a dumb delay and hope that after the delay is done that the packet has been sent...  How are you supposed to write an app with any kind of efficiency based on that approach?