esp8266/network_wlan: Allow enumerating connected stations in AP mode.
This commit introduces the ability to obtain a list of stations
connected to the device when in soft-AP mode.
A new parameter ("stations") to pass to WLAN.status is supported,
returning a tuple of (bssid, ipv4) entries, one per connected station.
An empty tuple is returned if no stations are connected, and an
exception is raised if an error occurred whilst building the python
objects to return to the interpreter.
Documentation is also updated to cover the new parameter.
This fixes #5395.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
committed by
Damien George
parent
6fba1e406b
commit
4d034f817c
@@ -85,7 +85,18 @@ Methods
|
||||
* ``STAT_GOT_IP`` -- connection successful.
|
||||
|
||||
When called with one argument *param* should be a string naming the status
|
||||
parameter to retrieve. Supported parameters in WiFI STA mode are: ``'rssi'``.
|
||||
parameter to retrieve, and different parameters are supported depending on the
|
||||
mode the WiFi is in.
|
||||
|
||||
In STA mode, passing ``'rssi'`` returns a signal strength indicator value, whose
|
||||
format varies depending on the port (this is available on all ports that support
|
||||
WiFi network interfaces, except for CC3200).
|
||||
|
||||
In AP mode, passing ``'stations'`` returns a list of connected WiFi stations
|
||||
(this is available on all ports that support WiFi network interfaces, except for
|
||||
CC3200). The format of the station information entries varies across ports,
|
||||
providing either the raw BSSID of the connected station, the IP address of the
|
||||
connected station, or both.
|
||||
|
||||
.. method:: WLAN.isconnected()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user