Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 supervisor.reload() does not disconnect user-connected wifi #9177

Open
bill88t opened this issue Apr 13, 2024 · 0 comments
Open

ESP32 supervisor.reload() does not disconnect user-connected wifi #9177

bill88t opened this issue Apr 13, 2024 · 0 comments
Labels
bug espressif applies to multiple Espressif chips supervisor
Milestone

Comments

@bill88t
Copy link

bill88t commented Apr 13, 2024

CircuitPython version

Adafruit CircuitPython 9.0.0-beta.0-52-g6c1e34e957 on 2024-02-17; M5Stack Timer Camera X with ESP32

Code/REPL

Adafruit CircuitPython 9.0.0-beta.0-52-g6c1e34e957 on 2024-02-17; M5Stack Timer Camera X with ESP32
>>> import wifi
>>> wifi.radio.connected
False
>>> wifi.radio.connect("Lunchbox", "[REDACTED]")
>>> wifi.radio.connected
True
>>> # I pressed Ctrl + D here.
soft reboot

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
The `microcontroller` module was used to boot into safe mode.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 9.0.0-beta.0-52-g6c1e34e957 on 2024-02-17; M5Stack Timer Camera X with ESP32
>>> import wifi
>>> wifi.radio.connected
False
>>> wifi.radio.connect("Lunchbox", "[REDACTED]")
>>> wifi.radio.connected
True
>>> import supervisor
>>> supervisor.reload()
soft reboot

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
The `microcontroller` module was used to boot into safe mode.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 9.0.0-beta.0-52-g6c1e34e957 on 2024-02-17; M5Stack Timer Camera X with ESP32
>>> import wifi
>>> wifi.radio.connected
True
>>>

Behavior

Wifi should have been disconnected, it was not.
This is an issue because the socket binds are not cleared and the code fails with address in use errors.

Description

This only happens on plain ESP32 as far as I can tell. I can't repro on s2.

Additional information

This assumes no wifi auto-connect credentials are installed.
I used safemode just cause it won't run my code.

@bill88t bill88t added the bug label Apr 13, 2024
@bill88t bill88t changed the title ESP32 supervisor.reload() does not disconnect user-connected wifi ESP32 supervisor.reload() does not disconnect user-connected wifi Apr 13, 2024
@dhalbert dhalbert added this to the 9.x.x milestone Apr 18, 2024
@dhalbert dhalbert added espressif applies to multiple Espressif chips supervisor labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips supervisor
Projects
None yet
Development

No branches or pull requests

2 participants