<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [MC13213 - Zigbee] Loop of AF_DataRequest in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170017#M11338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I did as you suggested but in fact I can send a message every 3 seconds. How can I increase this packet rate?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Dec 2007 04:34:02 GMT</pubDate>
    <dc:creator>CecchiSandrone</dc:creator>
    <dc:date>2007-12-07T04:34:02Z</dc:date>
    <item>
      <title>[MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170013#M11334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to make cyclic AF_DataRequest, for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for(i=0;i&amp;lt;100;i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AF_DataRequest(....);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But as I read AF_DataRequest is async so I must wait for a confirm for every packet. Can you suggest me a way to do this easy?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2007 18:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170013#M11334</guid>
      <dc:creator>CecchiSandrone</dc:creator>
      <dc:date>2007-12-04T18:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170014#M11335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;cecchi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the code you write as an example is not possible, if you do not make the scheduler run then no packets will be send.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;so what you can do is capture the confirm in the :BeeAppDataConfirm() function&lt;/DIV&gt;&lt;DIV&gt;then start a timer to trigger the next transmission.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;here is a bit of pseudo code :&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Add something like this to the confirm function :&lt;/DIV&gt;&lt;DIV&gt;TMR_StartSingleShotTimer(SendpacketTimerId, 100, SendPacketCallback());&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SendPacketCallback( tmrTimerID_t timerId )&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;(void) timerId;&lt;/DIV&gt;&lt;DIV&gt;call AF_dataRequest to send a packet)&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BR,&lt;/DIV&gt;&lt;DIV&gt;Mads&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2007 02:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170014#M11335</guid>
      <dc:creator>Mads</dc:creator>
      <dc:date>2007-12-05T02:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170015#M11336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks Mads, I also solved this using confirmId parameter in AF_DataRequest. But so I can send 1 packet every 3 seconds average. It's the max "packet rate" that can I reach?&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#define MAX_ATTEMPTS 100uint8_t requestor[2];index_t txAttempt;zbApsCounter_t confirmId = 0x6;void BeeAppDataIndication  (  void  ){  apsdeToAfMessage_t *pMsg;  zbApsdeDataIndication_t *pIndication;    while(MSG_Pending(&amp;amp;gAppDataIndicationQueue))  {    /* Get a message from a queue */    pMsg = MSG_DeQueue( &amp;amp;gAppDataIndicationQueue );    /* ask ZCL to handle the frame */    pIndication = &amp;amp;(pMsg-&amp;gt;msgData.dataIndication);    /* handle the command */    if(pIndication-&amp;gt;aClusterId[0] == appDataCluster[0]) {       Copy2Bytes(requestor,pIndication-&amp;gt;aSrcAddr);       txAttempt = 0;       SendPacket();                             }                                                                                      /* Free memory allocated by data indication */    MSG_Free(pMsg);  }}void BeeAppDataConfirm  (  void  ){  apsdeToAfMessage_t *pMsg;  zbApsdeDataConfirm_t *pConfirm;  while(MSG_Pending(&amp;amp;gAppDataConfirmQueue))  {    /* Get a message from a queue */    pMsg = MSG_DeQueue( &amp;amp;gAppDataConfirmQueue );    pConfirm = &amp;amp;(pMsg-&amp;gt;msgData.dataConfirm);    /* Action taken when confirmation is received. */    if( pConfirm-&amp;gt;status == gSuccess_c )    {      /* successful confirm */      if(pConfirm-&amp;gt;confirmId == confirmId)        SendLQI();          }        /* Free memory allocated in Call Back function */    MSG_Free(pMsg);  }}void SendPacket  (  void  ) {  if(txAttempt != MAX_ATTEMPTS) {       afAddrInfo_t addrInfo;    addrInfo.dstAddrMode = gZbAddrMode16Bit_c;    Copy2Bytes(addrInfo.dstAddr.aNwkAddr,requestor);     addrInfo.dstEndPoint = 0x01;    addrInfo.srcEndPoint = 0x01;    addrInfo.txOptions = gApsTxOptionNone_c;    addrInfo.radiusCounter = afDefaultRadius_c;    /* set up cluster */    Copy2Bytes(addrInfo.aClusterId, appDataCluster);    /* send the data request */    (void)AF_DataRequest(&amp;amp;addrInfo,10,"Message",&amp;amp;confirmId);    txAttempt++;  }   }          &lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170015#M11336</guid>
      <dc:creator>CecchiSandrone</dc:creator>
      <dc:date>2020-10-29T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170016#M11337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I can not tell you what the exact data rate is,&lt;/DIV&gt;&lt;DIV&gt;You should be able to send&amp;nbsp;the next&amp;nbsp;packet right after recieving the confirm.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Try adding timer as i suggested to the confirm code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;also please note that the confirmID is NOT set by you, it is set by the lower layer and you can provide a pointer so you can receive the id used. but it is not needed to track this ID as you are the one initiating the send packet and you only receive confirms on the packets the application send.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BR,&lt;/DIV&gt;&lt;DIV&gt;Mads&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 01:55:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170016#M11337</guid>
      <dc:creator>Mads</dc:creator>
      <dc:date>2007-12-07T01:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170017#M11338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I did as you suggested but in fact I can send a message every 3 seconds. How can I increase this packet rate?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 04:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170017#M11338</guid>
      <dc:creator>CecchiSandrone</dc:creator>
      <dc:date>2007-12-07T04:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170018#M11339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Please note that when you send data to end devices you can not send data faster than their poll rate.&lt;/DIV&gt;&lt;DIV&gt;your option is to increase the poll rate - but this is not recommend, else enable the RxOnWhenIdle property on the Freescale Beeapps component.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can only recommend buying an ZigBee protocol analyzer so you can see what happens over the air.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Br,&lt;/DIV&gt;&lt;DIV&gt;Mads&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 10:49:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170018#M11339</guid>
      <dc:creator>Mads</dc:creator>
      <dc:date>2007-12-07T10:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: [MC13213 - Zigbee] Loop of AF_DataRequest</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170019#M11340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;In ApplicationConf.h I found this:&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#define mDefaultValueOfPollTimeOut_c 3000&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;Modifying this I can get higher "packet rate" with obviously more power consumption.&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:18:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC13213-Zigbee-Loop-of-AF-DataRequest/m-p/170019#M11340</guid>
      <dc:creator>CecchiSandrone</dc:creator>
      <dc:date>2020-10-29T09:18:23Z</dc:date>
    </item>
  </channel>
</rss>

