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.

APS acknowledgement

Other Parts Discussed in Thread: PMP

Hi all,

Suppose coedinator sends data to router. how the cordinator knows(from the application layer) if the trasmission fails? how can we know the status of MAC ACK from the application layer?

please help

thank you.

arun

  • Hi,

     

    In case a packet sent from application level without AF_ACK_REQUEST enabled,

    the ACK status received by application level will indicate the ACK status of MAC layer.

  • Hi Mr. Sherer,

    how can i enable AF_ACK_REQUEST, I couldn't find an option for that.

    Is it possible to read the status of MAC level acknowledgement in the application layer?

    please help

    Thanks in advance,

    arun

  • Hi Arun,

    if you want to enable AF_ACK_REQUEST

    Add the

     Ret = AF_DataRequest( &DstAddr, &epDesc,CLUSTERID,(byte)len,
                                             (byte *)buf,&TransID,(AF_DISCV_ROUTE |AF_ACK_REQUEST), AF_DEFAULT_RADIUS );

     

    you will get the ack here

       case AF_DATA_CONFIRM_CMD:
              // This message is received as a confirmation of a data packet sent.
              // The status is of ZStatus_t type [defined in ZComDef.h]
              // The message fields are defined in AF.h
              afDataConfirm = (afDataConfirm_t *)MSGpkt;
              sentEP = afDataConfirm->endpoint;
              sentStatus = afDataConfirm->hdr.status;
              sentTransID = afDataConfirm->transID;
              (void)sentEP;
              (void)sentTransID;

        if ( sentStatus != ZSuccess )
              {
                // The data wasn't delivered -- Do something
              }

    As Ighor Mentioned without AF_ACK_REQUEST you will get the ack from the mac layer. With AF_ACK_REQUEST you will get the ack from next hop ( may be destination or route to destination).

    hope it helps

    Thanks and Regards

    Lakshman,PMP
     

  • hi LAKSHMANAN KUMAR RANGARAJ

    am getting error i this portion..

    case AF_DATA_CONFIRM_CMD:
              // This message is received as a confirmation of a data packet sent.
              // The status is of ZStatus_t type [defined in ZComDef.h]
              // The message fields are defined in AF.h
              afDataConfirm = (afDataConfirm_t *)MSGpkt;
              sentEP = afDataConfirm->endpoint;
              sentStatus = afDataConfirm->hdr.status;
              sentTransID = afDataConfirm->transID;
              (void)sentEP;
              (void)sentTransID;

    what may be the problem??

    please help

    arun

  • Hi Arun,

    What is the error?

  • Hai Sherer,

    some coding error,afDataConfirm is a function and it is accessed using an arrow operator

    is their any event indicating the the arrival of MAC schnowledgement?

    thank you 

    arun

  • In my application i want to write a data in UART only when a transmission fails

  • thanks LAKSHMANAN KUMAR RANGARAJ,

    I tried this 

    LAKSHMANAN KUMAR RANGARAJ said:

     Ret = AF_DataRequest( &DstAddr, &epDesc,CLUSTERID,(byte)len,
                                             (byte *)buf,&TransID,(AF_DISCV_ROUTE |AF_ACK_REQUEST), AF_DEFAULT_RADIUS );

     

    you will get the ack here

       case AF_DATA_CONFIRM_CMD:
              // This message is received as a confirmation of a data packet sent.
              // The status is of ZStatus_t type [defined in ZComDef.h]
              // The message fields are defined in AF.h
              afDataConfirm = (afDataConfirm_t *)MSGpkt;
              sentEP = afDataConfirm->endpoint;
              sentStatus = afDataConfirm->hdr.status;
              sentTransID = afDataConfirm->transID;
              (void)sentEP;
              (void)sentTransID;

        if ( sentStatus != ZSuccess )
              {
                // here i write some data to UART
              }

     

    but it is working only once. I put this code in cordinator. cordinator sending data to a router every 1 second. At some point i switched off the the router and the required data is written to UART. When i again switched on the router, the cordinator hangs..it is not receving data from the router.

    please help

    arun

     

  • also cordinator couldn't sent data