跳到主要内容

How do I reset my board to factory defaults?

You can reset your board to factory defaults using any of these methods:

  1. Physical button (BOOT button) - If you are using the standard RainMaker examples, press and hold the BOOT button for more than 10 seconds to reset the board to factory defaults.

  2. System service (phone app) - If your firmware has System Service enabled with the Factory-Reset parameter, you can trigger a factory reset from the ESP RainMaker phone app. Open the device settings and use the Factory Reset option. The System Service exposes Reboot, Factory-Reset, and Wi-Fi-Reset parameters that can be triggered remotely from the app when the device is online.

For details on implementing factory reset support in your firmware, see System Service Usage.

  1. Serial console - If your firmware has the Serial Console enabled, connect via UART (e.g., idf.py monitor) and run reset-to-factory. The device will reset to factory defaults and reboot.

    If the console is not enabled and your board has no boot button, connect via USB/serial and run the following from your host terminal:

    esptool.py --port $ESPPORT erase_region 0x10000 0x6000

    Ensure $ESPPORT is set to the correct serial port (e.g., /dev/ttyUSB0 on Linux or COM3 on Windows). Note: The partition layout may vary by project; verify the NVS partition address and size in your project's partition table if this command does not work.