This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

REMOVE SERVERS FROM CLIENT

Hellou, I'm developing firware which is modification of light switch example. I have build in communication protocol, and when i receive coomand to remove nodes promisioned to client , I need remove all nodes from client list, and start promisioning from address 0x100.

I use this function:

void need_reset()
{
extern volatile bool reset_device ;
static volatile uint8_t num_of_dev = 0;
volatile uint8_t z = 0;


if((get_timer_value(RESET_TIMER)==0))
{
if(reset_device == true)
{
reset_device = false;


num_of_dev = m_configured_devices;
nrf_mesh_disable();
access_clear();
for(z = 0; z <= num_of_dev;z++)
{
m_configured_devices = z;
dsm_address_publish_remove(m_server_handles[m_configured_devices]);
dsm_devkey_delete(m_devkey_handles[m_configured_devices]);
}
provisioner_wait_for_unprov(UNPROV_START_ADDRESS + 0);
SEGGER_RTT_printf(DEBUG_WINDOW, "\nGO TO RESET_DEVICE");
sd_nvic_SystemReset();
}
}

}

After after receive command device go to reset, and program start, promisiong continue from last idexed device not from 0x100. 

Can you help me, how i remove nodes list and data which are saved to client by primisiong the nodes.

Thanks

Related