diff options
Diffstat (limited to 'tests/wipy/wlan/wlan.py')
-rw-r--r-- | tests/wipy/wlan/wlan.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/wipy/wlan/wlan.py b/tests/wipy/wlan/wlan.py index 72a20d4fa..49e2e4af6 100644 --- a/tests/wipy/wlan/wlan.py +++ b/tests/wipy/wlan/wlan.py @@ -22,7 +22,7 @@ def wait_for_connection(wifi, timeout=10): print('Connection failed!') -wifi = WLAN() +wifi = WLAN(0, WLAN.STA) print(wifi.mode() == WLAN.STA) print(wifi.antenna() == WLAN.INT_ANT) @@ -103,7 +103,15 @@ print(wifi.isconnected() == False) # test init again wifi.init(WLAN.AP, ssid='www.wipy.io', auth=None, channel=5, antenna=WLAN.INT_ANT) +print(wifi.mode() == WLAN.AP) + +# get the current instance without re-init +wifi = WLAN() +print(wifi.mode() == WLAN.AP) +wifi = WLAN(0) +print(wifi.mode() == WLAN.AP) +# test the MAC address length print(len(wifi.mac()) == 6) # next ones MUST raise |