I'm having difficulty getting the ccserver sample ZBA project to function correctly with security enabled. SECURE=1 in the f8wConfig
My understanding of the ZBA spec is that security will be usedwhen connecting to the commissioning network, specifically the use of a preconfigured TC link key. That key would be used to transport the network key ( which is NOT preconfigured ).
Now, it's possible of course that I've misread the specification, but in any regard, what is the setup required to get a device to join with security? The device gets associated, but times out on the network key - the APS transport of the key from the ZC / TC is encrypted with the TCLinkKey, as expected, but the joining ZED times out and resets.
Looking at the ZDApp code, it appears that the device will attempt to pull a NWK key from NV- but the whole point of the APS transport of the encrypted NWKKey is that I don't have to have a key in NV (yet), so why is this the procedure? Is there some config that will allow this to work?
from the zdapp.c module:
if ( ZG_SECURE_ENABLED && ( ZDApp_RestoreNwkKey() == false ) )
{
// wait for auth from trust center!!
devState = DEV_END_DEVICE_UNAUTH;
// Start the reset timer for MAX UNAUTH time
ZDApp_ResetTimerStart( 10000 );//MAX_DEVICE_UNAUTH_TIMEOUT );
}