ESP32: Microdot web framework does not work above MicroPython version 1.21.0
Port, board and/or hardware
ESP32 port; Generic ESP32 module ESP-WROOM-32
MicroPython version
MicroPython v1.21.0 on 2023-10-05; Generic ESP32 module with ESP32
Reproduction
boot.py
# Replace the following with your WIFI Credentials
SSID = "SSID"
SSI_PASSWORD = "SSI_PASSWORD"
def do_connect():
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print('Connecting to network...')
sta_if.active(True)
sta_if.connect(SSID, SSI_PASSWORD)
while not sta_if.isconnected():
pass
print('Connected! Network config:', sta_if.ifconfig())
do_connect()
copy https://github.com/miguelgrinberg/microdot/blob/main/src/microdot/microdot.py to the ESP32 board
run microdot_test.py
from microdot import Microdot
app = Microdot()
@app.route('/')
def index(request):
return 'Hello, world!'
if __name__ == '__main__':
app.run(debug=True)
Expected behaviour
With MicroPython v1.21.0
<img width="941" height="728" alt="Image" src="https://github.com/user-attachments/assets/c3408b35-2f23-4cf7-9141-a73654193358" />
<img width="1312" height="332" alt="Image" src="https://github.com/user-attachments/assets/e156d18f-3efc-4697-b318-b8d30e3d6aca" />
Observed behaviour
With MicroPython v1.22.0 on 2023-12-27; Generic ESP32 module with ESP32
<img width="1292" height="377" alt="Image" src="https://github.com/user-attachments/assets/7aa1ffef-e538-44d4-9424-e31b60fce2ec" />
Code of Conduct
Yes, I agree
ESP32-S3 Supermini reboots on attempt for Wifi in 'AP' mode
Port, board and/or hardware
ESP32-S3 Supermini
MicroPython version
Not sure where I can ask my question...
Attempting to connect to my ESP32-S3 supermini board running Micropython using 'AP' mode results in an immediate disconnection -- but 'STA' mode works just fine.
I am using the following Micropython firmware:
ESP32_GENERIC_S3-FLASH_4M-20241129-v1.24.1.bin
My other full-size ESP32-S3 development boards work just fine.
Reproduction
Connected to MicroPython at /dev/ttyACM0
Use Ctrl-] or Ctrl-x to exit this shell
MicroPython v1.24.1 on 2024-11-29; Generic ESP32S3 module with ESP32S3
Type "help()" for more information.
import network
ap = network.WLAN(network.AP_IF)
ap.active(True)
Truedevice disconnected
Expected behaviour
Note that 'STA' mode works just fine:
Connected to MicroPython at /dev/ttyACM0
Use Ctrl-] or Ctrl-x to exit this shell
MicroPython v1.24.1 on 2024-11-29; Generic ESP32S3 module with ESP32S3
Type "help()" for more information.
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
True
Observed behaviour
Connected to MicroPython at /dev/ttyACM0
Use Ctrl-] or Ctrl-x to exit this shell
MicroPython v1.24.1 on 2024-11-29; Generic ESP32S3 module with ESP32S3
Type "help()" for more information.
import network
ap = network.WLAN(network.AP_IF)
ap.active(True)
Truedevice disconnected
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree