Hi,
I'm working with the nrf52840-DK and using the nRF5 SDK v15.2.0 Stack version.
I´ve got a working program for my coordinator (C) and my end device (ED). The C establishes the network successfully, the ED is able to join and they are both able to send messages to each other, by pressing one of the buttons on the nrf52840 DK. It also works to find out the short address and other information about the new joined device.
NOTE: I attached my coordinators main, buttons_handler_function, and zboss_signal_handler below.
As soon as the ED is switched on, it starts searching for a network, if it is in range of my C, it instantly joins the network. Now I want my C not to respond to the joining requests of the the ED unless one of the C buttons is pressed.
So far I couldn´t find a way to control the commissioning/joining procedure. Feels like Zigbee is managing all of this stuff by it self and is giving me just an interrupt in the zboss_signal_handler. It jumps correctly into the case ZB_ZDO_SIGNAL_DEVICE_ANNCE, which gives me the chance to get all the informations about the new device (as mentioned above) and call other functions. But at the time I get the interrupt in the zboss_signal_handler, the joining procedure is already done!
I already figured out that I could change -> ZB_DEFAULT_PRMIT_JOINING_DURATION 0xff (in zb_config_common.h ). But I don´t know on which value I have to set ZB_DEFAULT_PRMIT_JOINING_DURATION in order to lower the permit time to a few seconds. But this still won´t enable me to control the commissioning/joining procedure.
So my two issues that I´m struggling with are:
1. How to control the commissioning/joining procedure?
2. Do I have to reduce the joining duration and how do I do that?
Thanks
Greetings Luke