summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/network.WLANWiPy.rst
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2024-03-18 00:57:22 +0000
committerDamien George <damien@micropython.org>2024-07-05 16:06:04 +1000
commit4d16a9cced42ad0a298f1be8b993357abe7398ab (patch)
treeaa331b1eb122d5a5ed3774726eb96be7c6b90313 /docs/library/network.WLANWiPy.rst
parent0b58d02f70cb883bf19ceec5536be59984f22d90 (diff)
downloadmicropython-4d16a9cced42ad0a298f1be8b993357abe7398ab.tar.gz
micropython-4d16a9cced42ad0a298f1be8b993357abe7398ab.zip
docs: Update docs to replace ifconfig with ipconfig.
Follow up to 1c6012b0b5c62f18130217f30e73ad3ce4c8c9e6 Signed-off-by: Felix Dörre <felix@dogcraft.de>
Diffstat (limited to 'docs/library/network.WLANWiPy.rst')
-rw-r--r--docs/library/network.WLANWiPy.rst14
1 files changed, 4 insertions, 10 deletions
diff --git a/docs/library/network.WLANWiPy.rst b/docs/library/network.WLANWiPy.rst
index 2a5ba11845..4ac82e92c6 100644
--- a/docs/library/network.WLANWiPy.rst
+++ b/docs/library/network.WLANWiPy.rst
@@ -20,7 +20,7 @@ This class provides a driver for the WiFi network processor in the WiPy. Example
wlan.connect('your-ssid', auth=(WLAN.WPA2, 'your-key'))
while not wlan.isconnected():
time.sleep_ms(50)
- print(wlan.ifconfig())
+ print(wlan.ipconfig("addr4"))
# now use socket as usual
...
@@ -96,16 +96,10 @@ Methods
In case of STA mode, returns ``True`` if connected to a WiFi access point and has a valid IP address.
In AP mode returns ``True`` when a station is connected, ``False`` otherwise.
-.. method:: WLANWiPy.ifconfig(if_id=0, config=['dhcp' or configtuple])
+.. method:: WLANWiPy.ipconfig('param')
+ WLANWiPy.ipconfig(param=value, ...)
- With no parameters given returns a 4-tuple of *(ip, subnet_mask, gateway, DNS_server)*.
-
- if ``'dhcp'`` is passed as a parameter then the DHCP client is enabled and the IP params
- are negotiated with the AP.
-
- If the 4-tuple config is given then a static IP is configured. For instance::
-
- wlan.ifconfig(config=('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
+ See :meth:`AbstractNIC.ipconfig <AbstractNIC.ipconfig>`. Supported parameters are: ``dhcp4``, ``addr4``, ``gw4``.
.. method:: WLANWiPy.mode([mode])