Skip to content

Commit e19dfe1

Browse files
author
danicampora
committed
cc3200: In scan results rename 'auth' field to 'sec'.
As defined by the new API, since 'auth' is actually a tuple composed by the security type and the key.
1 parent affcbe4 commit e19dfe1

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

cc3200/mods/modwlan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wlan_init_obj, 1, wlan_init);
857857

858858
STATIC mp_obj_t wlan_scan(mp_obj_t self_in) {
859859
STATIC const qstr wlan_scan_info_fields[] = {
860-
MP_QSTR_ssid, MP_QSTR_bssid, MP_QSTR_auth, MP_QSTR_channel, MP_QSTR_rssi
860+
MP_QSTR_ssid, MP_QSTR_bssid, MP_QSTR_sec, MP_QSTR_channel, MP_QSTR_rssi
861861
};
862862

863863
// check for correct wlan mode

cc3200/qstrdefsport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ Q(scan)
293293
Q(connect)
294294
Q(isconnected)
295295
Q(disconnect)
296+
Q(sec)
296297
Q(channel)
297298
Q(rssi)
298299
Q(ifconfig)

tests/wipy/wlan/wlan.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def wait_for_connection(wifi, timeout=10):
4444
print(len(scan_r) > 3)
4545
for net in scan_r:
4646
if net.ssid == testconfig.wlan_ssid:
47+
# test that the scan results contains the desired params
48+
print(len(net.bssid) == 6)
49+
print(net.channel == None)
50+
print(net.sec == testconfig.wlan_auth[0])
51+
print(net.rssi < 0)
4752
print('Network found')
4853
break
4954

tests/wipy/wlan/wlan.py.exp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ True
1111
True
1212
True
1313
True
14+
True
15+
True
16+
True
17+
True
1418
Network found
1519
True
1620
True

0 commit comments

Comments
 (0)