diff options
| author | Angus Gratton <angus@redyak.com.au> | 2024-11-13 11:20:03 +1100 |
|---|---|---|
| committer | Angus Gratton <gus@projectgus.com> | 2024-11-28 15:39:06 +1100 |
| commit | 7647c828de4ffb9877163909017bbe909e79aacb (patch) | |
| tree | f8eb1c814ed4a45d09780454529d89e31709ed0a /docs/library | |
| parent | 78d017fc4e70bf21b7c53f193550d220f8959e38 (diff) | |
tests/multi_espnow: Add channel setting test, add some docs.
Test currently passes. It was added so it can be used to check for
regressions when fixing channel selection for AP mode in a follow-up
commit.
Also add some docs about how channel setting is observed to work for
ESP-NOW.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/espnow.rst | 7 | ||||
| -rw-r--r-- | docs/library/network.WLAN.rst | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/library/espnow.rst b/docs/library/espnow.rst index 1bcc9d762..379e60486 100644 --- a/docs/library/espnow.rst +++ b/docs/library/espnow.rst @@ -441,7 +441,9 @@ must first register the sender and use the same encryption keys as the sender - *channel*: The wifi channel (2.4GHz) to communicate with this peer. Must be an integer from 0 to 14. If channel is set to 0 the current - channel of the wifi device will be used. (default=0) + channel of the wifi device will be used, if channel is set to another + value then this must match the channel currently configured on the + interface (see :func:`WLAN.config`). (default=0) - *ifidx*: (ESP32 only) Index of the wifi interface which will be used to send data to this peer. Must be an integer set to @@ -470,6 +472,9 @@ must first register the sender and use the same encryption keys as the sender registered. - ``OSError(num, "ESP_ERR_ESPNOW_FULL")`` if too many peers are already registered. + - ``OSError(num, "ESP_ERR_ESPNOW_CHAN")`` if a channel value was + set that doesn't match the channel currently configured for this + interface. - ``ValueError()`` on invalid keyword args or values. .. method:: ESPNow.del_peer(mac) diff --git a/docs/library/network.WLAN.rst b/docs/library/network.WLAN.rst index 3c401acb4..09fefc592 100644 --- a/docs/library/network.WLAN.rst +++ b/docs/library/network.WLAN.rst @@ -126,7 +126,7 @@ Methods ============= =========== mac MAC address (bytes) ssid WiFi access point name (string) - channel WiFi channel (integer) + channel WiFi channel (integer). Depending on the port this may only be supported on the AP interface. hidden Whether SSID is hidden (boolean) security Security protocol supported (enumeration, see module constants) key Access key (string) |
