diff options
author | Felix Dörre <felix@dogcraft.de> | 2024-03-18 00:57:22 +0000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-07-05 16:06:04 +1000 |
commit | 4d16a9cced42ad0a298f1be8b993357abe7398ab (patch) | |
tree | aa331b1eb122d5a5ed3774726eb96be7c6b90313 /docs/esp32 | |
parent | 0b58d02f70cb883bf19ceec5536be59984f22d90 (diff) | |
download | micropython-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/esp32')
-rw-r--r-- | docs/esp32/quickref.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst index 2be1dbadc3..3d3fbe0b1a 100644 --- a/docs/esp32/quickref.rst +++ b/docs/esp32/quickref.rst @@ -89,7 +89,7 @@ The :mod:`network` module:: wlan.isconnected() # check if the station is connected to an AP wlan.connect('ssid', 'key') # connect to an AP wlan.config('mac') # get the interface's MAC address - wlan.ifconfig() # get the interface's IP/netmask/gw/DNS addresses + wlan.ipconfig('addr4') # get the interface's IPv4 addresses ap = network.WLAN(network.AP_IF) # create access-point interface ap.config(ssid='ESP-AP') # set the SSID of the access point @@ -107,7 +107,7 @@ A useful function for connecting to your local WiFi network is:: wlan.connect('ssid', 'key') while not wlan.isconnected(): pass - print('network config:', wlan.ifconfig()) + print('network config:', wlan.ipconfig('addr4')) Once the network is established the :mod:`socket <socket>` module can be used to create and use TCP/UDP sockets as usual, and the ``requests`` module for @@ -130,7 +130,7 @@ To use the wired interfaces one has to specify the pins and mode :: lan = network.LAN(mdc=PIN_MDC, ...) # Set the pin and mode configuration lan.active(True) # activate the interface - lan.ifconfig() # get the interface's IP/netmask/gw/DNS addresses + lan.ipconfig('addr4') # get the interface's IPv4 addresses The keyword arguments for the constructor defining the PHY type and interface are: |