← index #2569Issue #4158
Related · medium · value 0.255
QUERY · ISSUE

Access point interface active without being noticed

openby kfrickeopened 2016-10-28updated 2024-09-19
port-esp8266needs-info

After flashing my ESP modules with the current version of MicroPython i use to transfer the modules and scripts I need to run on them using the glorious mpfshell. Of course various bigger modules need to be brought onto the ESP as precompiled bytecode. So there is the common workflow of deploying my script and all of its dependencies.
The programs i run on the ESP are all connecting to my wireless network and do communicate with my home servers. Therefore they are set up as wireless stations (clients).

What I just noticed is that my ESP modules are still acting as an access point. They got introduced to start this when they were initially booting their first MicroPython code.Then the inisetup.py does configure a access point with the name "MicroPython-%s" % ubinascii.hexlify(ap_if.config("mac")[-3:]). This is only because the access point interface has written it's state to the flash of the ESP module.
I have never cared about it and not even thought about that it might happen. All just because the initial state written by the inisetup.py was persisted into the flash of the ESP and so the acces point interface always gets initialized when the ESP module does start up. Just because I did never actively deactivate it.

You might say "Know your tools!" or "ESPs did this even before MicroPython!". But I bet that this does happen to a lot of people unnoticed and should be reviewed.

CANDIDATE · ISSUE

ESP32: WebREPL: network.WLAN(network.AP_IF) is not set to active on boot.

openby MrSurlyopened 2018-09-17updated 2022-03-30
port-esp32

The AP is set up, but is not set to active on boot. Per the documentation, this should "just work"?

I can connect to the device using the serial REPL, and issue:

import network
network.WLAN(network.AP_IF).active(True)

To enable the AP.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied