Asyncio.run not support Acess Point raspberry wifi.radio.start_ap()

21 views Asked by At

good morning, after having warned my raspberry pico w it gives me an error that asyncio.run(main_loop()) does not support access point mode of the wifi connection with wifi.radio.start_ap(secrets['ssid'],secrets['password' ])

async def main_loop():
    global led,button1

    button_task = asyncio.create_task(monitor_buttons(button1))
    
    pico_led_task = asyncio.create_task(blink_pico_w_led(led))
    print("Starting Wifi")
    #startWiFi()

    import ipaddress
    # Get wifi details and more from a secrets.py file
    secrets = {
    'ssid' : "wifi",
    'password' : "password"
    }

    print("Connect wifi")
    wifi.radio.start_ap(secrets['ssid'],secrets['password'])
    
    # Port to listen on
    print("conesso", wifi.radio.ipv4_address_ap)

    print("Starting Web Service")
    webservice_task = asyncio.create_task(startWebService())
    await asyncio.gather(pico_led_task, button_task, webservice_task)
    
asyncio.run(main_loop())

I tried to use network but it is not yet supported, furthermore wifi.radio.connect also connects in ap mode

0

There are 0 answers