← index #6430PR #16119
Related · high · value 0.308
QUERY · ISSUE

Add extra WLAN authmode in docs

openby eliclementopened 2020-09-10updated 2024-10-01
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.

mergedby dpgeorgeopened 2024-10-31updated 2024-11-05
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 network module 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

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied