Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Get local SSID list OR forget Current WiFi credentials?

We are using Mongoose JS on an ESP32. We have these three situations:

  1. ESP32 has No WiFi credentials:
    "Wifi.scan (function (results)" returns a WiFi list

  2. ESP32 has WiFi credentials and is connected to the network:
    "Wifi.scan (function (results)" returns a WiFi list

  3. ESP32 has old WiFi credentials and is NOT connected to the original network (ie We move our ESP32 to another location and want to scan for more):
    "Wifi.scan (function (results)" DOESN'T returns a WiFi list and gives an error:
    [Nov 4 11:55:21.101] W (28365) wifi: Now is connecting, user scan invalid now!
    [Nov 4 11:55:23.551] I (30815) wpa: WPA2: already disabled
    [Nov 4 11:55:23.555] I (30825) wifi: Set ps type: 0

How can we get a WiFi list in situation case 3?

If it is not possible, then how do I reset the WiFi credentials so that the old credentials are cleared in Mongoos JS?

Setting the SSID to "" and password to "" doesn't work.

Comments

  • Thanks to Manfred Müller-Späth @mamuesp in chat, the solution was to set "wifi.ap.enable" to "true" and the "wifi.sta.enable" (together with STA1 and STA2) to "false", and reboot.

    Thanked by 1Sergey
Sign In or Register to comment.