Hello,
I start to use esp8266,
making kind a init scripts for wireless, etc. I tested my init/config scripts, they just used to initialize wifi in AP or STATION mode with given SSID, password. They looks fine, except that I realize AP mode is started always with last settings I give for AP.
I run statoion mode, AP is present. I even delete all files from board and power it up, AP come online and I can connect to it.
Did I miss something?
OH I forgot, used version is:
MicroPython v1.18 on 2022-01-17; ESP module with ESP8266
P.S.
tested with:
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
same result.
WIFI start AP without being initialized
Re: WIFI start AP without being initialized
I see that in my ESP32 code I have:
which I think is a hold-over from my work with the ESP8266. I have read a comment on the forum that either the ESP8266 or ESP32 starts in AP mode.
Code: Select all
import network
sta_if = network.WLAN(network.STA_IF) # create station interface
ap_if = network.WLAN(network.AP_IF) # create access-point interface
def connect():
# disconnects AP if it is up
ap_if.active(False) # de-activate the AP interface
now connect to station-mode
Re: WIFI start AP without being initialized
question is how it remember ssid and password that was set once.
meanwhile I tested same code on esp32, no such issue.
meanwhile I tested same code on esp32, no such issue.
Re: WIFI start AP without being initialized
At the Micropython application level variables can be saved to RTC memory. I suspect that at the under-lying ESP RTOS level that variables can be stored somewhere as well.
Re: WIFI start AP without being initialized
I tested with another device (wemos D1 mini)
all files from filesystem are deleted, disconnect it from power source, connect it again and AP is up with last settings that it was configured,
in additional, I create a STA_IF, and try to set .active(False)
check and it was set to false, AP is still up, I can connect to it and ping the device
all files from filesystem are deleted, disconnect it from power source, connect it again and AP is up with last settings that it was configured,
in additional, I create a STA_IF, and try to set .active(False)
check and it was set to false, AP is still up, I can connect to it and ping the device