← index #15304Issue #15607
Related · high · value 1.515
QUERY · ISSUE

docs: WLAN module, undocumented methods

openby massimosalaopened 2024-06-19updated 2025-03-03
docs

Documentation URL

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

Description

MP 1.23 on RP2

My program creates an instance of WiFi client and prints its interface:

nic = WLAN(STA_IF)
print(dir(nic))

Output:

['class', 'IF_AP', 'IF_STA', 'PM_NONE', 'PM_PERFORMANCE', 'PM_POWERSAVE', 'SEC_OPEN', 'SEC_WPA_WPA2', 'active', 'config', 'connect', 'deinit', 'disconnect', 'ifconfig', 'ioctl', 'ipconfig', 'isconnected', 'scan', 'send_ethernet', 'status']

The doc doesn't explain these methods:

  • deinit
  • ioctl
  • send_ethernet

Essential info: is it safe to call deinit() to tear down a WLAN instance and free the resources used by it?


Same questions regarding AP_IF, I suppose.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

docs: Information missing about 'status' options while wifi is in AP mode + "Constants" module about security?

openby TRadigkopened 2024-08-06updated 2024-12-27
docs

Documentation URL

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

Description

From this PR the information is missing in the docs:
https://github.com/micropython/micropython-esp32/issues/186

the current state of the page contains:

When called with one argument param should be a string naming the status parameter to retrieve. Supported parameters in WiFI STA mode are: 'rssi'.

I think one could add at least:

Supported parameters in WiFi AP mode are: 'stations'. It returns a list of tuples with binary representation of a clients mac address followed by its rssi value (currently not supported).

But since the word "STA" is used in different contexts it is hard to suggest this. I can understand there are two modes: STA_IF (station interface) and STA_AP (station access point). Sometimes it looks like "STA" is a mode of its own (for a non native speaker) from:

WiFI STA mode are

Additionally one could resolve the typo of the capital i after the f of wifi.

And last but not least:
In the table for WLAN.config(param=value,...)it mentions:

security | Security protocol supported (enumeration, see module **constants**)

Since "Constants" is attached below one might think information about security could be found there, but instead there are power modes found and no information about security. I can't even suggest if documentation is to be added of the information about security is no longer available in that module.

I wonder if there is more to be found if someone with knowledge about the code takes a look at this (I am just a (happy) user of micropython).

Code of Conduct

Yes, I agree

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