afwHeaderFillup() and afwdeDataIndication(..) in Zigbee Stack

5 thoughts on “afwHeaderFillup() and afwdeDataIndication(..) in Zigbee Stack

  1. Hi,
    I have two discrete ZE-61 modules that I intend to make communicate.One of them has been configured as coordinator and the other as the end device.
    The coordinator starts the network using afwStartNetwork() and I have set the parameter to nmlePermitJoiningRequest to 0xff.
    The end device on the other hand associates to the network using afwAssociation. To communicate with the co-ordinator I have filled the 
    packet header with afwHeader(AFW_16BIT_ADDR,  *(ADDRES*)NULL,0,2,1,0,0,AFW_TX_OPT_SECURITY_ENABLE,0).
     
    Then I have added some dummy data using afwAddElementToTransaction(…) and then sent using afwdeDataRequest(…) .I can see that the data has been transmitted without error from the status given by the callback afwdeDataConfirm(..).
    Now,in the coordinator side also,there is an indication that the data has been received as given by the  callback RFStartReceptionIndication() but the coordinator
    side callback afwdeDataIndication(…) has not been called back.
    Please help me find my errors with the usage of the stack.
      1. Hi,

        could you tell me FW version?

        thanks

        Hi,

        I am using the  Telit_Developer_Package_ZEx1_Pro_2.00 with bootloaders ZEx1.Z1x.02.00-B003-Bootloader.

        I am trying to modify the given example for democase according to my use.

        1. Hi

          When
          you use AFW_16BIT_ADDR as DstAddrMode in afwHeader you need to pass
          also a aAddrAddressDest, for example in your case if you would send a
          packet from end device to coordinator you should use:

           

          ADDRESS dstAddr;

          dstAddr.Short=0x0000;           

           cPacketHandle=afwHeader(  AFW_16BIT_ADDR,//BYTE DstAddrMode

                                           dstAddr,// ADDRESS aAddrAddressDest

                                            (WORD)NULL,                             //WORD aWoGroupAddress

                                            2,              //BYTE aByEPDest

                                            1,              //BYTE aByEPSrc

                                            0,   //WORD aByClusterID

                                            0,//WORD ProfileId

                                            0,  //BYTE TxOptions

                                            0); //BYTE Radius

          Where:

          1)      0x0000 is the coordinator address (The coordinator address is always 0x0000)

          2)      TxOption
          has been set without APS security (AFW_TX_OPT_SECURITY_ENABLE) because
          it needs a specific configuration to allow managing it.

          3)      Radius = 0 means that the stack will set it to the maximum value

           

          So if the End device is correctly joined to the network afwdeDataIndication should be called back on the Coordinator.

           

          You can use Telit SR Manager Tool plus a ZEx1 EVK board to sniff over the air the data exchanged between modules.

          1. Hi

            When
            you use AFW_16BIT_ADDR as DstAddrMode in afwHeader you need to pass
            also a aAddrAddressDest, for example in your case if you would send a
            packet from end device to coordinator you should use:

             

            ADDRESS dstAddr;

            dstAddr.Short=0x0000;           

             cPacketHandle=afwHeader(  AFW_16BIT_ADDR,//BYTE DstAddrMode

                                             dstAddr,// ADDRESS aAddrAddressDest

                                              (WORD)NULL,                             //WORD aWoGroupAddress

                                              2,              //BYTE aByEPDest

                                              1,              //BYTE aByEPSrc

                                              0,   //WORD aByClusterID

                                              0,//WORD ProfileId

                                              0,  //BYTE TxOptions

                                              0); //BYTE Radius

            Where:

            1)      0x0000 is the coordinator address (The coordinator address is always 0x0000)

            2)      TxOption
            has been set without APS security (AFW_TX_OPT_SECURITY_ENABLE) because
            it needs a specific configuration to allow managing it.

            3)      Radius = 0 means that the stack will set it to the maximum value

             

            So if the End device is correctly joined to the network afwdeDataIndication should be called back on the Coordinator.

             

            You can use Telit SR Manager Tool plus a ZEx1 EVK board to sniff over the air the data exchanged between modules.

            Hi,

             

            Looks like I had been using the wrong library,which
            was default in the example code provided.Using the bootloader library
            instead of the debug library and adding "BOOTLOADER" to the
            preprocessors list did the trick for me.

             

            Thank you for your kind support.