AnsweredAssumed Answered

Howto join live Zigbee 3.0 Light network

Question asked by matthias.brand@gmail.com on Jan 8, 2020
Latest reply on Jan 28, 2020 by Sebastián Del Río

Hello

 

I have a question similar to How and where to set default link keys? from Warren Ashcroft and ZBPro Configuration JN-AN-1218 from @youpko.

 

I'm using JN-AN-1218 Zigbee 3.0 Light Bulb example (version 1008) with JN-SW-4170 (version 1840) on an JN5168 chip.

 

Build configuration is "make LIGHT=ExtendedColorLight JENNIC_CHIP_FAMILY=JN516x JENNIC_CHIP=JN5168 DR=DR1175 TRACE=1 GP_SUPPORT=1 GP_DEVICE=PROXY_BASIC TOUCHLINK=1".

 

All compiles fine, however I am unable to joing a live network (Philips Hue).

 

I tried following the usermanual "JN-AN-1218-ZigBee-3-0-Light-Bulbs.pdf" chapter "8.1 Touchlink Preconfigured Link Key".

 

However on follwing step 2 (Application override key)

#define BDB_APPLICATION_DEFINED_TL_MASTER_KEY

the build fails on linking.

Linking ../../ExtendedColorLight/Build/ExtendedColorLight_GpProxy_JN5168_DR1175.elf ...
/c/NXP/bstudio_nxp/sdk/Tools/ba-elf-ba2-r36379/bin/ba-elf-gcc -Wl,--gc-sections -Wl,-u_AppColdStart -Wl,-u_AppWarmStart -march=ba2 -mcpu=jn51xx -mredzone-size=4 -mbranch-cost=3 -fomit-frame-pointer -Os -fshort-enums -flto -nostartfiles -L../../../../sdk/JN-SW-4170/Chip/JN5168/Build -L../../../../sdk/JN-SW-4170/Chip/JN5168/Library -L../../../../sdk/JN-SW-4170/Platform/DK4/Library -L../../../../sdk/JN-SW-4170/Components/Library -Wl,--gc-sections -L../../../../sdk/JN-SW-4170/Stack/ZBPro/Build -Wl,--defsym=__stack_size=6500 -Wl,--defsym,__minimum_heap_size=2000 -TAppBuildZBPro.ld -L ../../../../sdk/JN-SW-4170/Stack/ZCL/Build/ -o ../../ExtendedColorLight/Build/ExtendedColorLight_GpProxy_JN5168_DR1175.elf -Wl,--start-group ../../ExtendedColorLight/Build/irq_JN516x.o ../../ExtendedColorLight/Build/portasm_JN516x.o ../../ExtendedColorLight/Build/port_JN516x.o ../../ExtendedColorLight/Build/app_main.o

...

../../ExtendedColorLight/Build/bdb_fb_target.o -lJPT_JN5168 -lZPSMAC_Mini_SOC_JN516x -lPWRM_JN516x -lZPSTSV_JN516x -lAES_SW_JN516x -lPDUM_JN516x -lZPSAPL_JN516x -lRandom_JN516x -lPDM_EEPROM_NO_RTOS_JN516x -lDBG_JN516x -lZPSGP_JN516x -lZPSIPAN_JN516x -lZPSNWK_JN516x -lRecal_JN516x -lMiniMac_JN516x -lMiniMacShim_JN516x -lMMAC_JN516x -lAes_JN516x -lHardwareApi_JN516x -lMicroSpecific_JN516x -lBoot_JN516x -lBoardLib_JN516x -lJPT_JN5168 -lm -Wl,--end-group -Wl,-Map,../../ExtendedColorLight/Build/ExtendedColorLight_GpProxy_JN5168_DR1175.map
../../ExtendedColorLight/Build/app_zps_link_keys.o (symbol from plugin): In function `au8DistributedLinkKey':
(.text+0x0): multiple definition of `sTLMasterKey'
../../ExtendedColorLight/Build/App_ExtendedColorLight.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [../../ExtendedColorLight/Build/ExtendedColorLight_GpProxy_JN5168_DR1175.elf] Error 1

 

I then went back to change it in bdb_link_keys.c as also describted in step 2.

It seems however that it has been moved to app_zps_link_key.c.

 

There I changed

PUBLIC PUBLIC tsReg128 sTLMasterKey = {...};

 

However I failed to joing the live network

* LIGHT NODE RESET *
***********************************************
APP: Entering APP_vInitResources()
APP: Initialising resources...
APP: Entering vBULB_Init()
APP: Entering APP_vInitialise()
APP_vInitialiseNode

Zll state 00 - E_STARTUP

Zll recovered state FACTORY_NEW
Capabilities 001f

R 255 G 227 B 139 L 254 Hue 0 Sat 0 X 24939 Y 24701 T 4065K M 2 On 1 OnTime 0 OffTime 0
Set a random pan
PDM: Segment 11 buffer wear count swap

Factory new start up

Zll state 00 - E_STARTUP
PDM: Capacity 13
PDM: Occupancy 50
APP: Entering BDB_vStart()
APP: BDB Event: 02
APP: BDB_eNsStartNwkSteering()
BDB: Disc on Ch 11 from 0x02108800
APP: Entering APP_vMainLoop()

R 255 G 200 B 85 L 254 Hue 28 Sat 169 X 27532 Y 26236 T 3333K M 2 On 1 OnTime 0 OffTime 0BDB: APP_vGenCallback [0 10]
BDB: vNsTryNwkJoin - index 0 of 1 Nwks
BDB: Try To join 4cb593ea00d8ddf3 on Ch 11
PDM: Segment 17 buffer wear count swap
APP: BDB Event: 01
BDB ZCL Event 6
PDM: Segment 11 buffer wear count swap
PDM: Segment 17 buffer wear count swap
PDM: Segment 11 buffer wear count swap
PDM: Segment 11 buffer wear count swap
BDB: APP_vGenCallback [0 8]
FailedToJoin sNwkJoinFailedEvent.u8Status=173 !!!
BDB: vNsTryNwkJoin - index 0 of 1 Nwks
BDB: Try To join 4cb593ea00d8ddf3 on Ch 11
APP: BDB Event: 01
PDM: Segment 11 buffer wear count swap
PDM: Segment 17 buffer wear count swap
PDM: Segment 11 buffer wear count swap
BDB: APP_vGenCallback [0 8]
FailedToJoin sNwkJoinFailedEvent.u8Status=173 !!!
BDB: vNsTryNwkJoin - index 0 of 1 Nwks
BDB: No suitable network! Continue Discovery
BDB: Disc on Ch 15 from 0x02108800
APP: BDB Event: 01
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 20 from 0x02108800
APP: BDB Event: 01
BDB ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 25 from 0x02108800
APP: BDB Event: 01
BDB ZCL Event 6
BDB: APP_vGenCallback [0 10]
APP: BDB Event: 06
APP: BDB No Networks
APP: BDB No Networks -> Wait On 11
APP: BDB Event: 01
BDB ZCL Event 6

 

I followed up by also changing

PUBLIC uint8 au8DistributedLinkKey[16]  = {...};

to the ZLL Commissioning trust centre link key but behavior stays the same.

 

 

 

With "JN-AN-1171-ZigBee-LightLink-Demo" and "JN-SW-4168" everything works fine after changing

s_au8ZllLnkKeyArray[16] = { ... }

and

sMasterKey = { ... }

 

Any idea what I am doing wrong?

Is there something else that has to be changed to join a live network?

Outcomes