Forgetting an AP

Inquisitor
Posts: 22
Joined: Thu Dec 14, 2017 10:53 am
Contact:

Forgetting an AP

Postby Inquisitor » Mon Sep 27, 2021 10:10 pm

I've tried searching the forum and the Internet at large, but have not found how to forget a stored AP like any computer/table/phone can. Surely, there is a way using the APIs that I just haven't figured out. I've been trying to use the wifi_station_set_config() methods and then studying the five stored using wifi_station_get_ap_info(). Some things I've figured out...
  • If multiples of the same AP are entered using wifi_station_set_config(), they do not overwrite the existing one of the same SSID.
  • When using different APs and adding more than 5, it is not clear which one gets overwritten. It is not oldest slot or first slot or last slot. It seems the newest can be placed in any of the 5 slots and it appears to be random... or at least I haven't discovered the logic empirically.

BUT MAINLY, I can't remove an item. I've tried...
  1. Looking for any API for this.
  2. Collect using wifi_station_get_ap_info() and delete all of them, then write those I want. But there is no delete all and writing multiple without connecting doesn't seem to work.
  3. Collect using wifi_station_get_ap_info() and just writing ones I want to keep, but the one I want to delete seems to keep lingering around in the list even if I write 5 of the others.

I'm at a loss... any suggestions?
Thanks
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: Forgetting an AP

Postby Her Mary » Fri Oct 08, 2021 2:34 pm

There seems no API to forget an AP. But only factory reset the system. Or maybe you can just stop the auto-connection of Wi-Fi?

Inquisitor
Posts: 22
Joined: Thu Dec 14, 2017 10:53 am
Contact:

Re: Forgetting an AP

Postby Inquisitor » Sat Oct 09, 2021 8:10 pm

Her Mary wrote:There seems no API to forget an AP. But only factory reset the system. Or maybe you can just stop the auto-connection of Wi-Fi?


Thank you for your reply. I was hoping I just missed something... either a typo in the SDK manual was hiding a useful method or there was some creative combination of other Espressif methods that would achieve the same thing. It seems rather strange that there isn't something like that. If you use Espressif's Five AP storage methods in the real world, eventually it will cause problems. I just bypass theirs completely with a C++ class. Unfortunately, it requires me to use another Flash sector instead of the four "System" sectors.
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com

Who is online

Users browsing this forum: No registered users and 186 guests