Are there any issues with calling zb_secur_ic_add multiple times with the same address and install code? IE: Does the ZBOSS stack check if an address already exist in install code table?
Thanks,
Are there any issues with calling zb_secur_ic_add multiple times with the same address and install code? IE: Does the ZBOSS stack check if an address already exist in install code table?
Thanks,
Not that I am aware of. Have you tested? Perhaps there are use cases where you would want to add multiple codes for the same device.
Best regards,
Edvin
I ran an inadvertent test and didn't seem to get an error. The API doesn't say one way or the other it only returns RET_OK or RET_CONVERSION_ERROR.
Are you able to look into what happens in the stack? I'm most concerned the stack overwriting install codes or corrupting the NVRAM for the ZBOSS stack.
Thanks,
Hello,
Sorry for the late reply.
Based on my observations, there are no issues (corruptions in the NVRAM) adding several IC codes for one device, but it looks like only the last IC code you added for a specific device is valid.
E.g. if you run the CLI example, adding first the correct, and then the wrong IC, before starting the other node, then it will not be able to join. If you add the wrong IC first, and then the correct one after that, then powering on the other node, then it will join the network.
You can add IC codes for several different devices, and they will all be able to join.
Light bulb IC: 83FED3407A939723A5C639B26916D505C3B5
Light switch IC: 83FED3407A939723A5C639B26916D5044AA4
Test 1:
on CLI device:
bdb channel 12 bdb role zc bdb ic policy enable bdb start bdb ic add 83FED3407A939723A5C639B26916D505C3B5 <address> //correct IC bdb ic add 83FED3407A939723A5C639B26916D503F5D0 <address> //wrong IC
The device (light_bulb) could not join.
Test 2:
on CLI device:
bdb channel 12 bdb role zc bdb ic policy enable bdb start bdb ic add 83FED3407A939723A5C639B26916D503F5D0 <address> //wrong IC bdb ic add 83FED3407A939723A5C639B26916D505C3B5 <address> //correct IC
The device (light_bulb) was able to join.
Test 3:
bdb channel 12 bdb role zc bdb ic policy enable bdb start bdb ic add 83FED3407A939723A5C639B26916D505C3B5 <address1> //correct IC bdb ic add 83FED3407A939723A5C639B26916D5044AA4 <address2> //correct IC
Both devices (light_bulb and light_switch) was able to join. They were both powered after the last CLI command.
Best regards,
Edvin