Hi
I'm working on a Zigbee network, and I want to have a few End Devices (ZED) connect to a Coordinator (ZC). And it's fine, I got that working by using the zigbee_default_signal_handler().
I'm using nRF52840DK.
Now, I need to have the feature to stop a ZC from adding new devices to the network, because I want to have multiple ZC devices in the same area, that will have their own ZEDs added to the network. Basically, I want to press a button on the nRF52840 DK and the ZC will start looking for new ZEDs, and when I press another button, no new devices will get added after that.
Note: I can assume that ZCs will not overlap in the end device adding intervals because I will be pressing the buttons on all of the ZCs, and I will be powerin on the ZEDs one by one and let them join a network.
One thing I tried is the following:
I have added the following case statement inside the zboss_signal_handler():
case ZB_BDB_SIGNAL_FORMATION: /*Skip*/ break;
in order to stop the bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING);
And then I added the following code to the button callback:
NRF_LOG_INFO("Start network steering"); comm_status = bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING); ZB_COMM_STATUS_CHECK(comm_status);
The procedure from above allows me to control when I want to start adding the new ZEDs.
I tried adding the following to another button's callback in order to stop the adding of the new devices, but it didn't work:
NRF_LOG_INFO("Start network steering"); comm_status = bdb_start_top_level_commissioning(ZB_BDB_COMMISSIONING_STOP); ZB_COMM_STATUS_CHECK(comm_status);
Does anyone know how can I achieve this? I'm open to different implementations, this was just the first thing that came to my mind.
Also, is there a way to add the devices based on the RSSI? This may be an option for me, I could do the following also:
if(new_device_rssi > rssi_threshold) ** add device to the network else ** remove device from the network
Best regards
Emir