← index #17194Issue #11048
Duplicate · high · value 5.007
QUERY · ISSUE

docs: WLAN.scan() results on RP2/PICO_W with 1.24.1

openby Gooupsopened 2025-04-26updated 2025-10-22
docs

Documentation URL

https://docs.micropython.org/en/latest/library/network.WLAN.html

Description

The documentation report the following

There are five values for security:

0 – open
1 – WEP
2 – WPA-PSK
3 – WPA2-PSK
4 – WPA/WPA2-PSK

and two for hidden:

0 – visible
1 – hidden

While using the WLAN.scan() function, I got the following results:

Most of the networks in my neighbourhood are reporting

security = 5

and hidden:

1 - Most of them, and by the way, the networks are visible (so, they should be 0)
2 - seems hidden
5 - visible (homekit device)
7 - One of my home Wi-Fi (made by an old D-Link router)
9 - My main home Wi-Fi (made by a TP-Link router)

Any thoughts ?

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

RP2040: wlan.scan results disconnected from documentation and faulty

openby Flipje1955opened 2023-03-16updated 2023-09-09
bugport-rp2

When running wlan.scan on a Pico_w (MicroPython v1.19.1-966-g05bb26010 on 2023-03-13; Raspberry Pi Pico W with RP2040, also on earlier nightly builds), the output is disconnect from the documentation. Examples:

  1. "security": value 5 is returned (whereas doc offers only values 0..4);
  2. "hidden": values 2, 3 sometimes 5 is returned - on a non_hidden network - whereas doc offers only value 0,1;

script used:
import network
station = network.WLAN(network.STA_IF)
station.active(True)
active_ssid = station.scan()
for item in enumerate(active_ssid):
print(item)
station.disconnect()

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