@@ -16,10 +16,74 @@ from _espnow import ESPNowBase # type: ignore
1616from _mpy_shed import mp_available
1717
1818MAX_DATA_LEN : Incomplete = 250
19+ """\
20+ The following constants correspond to different transmit data rates on ESP32
21+ only. Lower data rates are generally more reliable over long distances:
22+ """
1923KEY_LEN : Incomplete = 16
24+ """\
25+ The following constants correspond to different transmit data rates on ESP32
26+ only. Lower data rates are generally more reliable over long distances:
27+ """
2028ADDR_LEN : Incomplete = 6
29+ """\
30+ The following constants correspond to different transmit data rates on ESP32
31+ only. Lower data rates are generally more reliable over long distances:
32+ """
2133MAX_TOTAL_PEER_NUM : Incomplete = 20
34+ """\
35+ The following constants correspond to different transmit data rates on ESP32
36+ only. Lower data rates are generally more reliable over long distances:
37+ """
2238MAX_ENCRYPT_PEER_NUM : Incomplete = 6
39+ """\
40+ The following constants correspond to different transmit data rates on ESP32
41+ only. Lower data rates are generally more reliable over long distances:
42+ """
43+ RATE_LORA_250K : Incomplete
44+ """See `espnow-long-range`."""
45+ RATE_LORA_500K : Incomplete
46+ """See `espnow-long-range`."""
47+ RATE_1M : Incomplete
48+ """\
49+ Unless using the two proprietary long range data rates, only the sender must
50+ configure the data rate.
51+ """
52+ RATE_2M : Incomplete
53+ """\
54+ Unless using the two proprietary long range data rates, only the sender must
55+ configure the data rate.
56+ """
57+ RATE_5M : Incomplete
58+ """\
59+ Unless using the two proprietary long range data rates, only the sender must
60+ configure the data rate.
61+ """
62+ RATE_6M : Incomplete
63+ """\
64+ Unless using the two proprietary long range data rates, only the sender must
65+ configure the data rate.
66+ """
67+ RATE_11M : Incomplete
68+ """\
69+ Unless using the two proprietary long range data rates, only the sender must
70+ configure the data rate.
71+ """
72+ RATE_12M : Incomplete
73+ """\
74+ Unless using the two proprietary long range data rates, only the sender must
75+ configure the data rate.
76+ """
77+ RATE_24M : Incomplete
78+ """\
79+ Unless using the two proprietary long range data rates, only the sender must
80+ configure the data rate.
81+ """
82+ RATE_54M : Incomplete
83+ """\
84+ Unless using the two proprietary long range data rates, only the sender must
85+ configure the data rate.
86+ """
2387_MACAddress : TypeAlias = bytes
2488_PeerInfo : TypeAlias = Tuple [_MACAddress , bytes , int , int , bool ]
2589class ESPNow (ESPNowBase , Iterator ):
@@ -124,13 +188,15 @@ class ESPNow(ESPNowBase, Iterator):
124188 wait forever. The timeout can also be provided as arg to
125189 `recv()`/`irecv()`/`recvinto()`.
126190
127- *rate*: (ESP32 only) Set the transmission speed for
128- ESPNow packets. Must be set to a number from the allowed numeric values
129- in `enum wifi_phy_rate_t
130- <https://docs.espressif.com/projects/esp-idf/en/v5.2.3/esp32/
191+ *rate*: (ESP32 only) Set the transmission data rate for ESPNow packets.
192+ The default setting is `espnow.RATE_1M`. It's recommended to use one of
193+ the other ``espnow.RATE_nnn`` constants to set this, but it's also
194+ possible to pass an integer corresponding to the `enum wifi_phy_rate_t
195+ <https://docs.espressif.com/projects/esp-idf/en/v5.5.1/esp32/
131196 api-reference/network/esp_wifi.html#_CPPv415wifi_phy_rate_t>`_. This
132197 parameter is actually *write-only* due to ESP-IDF not providing any
133198 means for querying the radio interface's rate parameter.
199+ See also `espnow-long-range`. This API currently doesn't work on ESP32-C6.
134200
135201 Returns:
136202
0 commit comments