espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.76k stars 742 forks source link

wifi.stopAP() does not work, AP is still up.... #2486

Closed MaBecker closed 5 months ago

MaBecker commented 5 months ago

Using require("Wifi").stopAP() is not working. A wifi explorer can still see an active Espressif access point.

wifi = require("Wifi");
wifi.stopAP((e)=>{
  print(e);
  print(wifi.getStatus());
  print(wifi.getAPDetails()); 
});

/* output
undefined
{
  "station": "Unknown reason",
  "mode": "NULL",
  "powersave": "modem"
 }
{
  "authMode": "open",
  "hidden": false, "maxConn": 4,
  "ssid": "ESP_36A9C5",
  "password": ""
 }

*/

image

MaBecker commented 5 months ago

It only works in combination with connecting to an access point.

print(wifi.getStatus());
{
  "station": "NO_AP_FOUND",
  "mode": "STA",
  "powersave": "modem"
 }
MaBecker commented 5 months ago

This is something I can't explait at the moment, some times the AP is deactivated and sometimes it is still active ...... so better keep this open until there is a proper way to switch the AP.

MaBecker commented 5 months ago

Some times it takes a litle bit longer ... so all ok.