I am trying to connect an STM32 Nucleo WIFI expansion board (SPWF04SA) to our wireless network using the built-in MicroPython interpreter. According to the datasheet it is supposed to be supported.
I can list the available networks using
import network
wlan = WLAN()
nets = wlan.scan()
for net in nets:
print(net)
And I get
(ssid='PE0000', bssid='00:13:60:FF:8F:2D', auth='WPA2 ', channel=4, rssi=-65)
(ssid='PE9000', bssid='02:13:60:FF:8F:2D', auth='WPA2 ', channel=4, rssi=-67)
(ssid='PE0200', bssid='B8:C7:5D:07:CF:D3', auth='WPA2 ', channel=6, rssi=-85)
I then try to connect to network PE9000 (or any of them for that matter) using:
wlan.connect('PE9000',(WLAN.WPA2,'xxxx'))
And I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'WLAN' has no attribute 'WPA2'
If I try to use WLAN.WPA for the security type I don't get the error but, obviously, it won't connect to the network.
Any help would be appreciated.