- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi There,
Is there a function that application can call to restart the mesh device ?
Best Regards,
LUTHFI AD
Solved! Go to Solution.
- Tags:
- cybt-213043-mesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
One suggestion is to use wiced_hal_wdog_reset_system(); in the application to executes a soft reset on the chip by tripping the watchdog timer. But, it does not take into consideration of disabling all the interrupts, which makes this API a helper function to assist in performing the hard reset.
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please use mesh_application_factory_reset() API for putting the device into factory default condition. Factory reset will return the device to an un-provisioned state. Please check mesh_application.c for it's usage and definition.
void mesh_application_factory_reset(void)
{
WICED_BT_TRACE("mesh_application_factory_reset: *************************\n");
// uncomment following lines to delete UUID from the NV. This will change UUID on factory reset.
// wiced_result_t result;
// mesh_nvram_access(WICED_TRUE, NVRAM_ID_LOCAL_UUID, NULL, 0, &result);
if (wiced_bt_mesh_app_func_table.p_mesh_app_factory_reset)
{
wiced_bt_mesh_app_func_table.p_mesh_app_factory_reset();
}
wiced_bt_mesh_core_init(NULL);
node_authenticated = WICED_FALSE;
pb_gatt_in_progress = WICED_FALSE;
}
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Dheeraj,
Yes, I tested that ... its actually, restarting and reinitialize into factory state, is there a way just to restart the device (not un-provisioned it after a reset) ? it might be applicable in some solution if I just want to do some remote restart from a mesh device.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
One suggestion is to use wiced_hal_wdog_reset_system(); in the application to executes a soft reset on the chip by tripping the watchdog timer. But, it does not take into consideration of disabling all the interrupts, which makes this API a helper function to assist in performing the hard reset.
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Dheeraj,
Many Thanks ! I tested a bit just now and it is working ! I will test more on different types, normal mesh and LPN, looks solid just now ! One more think ... during reset, is it fine that the Timer is reinit ? I have some timer in there and the watch dog function reset seems clear the ram stat as well, which is good ... just a precaution question, thanks a lot !
Best Regards,
LUTHFI AD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not sure about how you are going to implement the logic in the application.
You can reinit the timer as far as, it is not interfering/blocking any required functionalities of the app.
Thanks,
-Dheeraj