I was trying to find the direct method details for enabling device management for the factory reset of a device in IoT Hub, but couldn't find one. There are details about reboot and firmware update but nothing about factory reset. Please help.
I was trying to find the direct method details for enabling device management for the factory reset of a device in IoT Hub, but couldn't find one. There are details about reboot and firmware update but nothing about factory reset. Please help.
Hi @Iotiotin-5285 can you give us some more details?
1) What is the device you are using?
2) What is the OS?
3) What you mean by factory reset? Would you like to redeploy the original firmware image to the device?
Checking if you already came accross with this documentation?: Overview of device management with IoT Hub
Thank you!
The device could a python simulated device like the ones used in the quickstart examples of telemetry data or reboot method.
OS could be either Linux or Windows
In the article that you've quoted here Overview of device management with IoT Hub, it says,
" Factory Reset: The back-end app informs the device through a direct method that it has initiated a factory reset. The device uses the reported properties to update the factory reset status of the device."
I am looking for that direct method or reported property that can do the job.
Hello @Iotiotin-5285,
IoTHub offers both device registration, receiving D2C messages, sending C2D messages, device twins, and Direct Methods.
You want to execute a Factory Reset or a Reboot.
Unfortunately, the documentation you see is referring to example scenarios. There is no standard set of direct methods or device twin settings that offer these 'pre-programmed' scenarios.
To be able to actually execute these scenarios, this has to be programmed yet.
Azure IoT provides the tooling to execute logic on the device using cloud Direct Methods, it's up to you to actually code it.
See this link as a starting point where two named methods can be executed (method1 and method2) and a generic method is available.
Each device has it's specifics to make a factory reset, if the manufacturer of your device is using IoT Plug and Play then there is a chance that you have a built-in capability command to perform factory reset.
Please take a look at the following documentation to better understand how to build your IoT hardware product that supports IoT Plug and Play:
If you want to use a device with IoT Plug and Play you can search for it in the Certified for Azure IoT device catalog.
For example this device has a IoT Plug and Play command to reboot:


Thanks for the question @Iotiotin-5285 . If I was able to answer it, please mark it as answer :)!
3 people are following this question.