about TCLK of zigbee

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

about TCLK of zigbee

1,126 Views
zherlei
Contributor II

sdk version:1745

stack version:zigbee 3.0

coordinator project:JN-AN-1216, version:1010

In JN-AN-1216 coordinator project,the default value for macros ZNC_MAX_TCLK_DEVICES(app_common.h) is 20.

 

I learned about the meaning of this value in the manual ZigBee 3.0 Stack User Guide Revison 1.2.

tclk.png
Now the value is 20, which means that there are only 20 nodes in my network at most.
Q:
I have 1 ZR and 19 ZEs. And all the devices have joined the network. Now, the one node(node A) of the 19 ZEs, whose direct parent is ZR, leaves the network on its initiative by pressing a button for long time.Then, other new node(node B),not int 19 ZEs, want to join the network.But the node B has failed to join the network all the time.Why?
Strangely, device A can successfully join the network again.Why?
Labels (1)
Tags (2)
0 Kudos
2 Replies

862 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hello Erlei, I hope you're doing well,

 

First of all, I'm really sorry for the delay on my response.

To solve the problem you're having, you'll have to change one of the functions located inside the

App_Znc_cmds.c source file:

 

  • You'll need to delete
bCredPresent = zps_bGetFlashCredential ( u64DeviceAddress, &uKey, &u16Location, FALSE, FALSE );

 

From the APP_bSendHATransportKey function in that file, as well as change the if condition from:

if ( ( bSetTclkFlashFeature) ||
( u8Status == 1) )

 

To:

 

if ( ( bSetTclkFlashFeature) &&
( u8Status == 1) )

 

And remove this credential check:

 

/*If credential is present roll back to confirm that key is used and not install code */
if(bCredPresent)
{
asTclkStruct[u16Location].u16TclkRetries = 0xFFFF;
}

 

The function should end up looking like this:

 

PUBLIC bool APP_bSendHATransportKey ( uint16 u16ShortAddress,
uint64 u64DeviceAddress,
uint64 u64ParentAddress,
uint8 u8Status,
uint16 u16Mac)
{
bool_t bStatus = TRUE;
ZPS_teStatus eStatus;
uint16 u16Location;
AESSW_Block_u uKey;
bool_t bCredPresent = FALSE;
if( bBlackListEnable )
{
ZPS_teDevicePermissions eDevicePermissions;
eStatus = ZPS_bAplZdoTrustCenterGetDevicePermissions ( u64DeviceAddress,
&eDevicePermissions );
if( eStatus == ZPS_E_SUCCESS )
{
if ( eDevicePermissions != ZPS_DEVICE_PERMISSIONS_ALL_PERMITED )
{
bStatus = FALSE;
}
else
{
bStatus = TRUE;
}
}
else
{
bStatus = FALSE;
}
if ( ( sZllState.u8DeviceType >= 2 ) &&
( eStatus == ZPS_E_SUCCESS ) &&
( eDevicePermissions == ZPS_DEVICE_PERMISSIONS_ALL_PERMITED )
)
{
u64CallbackMacAddress = u64DeviceAddress;
ZTIMER_eStart ( u8HaModeTimer , ZTIMER_TIME_MSEC ( 500 ) );
}
}
else
{
if(sZllState.u8DeviceType >= 2)
{
u64CallbackMacAddress = u64DeviceAddress;
ZTIMER_eStart ( u8HaModeTimer, ZTIMER_TIME_MSEC ( 500 ) );
}
}
if ( ( bSetTclkFlashFeature) &&
( u8Status == 1) )
{
extern uint32 sZpsIntStore;
extern PUBLIC void* zps_vGetZpsMutex ( void );
ZPS_u8ReleaseMutexLock ( zps_vGetZpsMutex , &sZpsIntStore );
uint8 au8Key[16] = { 0x5a, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41,
0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x39 };
ZPS_eAplZdoAddReplaceLinkKey( u64DeviceAddress, au8Key, ZPS_APS_UNIQUE_LINK_KEY);
ZPS_u8GrabMutexLock ( zps_vGetZpsMutex , &sZpsIntStore );
bStatus = TRUE;
}
return bStatus;
}

I hope this solves the problem you were having.

If you have any other questions, please let me know.

 

Best regards,

Sebastian

0 Kudos

862 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hello Zherlei,

I hope you're doing well!

 

Just a heads up, I am doing some test by my side.

I will get back to you as soon as possible.

 

I'm sorry for any inconveniences this may cause.

 

Best regards,

Sebastian

0 Kudos