Hello,
I am using nrf52832 with nrf Mesh DK. Is there a way to unprovision the board from the hardware or command line and not from the app?
Many thanks in advance ,
Rp
Hello,
I am using nrf52832 with nrf Mesh DK. Is there a way to unprovision the board from the hardware or command line and not from the app?
Many thanks in advance ,
Rp
Hi Rp,
In our app when you click remove node, we will send a "Node Reset" 0x8049 message to the client server on the node to reset the node.
In the nRF52 code you can find the code to handle that message in handle_node_reset(); and node_reset().
If you want to reset a node locally, you can also call node_reset() in your code, either trigger by hardware or command line (if you have an interface).
Note that, this won't tell the provisioner to remove the node itself. I don't think there is a way a node can notify that it's leaving the network. But you can always define your own protocol to do so.
This is clear. I want to know is there a button on a board which can unprovision the board?And how will I come to know about this?
Hi Raulp,
Have you checked the node_reset() function I pointed to ? It's located in main.c in the lightswitch server example .
yes its like :
node_reset> mesh_stack_device_reset> device_reset> hal_device_reset
void hal_device_reset(uint8_t gpregret_value)
{
#if defined(SOFTDEVICE_PRESENT)
(void) sd_power_reset_reason_clr(RESET_REASON_MASK); /* avoid wrongful state-readout on reboot */
#if defined(S130) || defined(S110)
(void) sd_power_gpregret_set(gpregret_value);
#elif defined(S132)
(void) sd_power_gpregret_set(gpregret_value, RESET_REASON_MASK);
#endif
(void) sd_nvic_SystemReset();
#else
NRF_POWER->RESETREAS = RESET_REASON_MASK; /* avoid wrongful state-readout on reboot */
NRF_POWER->GPREGRET = gpregret_value;
NVIC_SystemReset();
#endif
NRF_MESH_ASSERT(false);
}
So as per this , power reset (from the hardware) will unconfigure the device? Plz elaborate.
Br,
Rp
Hi Raul,
My mistake, the node_reset() only restart the node (CPU reset) not erasing the provisioning data.
Provisioning data can be erased using mesh_stack_config_clear() ( this is what used in handle_node_reset -> apply_reset() )
You can refer to button 3 handler in button_event_handler() in light switch server.
No, power reset won't unconfigure the device.
Hello ,
I had a look at it but I am not getting how it is related with my question?
My question is simple
"Is there any hardware button on the nrf5832 evaluation board which can un-provision the board" ?
Yes or No.
If Yes , then How?
many thanks in advance !
Rp
and please note consider that I dont have access to source code but only the binaries.
and please note consider that I dont have access to source code but only the binaries.