AT command to erase STA credentials


I was trying to find an AT command to simply erase credentials stored by WFJAP command. I want to do that without doing a factory reset (ATF) or rebooting the da16200.

We are running base AT command set from Getting Started example on SDK



  • Hi Konstantin,

    Thank you for posting your question online.
    I was not able to locate any AT command to clear the STA credentials stored in the NVRAM without requiring a factory reset or reboot of the DA16200.
    I believe you should add your own custom function and use the following NVRAM utility functions to implement what you want:

    int read_nvram_int(const char *name, int *_val);
    char *read_nvram_string(const char *name);
    int write_nvram_int(const char *name, int val);
    int write_nvram_string(const char *name, const char *val);
    int delete_nvram_env(const char *name);
    int clear_nvram_env(void);
    int write_tmp_nvram_int(const char *name, int val);
    int write_tmp_nvram_string(const char *name, const char *val);
    int delete_tmp_nvram_env(const char *name);
    int clear_tmp_nvram_env(void);
    int save_tmp_nvram(void);

    You can find these functions on the common_utils.h file. 
    You should also refer to UM-WI-046, chapter 4. NVRAM, page:53
    Please also see chapter 7 on page:56. You can find information on how to store/read data from the NVRAM and some code snippets examples.

    Kind Regards,

  • Hi Konstantin,

    Even though there is no command to erase the STA credentials without rebooting or factory reset, you could use the AT+WFDIS command which is for making the Wi-Fi STA profile unused. After that, if you invoke AT+WFJAP with another STA credential then the profile will be updated.

    Please let me know if you have any questions.

    Kind Regards,