Anyone have success using AP mode on their Wio RP2040 Module? I’m getting error:
OSError: can’t set AP config
Pretty simple code so I’m not sure what can be going wrong other than an issue in the actual WIO firmware:
self.ap = network.WLAN_SPI(network.AP_IF)
self.ap.active(True)
self.ap.config(essid='ssid', password='pass')
Also, anyone know if its possible to have AP and STA active at the same time? AKA have one device be connected to my main network but also allow other devices to connect directly to it?
From what I found you can’t do both at the same time.
I’ve had good luck with the initial connection part for connecting to my network:
import network
from time import sleep
#import usocket as socket
def connect_wifi():
N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)
connected = False
while not connected:
N1.connect("ssid","pass")
if N1.isconnected():
connected = True
else:
print("Not Connected, trying again.")
sleep(1)
print("Connected! My IP is: {}".format(N1.ifconfig()[0]))
But I can’t get it to communicate to anything else. Sockets library seems to have issues.