summaryrefslogtreecommitdiff
path: root/docs/library/network.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/network.rst')
-rw-r--r--docs/library/network.rst35
1 files changed, 18 insertions, 17 deletions
diff --git a/docs/library/network.rst b/docs/library/network.rst
index 0e18106aa..251e68c76 100644
--- a/docs/library/network.rst
+++ b/docs/library/network.rst
@@ -5,11 +5,12 @@
.. module:: network
:synopsis: network configuration
-This module provides network drivers and routing configuration. Network
-drivers for specific hardware are available within this module and are
-used to configure a hardware network interface. Configured interfaces
-are then available for use via the :mod:`socket` module. To use this module
-the network build of firmware must be installed.
+This module provides network drivers and routing configuration. To use this
+module, a MicroPython variant/build with network capabilities must be installed.
+Network drivers for specific hardware are available within this module and are
+used to configure hardware network interface(s). Network services provided
+by configured interfaces are then available for use via the :mod:`socket`
+module.
For example::
@@ -79,7 +80,7 @@ For example::
class CC3K
==========
- This class provides a driver for CC3000 wifi modules. Example usage::
+ This class provides a driver for CC3000 WiFi modules. Example usage::
import network
nic = network.CC3K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
@@ -128,16 +129,16 @@ For example::
.. method:: cc3k.connect(ssid, key=None, \*, security=WPA2, bssid=None)
- Connect to a wifi access point using the given SSID, and other security
+ Connect to a WiFi access point using the given SSID, and other security
parameters.
.. method:: cc3k.disconnect()
- Disconnect from the wifi access point.
+ Disconnect from the WiFi access point.
.. method:: cc3k.isconnected()
- Returns True if connected to a wifi access point and has a valid IP address,
+ Returns True if connected to a WiFi access point and has a valid IP address,
False otherwise.
.. method:: cc3k.ifconfig()
@@ -323,7 +324,7 @@ For example::
.. method:: wlan.isconnected()
- In case of STA mode, returns ``True`` if connected to a wifi access
+ 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. Returns ``False`` otherwise.
@@ -348,7 +349,7 @@ For example::
# Set WiFi access point name (formally known as ESSID) and WiFi channel
ap.config(essid='My AP', channel=11)
- # Queey params one by one
+ # Query params one by one
print(ap.config('essid'))
print(ap.config('channel'))
@@ -433,7 +434,7 @@ For example::
.. method:: wlan.connect(ssid, \*, auth=None, bssid=None, timeout=None)
- Connect to a wifi access point using the given SSID, and other security
+ Connect to a WiFi access point using the given SSID, and other security
parameters.
- ``auth`` is a tuple with (sec, key). Security can be ``None``, ``WLAN.WEP``,
@@ -451,16 +452,16 @@ For example::
.. method:: wlan.disconnect()
- Disconnect from the wifi access point.
+ Disconnect from the WiFi access point.
.. method:: wlan.isconnected()
- In case of STA mode, returns ``True`` if connected to a wifi access point and has a valid IP address.
+ 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:: wlan.ifconfig(if_id=0, config=['dhcp' or configtuple])
- With no parameters given eturns a 4-tuple of ``(ip, subnet_mask, gateway, DNS_server)``.
+ 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.
@@ -498,10 +499,10 @@ For example::
Create a callback to be triggered when a WLAN event occurs during ``machine.SLEEP``
mode. Events are triggered by socket activity or by WLAN connection/disconnection.
- - ``handler`` is the function that gets called when the irq is triggered.
+ - ``handler`` is the function that gets called when the IRQ is triggered.
- ``wake`` must be ``machine.SLEEP``.
- Returns an irq object.
+ Returns an IRQ object.
Constants
---------