<?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: 802.15.4 Direct Data Transmission in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628888#M2051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erwin,&amp;nbsp;&lt;/P&gt;&lt;P&gt;With that modification on the coordinator, you should be able to send direct data but it's likely your End Device is not receiving it, you can verify that with an sniffer.&lt;/P&gt;&lt;P&gt;If that's the case, you still need to tell the End Device to keep the Radio On when the device is in Idle state. That's done modifying the pib attribute "RxOnWhenIdle".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could do it during initialization (ie. after&amp;nbsp;MApp_init(); is called).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;SetReceiverOn&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 mlmeMessage_t msg&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
 bool_t value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; TRUE&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gMlmeSetReq_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgData&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;setReq&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pibAttribute &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gMPibRxOnWhenIdle_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgData&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;setReq&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pibAttributeValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;MSG_Send&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;NWK_MLME&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a good practice, you should indicate this capability to the Coordinator when joining the network at "App_SendAssociateRequest(void)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;/* We want the coordinator to assign a short address to us. */&lt;/SPAN&gt;
 pAssocReq&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;capabilityInfo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gCapInfoAllocAddr_c &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; gCapInfoPowerMains_c &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; gCapInfoRxWhenIdle_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2017 19:04:35 GMT</pubDate>
    <dc:creator>jc_pacheco</dc:creator>
    <dc:date>2017-02-13T19:04:35Z</dc:date>
    <item>
      <title>802.15.4 Direct Data Transmission</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628887#M2050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a New Project in BeeKit, using HCS08 MAC Codebase 2.6.1,&lt;/P&gt;&lt;P&gt;and MyWirelessApp Demo Non Beacon template.&lt;/P&gt;&lt;P&gt;In this template, coordinator sends indirect data to device:&lt;/P&gt;&lt;P&gt;mpPacket-&amp;gt;msgData.dataReq.txOptions = gTxOptsAck_c | gTxOptsIndirect_c;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and device polls coordinator for data:&lt;/P&gt;&lt;P&gt;mTimer_c = TMR_AllocateTimer();&lt;/P&gt;&lt;P&gt;TMR_StartSingleShotTimer(mTimer_c, mPollInterval, AppPollWaitTimeout);&lt;/P&gt;&lt;P&gt;/* Send the Poll Request to the MLME. */&lt;/P&gt;&lt;P&gt;if(MSG_Send(NWK_MLME, pMlmeMsg) == gSuccess_c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indirect Data transmission works just fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in my case the device is AC powered and can therefore always listen, if properly programmed, I have modified my project to allow Direct Data transmission,&lt;/P&gt;&lt;P&gt;by commenting out the indirect option gTxOptsIndirect_c in the coordinator,&lt;/P&gt;&lt;P&gt;and by commenting out the above three instructions in the device.&lt;/P&gt;&lt;P&gt;Obviously I am still missing something, Direct Data transmission doesn't work yet. But maybe HCS08 MAC Codebase 2.6.1 doesn't allow Direct Data transmission in Non Beacon mode.&lt;/P&gt;&lt;P&gt;Thank you for your advice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 11:25:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628887#M2050</guid>
      <dc:creator>erwinbeck</dc:creator>
      <dc:date>2017-02-13T11:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: 802.15.4 Direct Data Transmission</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628888#M2051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erwin,&amp;nbsp;&lt;/P&gt;&lt;P&gt;With that modification on the coordinator, you should be able to send direct data but it's likely your End Device is not receiving it, you can verify that with an sniffer.&lt;/P&gt;&lt;P&gt;If that's the case, you still need to tell the End Device to keep the Radio On when the device is in Idle state. That's done modifying the pib attribute "RxOnWhenIdle".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could do it during initialization (ie. after&amp;nbsp;MApp_init(); is called).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;SetReceiverOn&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 mlmeMessage_t msg&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
 bool_t value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; TRUE&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gMlmeSetReq_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgData&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;setReq&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pibAttribute &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gMPibRxOnWhenIdle_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 msg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;msgData&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;setReq&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;pibAttributeValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;MSG_Send&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;NWK_MLME&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;msg&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a good practice, you should indicate this capability to the Coordinator when joining the network at "App_SendAssociateRequest(void)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;/* We want the coordinator to assign a short address to us. */&lt;/SPAN&gt;
 pAssocReq&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;capabilityInfo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gCapInfoAllocAddr_c &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; gCapInfoPowerMains_c &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; gCapInfoRxWhenIdle_c&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 19:04:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628888#M2051</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-13T19:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: 802.15.4 Direct Data Transmission</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628889#M2052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Juan Carlos&lt;/P&gt;&lt;P&gt;Thank you for your quick response. And you were absolutely right, the End Device hadn't the Radio On. In the MyWiressApp Non Beacon demo, the default for the PIB attribute "RxOnWhenIdle" is FALSE, both for Coordinator and End Device.&lt;/P&gt;&lt;P&gt;I verified this in MApp_init.c for Coordinator and End Device, by sending GetReq messages to the MLME port.&lt;/P&gt;&lt;P&gt;Then out of curiosity I started sending out GetReg messages at strategic locations in my program&lt;/P&gt;&lt;P&gt;What I observed was pretty interesting. First of all I was surprised that the Coordinator starts out with Radio Off. What surprised me even more, how long the Coordinator stays in that condition as it steps through its state machine. At the beginning of the StartCoordinator state the Radio is still Off, and then all of sudden, at the beginning of the next state, the StartCoordinatorWaitConfirm state, the Radio is On, without any intervention on my part with a SetReq message! There seems to be quite a bit going on under the hood of the MAC/PHY layer, invisible to the C programmer.&lt;/P&gt;&lt;P&gt;After that experimentation, an with your piece of code, it was a piece of cake to resolve my problem, everything works now.&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;Erwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 17:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628889#M2052</guid>
      <dc:creator>erwinbeck</dc:creator>
      <dc:date>2017-02-14T17:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: 802.15.4 Direct Data Transmission</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628890#M2053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 18:26:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/802-15-4-Direct-Data-Transmission/m-p/628890#M2053</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-14T18:26:27Z</dc:date>
    </item>
  </channel>
</rss>

