Hi,
I have decided not to transport any key to the joining devices because i have preconfigured the keys. The transport key function on the coordinator ZDSecMgrSendNwkKey is not called because I dont need to transport key, but then the coordinator refuses to respond to request key. The reason why it does not respond is in the ZDSecMgrTclkReq function, where found returns 0.
APSME_SearchTCLinkKeyEntry(initExtAddr,&found, &TCLKDevEntry);
//If found, generate the key accordingly to the key attribute
if(found)
{
//Generate key from the seed, which would be the unique key
ZDSecMgrGenerateKeyFromSeed(TCLKDevEntry.extAddr,TCLKDevEntry.SeedShift_IcIndex,req.key);
// always secure
req.nwkSecure = TRUE;
req.apsSecure = TRUE;
req.tunnel = NULL;
// send key to initiator device
req.dstAddr = ind->srcAddr;
req.extAddr = initExtAddr;
req.initiator = TRUE;
req.keyType = KEY_TYPE_TC_LINK;
APSME_TransportKeyReq( &req );
// clear copy of key in RAM
memset( key, 0x00, SEC_KEY_LEN);
}
But if I change so that I am transporting key of 0s, just using the SendNwkKey, the ZDSecMgrTclkReq respond to request key and found is equal to 1.
using CC2652R zc and zed.
What is the reason behind this?
Regards,
Hamza