2022-05-18 06:08 AM
Hi,
I have a wb55 nucleo and a wb55 usb dongle. The usb dongle is running zigbee onOff Server example code. However, it is using install code instead of preconfigured link key as shown below.
/* Using the default HA preconfigured Link Key */
//memcpy(config.security.preconfiguredLinkKey, sec_key_ha, ZB_SEC_KEYSIZE);
static uint8_t installCode[ZB_SEC_INSTALL_CODE_MAX_LENGTH] = {0x83,0xFE,0xD3,0x40,0x7A,0x93,0x97,0x23,0xA5,0xC6,0x39,0xB2,0x69,0x16,0xD5,0x05,0xC3,0xB5};
static uint64_t macID = 0x0080e125000095c6;
ZbSecAddDeviceLinkKeyByInstallCode(zigbee_app_info.zb, macID, installCode, ZB_SEC_INSTALL_CODE_MAX_LENGTH);
I have also configured the wb55 nucleo with the right link key as follows :
* Using the default HA preconfigured Link Key */
// 66B6900981E1EE3CA4206B6B861C02BB
uint8_t sec_key_ha_installCode[ZB_SEC_KEYSIZE] = {0x66,0xB6,0x90,0x09,0x81,0xE1,0xEE,0x3C,0xA4,0x20,0x6B,0x6B,0x86,0x1C,0x02,0xBB};
memcpy(config.security.preconfiguredLinkKey, sec_key_ha_installCode, ZB_SEC_KEYSIZE);
However, i am not able to join the network. I see the following log where its saying that wb55 nucleo (Server or cordinator) can't add shared key if no preconfigured link key.
<ESC>[0m[M4 APPLICATION] **********************************************************<CR><LF>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.000][API] Init_ZigbeeStack_Infrastructure<LF><CR>
<ESC>[0m[M4 APPLICATION] APP_ZIGBEE_StackLayersInit<CR><LF>
<ESC>[0m[M4 APPLICATION] Network config : APP_STARTUP_CENTRALIZED_COORDINATOR<CR><LF>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.016][PLATFORM] ZbNlmeResetReq : NLME-RESET.request (warmStart = 0)<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.014][PLATFORM] nwk_scan_req : MLME-SCAN.request (wpan0): type=1, page=0, mask=0x00002000, dur=4<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.279][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.280][PLATFORM] nwk_scan_req : MLME-SCAN.request (wpan0): type=0, page=0, mask=0x00002000, dur=4<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.543][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.544][PLATFORM] nwk_pick_quietest_channel : Found starting channel at 13 (num devices = 1, energy = 255)<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.546][PLATFORM] MLME-START.confirm : ifc:wpan0, channel:13, page: 0, pan:0x19b0, status:0x00<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.547][PLATFORM] nwk_handle_scan_conf_form_energy : NLME-NETWORK-FORMATION.request successful (nwkPanId = 0x19b0).<LF><CR>
<ESC>[0m[M4 APPLICATION] ZbStartup Callback (status = 0x00)<CR><LF>
<ESC>[0;92m [M0] <ESC>[0;92m[00000094.870][PLATFORM] nwk_handle_assoc : Association accepted, sending response (0x78ce, 0x0080e125000095c6)<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000095.367][PLATFORM] ZbApsmeAddKeyReq : Warning, can't add shared key if no preconfigured link key<LF><CR>
Posting the log from end node side. I have an error of 0xca from startup api. Not sure how to resolve this.
5/18/2022 18:48:20.207 [RX] - <ESC>[0m[M4 APPLICATION] **********************************************************<CR><LF>
<ESC>[0m[M4 APPLICATION] WIRELESS COPROCESSOR FW:<CR><LF>
<ESC>[0m[M4 APPLICATION] VERSION ID = 1.13.0<CR><LF>
<ESC>[0m[M4 APPLICATION] FW Type : FFD Zigbee stack<CR><LF>
<ESC>[0m[M4 APPLICATION] *******************************************structure<LF><CR>
****<CR><LF>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.000][API] Init_ZigbeeStack_Infrastructure<LF><CR>
<ESC>[0m[M4 APPLICATION] APP_ZIGBEE_StackLayersInit<CR><LF>
<ESC>[0m[M4 APPLICATION] Network config : APP_STARTUP_CENTRALIZED_ROnnels <ESC>[0;92m [M0] <ESC>[0;92m[00000000.276][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.546][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.815][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0m[M4 APPLICATION] ZbStartup Callback (status = 0xca)<CR><LF>
<ESC>[0m[M4 APPLICATION] Startup failed, attempting again after a shUTER<CR><LF>
lay (500 ms)<CR><LF>
<ESC>[0m[M4 APPLICATION] Network config : APP_STARTUP_CENTRALIZED_ROUTER<CR><LF>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.278][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.547][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0;92m [M0] <ESC>[0;92m[00000000.815][API] Scan Done - unscan channels 0x0<LF><CR>
<ESC>[0m[M4 APPLICATION] ZbStartup Callback (status = 0xca)<CR><LF>
<ESC>[0m[M4 APPLICATION] Startup failed, attempting again after a shUTER<CR><LF>
lay (500 ms)<CR><LF>
I have also configured the MAC properly using the API "ZbChangeExtAddr(zigbee_app_info.zb, (uint64_t)0x0080e125000095c6 );".
I have following questions
Regards,