diff options
| author | iabdalkader <i.abdalkader@gmail.com> | 2022-06-04 12:32:08 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-06-17 21:43:44 +1000 |
| commit | 6e868d47dc5dd7a90444f1173118b7d57e1e4df7 (patch) | |
| tree | bd0feca01865b310085373c5caa094907dc13879 /docs/library | |
| parent | 82b8a2d193657f67cf7a301acc5804b946d662ad (diff) | |
docs: Update to use new WLAN argument names for ssid/security/key.
Addresses issue #8083.
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/network.WLAN.rst | 24 | ||||
| -rw-r--r-- | docs/library/network.rst | 8 |
2 files changed, 16 insertions, 16 deletions
diff --git a/docs/library/network.WLAN.rst b/docs/library/network.WLAN.rst index 274681f17..bc416d1c2 100644 --- a/docs/library/network.WLAN.rst +++ b/docs/library/network.WLAN.rst @@ -10,7 +10,7 @@ This class provides a driver for WiFi network processors. Example usage:: # enable station interface and connect to WiFi access point nic = network.WLAN(network.STA_IF) nic.active(True) - nic.connect('your-ssid', 'your-password') + nic.connect('your-ssid', 'your-key') # now use sockets as usual Constructors @@ -32,9 +32,9 @@ Methods argument is passed. Otherwise, query current state if no argument is provided. Most other methods require active interface. -.. method:: WLAN.connect(ssid=None, password=None, *, bssid=None) +.. method:: WLAN.connect(ssid=None, key=None, *, bssid=None) - Connect to the specified wireless network, using the specified password. + Connect to the specified wireless network, using the specified key. If *bssid* is given then the connection will be restricted to the access-point with that MAC address (the *ssid* must also be specified in this case). @@ -52,12 +52,12 @@ Methods Scanning is only possible on STA interface. Returns list of tuples with the information about WiFi access points: - (ssid, bssid, channel, RSSI, authmode, hidden) + (ssid, bssid, channel, RSSI, security, hidden) *bssid* is hardware address of an access point, in binary form, returned as bytes object. You can use `binascii.hexlify()` to convert it to ASCII form. - There are five values for authmode: + There are five values for security: * 0 -- open * 1 -- WEP @@ -112,10 +112,10 @@ Methods multiple parameters can be set at once. For querying, parameters name should be quoted as a string, and only one parameter can be queries at time:: - # Set WiFi access point name (formally known as ESSID) and WiFi channel - ap.config(essid='My AP', channel=11) + # Set WiFi access point name (formally known as SSID) and WiFi channel + ap.config(ssid='My AP', channel=11) # Query params one by one - print(ap.config('essid')) + print(ap.config('ssid')) print(ap.config('channel')) Following are commonly supported parameters (availability of a specific parameter @@ -125,11 +125,11 @@ Methods Parameter Description ============= =========== mac MAC address (bytes) - essid WiFi access point name (string) + ssid WiFi access point name (string) channel WiFi channel (integer) - hidden Whether ESSID is hidden (boolean) - authmode Authentication mode supported (enumeration, see module constants) - password Access password (string) + hidden Whether SSID is hidden (boolean) + security Security protocol supported (enumeration, see module constants) + key Access key (string) dhcp_hostname The DHCP hostname to use reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited) txpower Maximum transmit power in dBm (integer or float) diff --git a/docs/library/network.rst b/docs/library/network.rst index 361e664b5..6742a2e07 100644 --- a/docs/library/network.rst +++ b/docs/library/network.rst @@ -89,7 +89,7 @@ parameter should be `id`. network media, there are different variants of predefined/ recommended tuple formats, among them: - * WiFi: (ssid, bssid, channel, RSSI, authmode, hidden). There + * WiFi: (ssid, bssid, channel, RSSI, security, hidden). There may be further fields, specific to a particular device. The function may accept additional keyword arguments to filter scan @@ -133,10 +133,10 @@ parameter should be `id`. querying, a parameter name should be quoted as a string, and only one parameter can be queried at a time:: - # Set WiFi access point name (formally known as ESSID) and WiFi channel - ap.config(essid='My AP', channel=11) + # Set WiFi access point name (formally known as SSID) and WiFi channel + ap.config(ssid='My AP', channel=11) # Query params one by one - print(ap.config('essid')) + print(ap.config('ssid')) print(ap.config('channel')) Specific network class implementations |
