CircuitPython version
Adafruit CircuitPython 8.0.2 on 2023-02-14; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
Code/REPL
import os
import wifi
ssid = os.getenv('CIRCUITPY_WIFI_SSID')
password = os.getenv('CIRCUITPY_WIFI_PASSWORD')
print("Activating Access Point SSID...", ssid)
wifi.radio.start_ap(ssid, password)
Behavior
code.py output:
Activating Access Point SSID... ReS_AP01
Traceback (most recent call last):
File "code.py", line 11, in
RuntimeError: Wifi is in station mode.
Code done running
Description
I can not start an AP in my raspberry pi pico w. I tried to add the next lines, before the start_ap method:
tried 1:
wifi.radio.stop_station()
wifi.radio.enabled = False
wifi.radio.enabled = True
wifi.radio.start_ap(ssid, password)
tried 2:
wifi.radio.enabled = False
wifi.radio.stop_station()
wifi.radio.enabled = True
wifi.radio.start_ap(ssid, password)
and with multiple secuences i always receive the same error.
Additional information
i was searching for an start_ap example in the adafruit-circuitpython-bundle-examples and in the documentation and i did not find anything about it. It could be possible to add some code?