Skip to content

How to delete all ssid's and passwords saved? #317

Answered by Hieromon
DanielSamp4 asked this question in Q&A
Discussion options

You must be logged in to vote

@DanielSamp4
What you need may be here.
The sketch that drives the service function described there is:

#include <WiFi.h>
#include <WiFiServer.h>
#include <AutoConnect.h>

void deleteAllCredentials(void) {
  AutoConnectCredential credential;
  station_config_t config;
  uint8_t ent = credential.entries();

  Serial.println("AutoConnectCredential deleting");
  if (ent)
    Serial.printf("Available %d entries.\n", ent);
  else {
    Serial.println("No credentials saved.");
    return;
  }

  while (ent--) {
    credential.load((int8_t)0, &config);
    if (credential.del((const char*)&config.ssid[0]))
      Serial.printf("%s deleted.\n", (const char*)config.ssid);
    else
      Serial.printf("

Replies: 6 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@guedesopaulo
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Hieromon
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Hieromon
Comment options

@faanskit
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants