Skip to content

wifi trouble : pystack exhausted #9856

@stanelie

Description

@stanelie

CircuitPython version

Adafruit CircuitPython 9.2.0 on 2024-10-28; Waveshare ESP32-S3-Zero with ESP32S3

Code/REPL

import wifi
import time

def connect_to_wifi():
    try:
        print(f"connecting wifi")
        wifi.radio.connect("my_ssid","my_password", timeout=5)
    except ConnectionError as e:
        print(f"{e} . Retrying...")
        time.sleep(1)
        connect_to_wifi()
        
connect_to_wifi()

Behavior

When trying to connect to a nonexistent access point, the ESP32 device will eventually crash after a minute or two with the following error message :
RuntimeError: pystack exhausted

I would like the ESP32 to keep trying until it can connect, and not crash.

Description

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsupportissues that involve helping a user accomplish a task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions