This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AF_DataRequest function.

When device A sends to device B a message, it uses the AF_DataRequest function.

I wanted to know pleaes, when device A sends a message to device B, and AF_DataRequest returns afStatus_SUCCESS, does it mean that device B has necessarily received the message, or does it just mean that device A has managed to send the message successfully, without knowing if device B has received it?

Thank you very much.

Shahar.

  • I believe the SRSP simply indicates that it was transmitted.

    If you specify AF_ACK_REQUEST in the flags parameter, then the AF_DATA_CONFIRM message will indicate that the destination received the message (APS ACK).

    If you don't specify AF_ACK_REQUEST, then AF_DATA_CONFIRM confirms a response from the first hop (MAC ACK).

    AF_DATA_CONFIRM has a status byte that must be examined.

  • Hello,

    I reached this thread when searching information about AF_DataRequest.

    I wanted to ask please,

    If you specify the AF_ACK_REQUEST in the tx_options, does the AF_DataRequest function won't return an afStatus_SUCCESS only if the message has reached its destination? (not just the first hop)

    If its not correct, could you please tell me how to examine the AF_DATA_CONFIRM in order to know if the destination has received the sent message?

    Thank you very much in advance.

  • The AF_DATA_REQUEST with tx_options == AF_ACK_REQUEST may have an SRSP with a status of SUCCESS even if the message does not reach the final destination.

    The AF_DATA_CONFIRM message looks like

    Length, Cmd0, Cmd1, Status, EndPoint, TransId.  These are all single byte values.

    Status == 0 is SUCCESS.

    This is all documented in swra175a.pdf

     

     

  • I'm trying to implement a timeout feature when an APS ACK is not received for a certain amount of time....

    I'm noting that when using the AF_ACK_REQUEST option for the AF_DataRequest function (in SampleApp.c of ZStack-MSP2618-2.3.0), I only register the first APS ACK received.  The AF_DATA_CONFIRM_CMD case (in ZDApp.c) is never executed after this initial time.

    I've also noted that when I don't use the AF_ACK_REQUEST option, I still get one (and only one) iteration of the AF_DATA_CONFIRM_CMD case, so I doubt whether my configuration of the AF_DataRequest function is configuring the reception of APS ACKs at all.

    Anyone else in a similar boat or have an idea as to why this may be happening?