docs/library/network: Update docs for network.country, network.hostname.
Also marks wlan.config(hostname) as deprecated. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
593375aa5d
commit
8b277d3c34
@ -130,7 +130,7 @@ Methods
|
||||
hidden Whether SSID is hidden (boolean)
|
||||
security Security protocol supported (enumeration, see module constants)
|
||||
key Access key (string)
|
||||
hostname The hostname that will be sent to DHCP (STA interfaces) and mDNS (if supported, both STA and AP)
|
||||
hostname The hostname that will be sent to DHCP (STA interfaces) and mDNS (if supported, both STA and AP). (Deprecated, use :func:`network.hostname` instead)
|
||||
reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited)
|
||||
txpower Maximum transmit power in dBm (integer or float)
|
||||
============= ===========
|
||||
|
@ -158,12 +158,39 @@ Network functions
|
||||
|
||||
The following are functions available in the network module.
|
||||
|
||||
.. function:: country([code])
|
||||
|
||||
Get or set the two-letter ISO 3166-1 Alpha-2 country code to be used for
|
||||
radio compliance.
|
||||
|
||||
If the *code* parameter is provided, the country will be set to this value.
|
||||
If the function is called without parameters, it returns the current
|
||||
country.
|
||||
|
||||
The default code ``"XX"`` represents the "worldwide" region.
|
||||
|
||||
.. function:: hostname([name])
|
||||
|
||||
Get or set the hostname that will identify this device on the network. It is
|
||||
applied to all interfaces.
|
||||
|
||||
This hostname is used for:
|
||||
* Sending to the DHCP server in the client request. (If using DHCP)
|
||||
* Broadcasting via mDNS. (If enabled)
|
||||
|
||||
If the *name* parameter is provided, the hostname will be set to this value.
|
||||
If the function is called without parameters, it returns the current
|
||||
hostname.
|
||||
|
||||
The default hostname is typically the name of the board.
|
||||
|
||||
.. function:: phy_mode([mode])
|
||||
|
||||
Get or set the PHY mode.
|
||||
|
||||
If the *mode* parameter is provided, sets the mode to its value. If
|
||||
the function is called without parameters, returns the current mode.
|
||||
If the *mode* parameter is provided, the PHY mode will be set to this value.
|
||||
If the function is called without parameters, it returns the current PHY
|
||||
mode.
|
||||
|
||||
The possible modes are defined as constants:
|
||||
* ``MODE_11B`` -- IEEE 802.11b,
|
||||
|
Loading…
x
Reference in New Issue
Block a user