<?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: How implemented the  Installation Codes for kw41z zigBee in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/How-implemented-the-Installation-Codes-for-kw41z-zigBee/m-p/955199#M7694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We usually recommend that you use the example available in the stack as those are already tested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please check the &lt;STRONG style="color: #993366; "&gt;ZigBee 3.0 Stack User Guide&lt;/STRONG&gt; available in the KW41Z SDK in the following path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;EM style="color: #0000ff; "&gt;&amp;lt;installation path&amp;gt;\docs\wireless\Zigbee&lt;/EM&gt; &lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P&gt;Something that I could notice it's that you are not following completely the recommendations of the APIs described in the user guide and yet using some of those functions like the following one. In chapter &lt;SPAN style="color: #800080;"&gt;&lt;EM&gt;5.8.3 Setting Up ZigBee Security&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #008000; "&gt;"Security can be set up in the application code using the function ZPS_vAplSecSetInitialSecurityState(), which must be called before ZPS_eAplAfInit()"&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;As this it's your custom implementation we can't really be sure in which part it is having the issue as according to the error message the link between the node it's not being correctly established, there are those calls not correctly used but in our stack we also have some libraries that you will need to implement in order to make your stack work.&amp;nbsp; I would recommend you to use the available information and examples in the SDK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;Estephania&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Aug 2019 14:35:19 GMT</pubDate>
    <dc:creator>stephanie_m</dc:creator>
    <dc:date>2019-08-07T14:35:19Z</dc:date>
    <item>
      <title>How implemented the  Installation Codes for kw41z zigBee</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/How-implemented-the-Installation-Codes-for-kw41z-zigBee/m-p/955198#M7693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I working on the custom implementation&amp;nbsp; of ZigBee. And I would like to add the security level. I use two devices for debugging. 1. The Coordinator with&amp;nbsp;ble_zigbee_coordinator firmware. 2. My device consists of the router with the capability end device.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To my device, I added the following code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PUBLIC uint8 au8DefaultTCLinkKey[16] =&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{ 0x5a, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x39 };&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt; * @brief Initialises the application related functions&lt;BR /&gt; * @return ERR_OK - on successful operation, error code otherwise&lt;BR /&gt; **/&lt;BR /&gt;PUBLIC uint32_t zBee_initRouterNode(void)&lt;BR /&gt;{&lt;BR /&gt; uint16 u16ByteRead;&lt;BR /&gt; PDM_teStatus eStatusReportReload;&lt;BR /&gt; uint32_t u32_returnValue = ERR_OK;&lt;BR /&gt; /* Stay awake */&lt;BR /&gt; PWRM_teStatus pwrmRet = PWRM_eStartActivity();&lt;BR /&gt; if(pwrmRet != PWRM_E_OK)&lt;BR /&gt; {&lt;BR /&gt; u32_returnValue = ERR_INIT;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;sNodeState.eNodeState = E_STARTUP;&lt;BR /&gt; PDM_teStatus pdm_retValue = PDM_eReadDataFromRecord(PDM_ID_APP_ROUTER, &amp;amp;sNodeState, sizeof(tsNodeState), &amp;amp;u16ByteRead);&lt;BR /&gt; if(pdm_retValue != PDM_E_STATUS_OK)&lt;BR /&gt; {&lt;BR /&gt; u32_returnValue = ERR_INIT;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/* Restore any report data that is previously saved to flash */&lt;BR /&gt; eStatusReportReload = eRestoreReports();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ZPS_u32MacSetTxBuffers (4);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ZPS_psAplAibGetAib()-&amp;gt;bUseInstallCode = BDB_JOIN_USES_INSTALL_CODE_KEY;&lt;/P&gt;&lt;P&gt;zBee_initMacAddr();&lt;/P&gt;&lt;P&gt;/* Initialise ZBPro stack */&lt;BR /&gt; ZPS_eAplAfInit();&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ZPS_vAplSecSetInitialSecurityState(ZPS_ZDO_PRCONFIGURED_INSTALLATION_CODE,&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;au8DefaultTCLinkKey,&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;0x00,&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;ZPS_APS_GLOBAL_LINK_KEY);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(sNodeState.eNodeState != E_RUNNING)&lt;BR /&gt; {&lt;BR /&gt; BDB_vNfSetPanID((uint16) RND_u32GetRand ( 1, 0xfff0 ) );&lt;BR /&gt; }&lt;BR /&gt; /* Initialise ZCL */&lt;BR /&gt; zBee_zclInit();&lt;BR /&gt; uint16_t panIdValue = BDB_vNfGetPanID();&lt;/P&gt;&lt;P&gt;/* Initialise other software modules&lt;BR /&gt; * HERE&lt;BR /&gt; */&lt;BR /&gt; zBee_bdbInit();&lt;/P&gt;&lt;P&gt;/* Always initialise any peripherals used by the application&lt;BR /&gt; * HERE&lt;BR /&gt; */&lt;BR /&gt; u8AssociatuionAttempts = 0;&lt;BR /&gt; //u8AssociatuionAttempts = ASSOCIATION_ATTEMPTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* The functions u8PDM_CalculateFileSystemCapacity and u8PDM_GetFileSystemOccupancy&lt;BR /&gt; * may be called at any time to monitor space available in the eeprom */&lt;BR /&gt; // TODO don't know if they exist DBG_vPrintf(TRACE_APP, "PDM: Capacity %d\r\n", u8PDM_CalculateFileSystemCapacity() );&lt;BR /&gt; // TODO don't know if they exist DBG_vPrintf(TRACE_APP, "PDM: Occupancy %d\r\n", u8PDM_GetFileSystemOccupancy() );&lt;/P&gt;&lt;P&gt;DBG_vPrintf(TRACE_APP, "Start Up StaTe %d On Network %d\r\n",&lt;BR /&gt; sNodeState.eNodeState,&lt;BR /&gt; sBDB.sAttrib.bbdbNodeIsOnANetwork);&lt;/P&gt;&lt;P&gt;/*Load the reports from the PDM or the default ones depending on the PDM load record status*/&lt;BR /&gt; if(eStatusReportReload !=PDM_E_STATUS_OK )&lt;BR /&gt; {&lt;BR /&gt; /*Load Defaults if the data was not correct*/&lt;BR /&gt; vLoadDefaultConfigForReportable();&lt;BR /&gt; }&lt;BR /&gt; /*Make the reportable attributes */&lt;BR /&gt; vMakeSupportedAttributesReportable();&lt;/P&gt;&lt;P&gt;zBee_printAPSTable();&lt;/P&gt;&lt;P&gt;return u32_returnValue;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And added change to app_zps_cfc.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*! Specify a type of security */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/*! ZPS_ZDO_NO_NETWORK_KEY/ZPS_ZDO_PRECONFIGURED_LINK_KEY/&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;ZPS_ZDO_DISTRIBUTED_LINK_KEY/ZPS_ZDO_PRCONFIGURED_INSTALLATION_CODE */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#define ZPS_ZDO_NWK_KEY_STATE ZPS_ZDO_PRCONFIGURED_INSTALLATION_CODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also, I added&amp;nbsp; to the&amp;nbsp; NXP IoT Toolbox&amp;nbsp; mobile application, my install code&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;code 99e7e404a31adf8b&amp;nbsp;&lt;/STRONG&gt;5a6967426565416c6c69616e63653039&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But&amp;nbsp; when I was&amp;nbsp; trying to connect my device to coordinator I got next errors.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/86409iD280CC48B5AC1A4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could you help me with solving this problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 07:04:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/How-implemented-the-Installation-Codes-for-kw41z-zigBee/m-p/955198#M7693</guid>
      <dc:creator>yaroslav_kyryle</dc:creator>
      <dc:date>2019-08-06T07:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How implemented the  Installation Codes for kw41z zigBee</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/How-implemented-the-Installation-Codes-for-kw41z-zigBee/m-p/955199#M7694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We usually recommend that you use the example available in the stack as those are already tested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please check the &lt;STRONG style="color: #993366; "&gt;ZigBee 3.0 Stack User Guide&lt;/STRONG&gt; available in the KW41Z SDK in the following path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;EM style="color: #0000ff; "&gt;&amp;lt;installation path&amp;gt;\docs\wireless\Zigbee&lt;/EM&gt; &lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P&gt;Something that I could notice it's that you are not following completely the recommendations of the APIs described in the user guide and yet using some of those functions like the following one. In chapter &lt;SPAN style="color: #800080;"&gt;&lt;EM&gt;5.8.3 Setting Up ZigBee Security&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #008000; "&gt;"Security can be set up in the application code using the function ZPS_vAplSecSetInitialSecurityState(), which must be called before ZPS_eAplAfInit()"&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;As this it's your custom implementation we can't really be sure in which part it is having the issue as according to the error message the link between the node it's not being correctly established, there are those calls not correctly used but in our stack we also have some libraries that you will need to implement in order to make your stack work.&amp;nbsp; I would recommend you to use the available information and examples in the SDK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;Estephania&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2019 14:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/How-implemented-the-Installation-Codes-for-kw41z-zigBee/m-p/955199#M7694</guid>
      <dc:creator>stephanie_m</dc:creator>
      <dc:date>2019-08-07T14:35:19Z</dc:date>
    </item>
  </channel>
</rss>

