Skip to content
Snippets Groups Projects
Commit 727dd399 authored by schneider's avatar schneider Committed by schneider
Browse files

wifi: catch OSError when connecting

parent a00ff58e
No related branches found
No related tags found
No related merge requests found
import network
from st3m import settings
from st3m.logging import Log
log = Log(__name__)
iface = None
......@@ -8,7 +11,10 @@ def setup_camp_wifi() -> None:
global iface
iface = network.WLAN(network.STA_IF)
iface.active(True)
try:
iface.connect(b"Camp2023-open")
except OSError as e:
log.error(f"Could not connect to camp wifi: {e}")
def disable() -> None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment