Skip to content

top: Common network hostname/country configuration. #10635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 28, 2023
Merged
2 changes: 1 addition & 1 deletion docs/library/network.WLAN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
============= ===========
31 changes: 29 additions & 2 deletions docs/library/network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
144 changes: 0 additions & 144 deletions drivers/cyw43/cyw43.h

This file was deleted.

Loading