QUERY · ISSUE
Add extra WLAN authmode in docs
docsneeds-info
The current docs on the WLAN.scan() method indicates the following 5 authmode modes:
0 – open
1 – WEP
2 – WPA-PSK
3 – WPA2-PSK
4 – WPA/WPA2-PSK
I recently scanned for networks and found one with an authmode 5 which should correspond to a WIFI-AUTH/WPA2-ENTERPRISE authmode but the network authmode module constants available are:
AUTH_MAX (6)
AUTH_OPEN (0)
AUTH_WEP (1)
AUTH_WPA2_PSK (3)
AUTH_WPA_PSK (2)
AUTH_WPA_WPA2_PSK (4)
CANDIDATE · PULL REQUEST
esp32/network_wlan: Add missing WLAN security constants.
port-esp32
Summary
These were added to the network module but not the network.WLAN class, which is the new home for such constants.
Also:
- Mark the WLAN constants in the
networkmodule as deprecated, to be removed in MicroPython 2.0. - Move the static assert to the WLAN source code, to be close to where it relates to.
Testing
Tested that the constants in network are the same as those added in network.WLAN:
>>> import network
>>> network.AUTH_WPA3_ENT_192 == network.WLAN.SEC_WPA3_ENT_192
True
>>> network.AUTH_WPA3_EXT_PSK == network.WLAN.SEC_WPA3_EXT_PSK
True
>>> network.AUTH_WPA3_EXT_PSK_MIXED_MODE == network.WLAN.SEC_WPA3_EXT_PSK_MIXED_MODE
True