mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
lower the dhcp discover and request retry backoff time
This commit is contained in:
parent
074850e87c
commit
d4bb163e32
@ -1 +1 @@
|
||||
Subproject commit 57c29648ff40e2a19a51683717928aaf766a0495
|
||||
Subproject commit 269a58f18597aedec31c439e34cdaea47229dda3
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
#ifndef LWIP_HDR_ESP_LWIPOPTS_H
|
||||
#define LWIP_HDR_ESP_LWIPOPTS_H
|
||||
@ -355,11 +355,9 @@ extern "C" {
|
||||
#define DHCP_COARSE_TIMER_SECS CONFIG_LWIP_DHCP_COARSE_TIMER_SECS
|
||||
#define DHCP_NEXT_TIMEOUT_THRESHOLD (3)
|
||||
/* Since for embedded devices it's not that hard to miss a discover packet, so lower
|
||||
* the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s.
|
||||
* the discover and request retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,4,4,4)s.
|
||||
*/
|
||||
#define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \
|
||||
(uint16_t)(1 * 1000) : \
|
||||
(uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250))
|
||||
#define DHCP_REQUEST_TIMEOUT_SEQUENCE(tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250))
|
||||
|
||||
static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
|
||||
{
|
||||
|
@ -1333,7 +1333,7 @@ API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the c
|
||||
* - ssid_hidden
|
||||
- If ssid_hidden is 1, AP does not broadcast the SSID; otherwise, it does broadcast the SSID.
|
||||
* - max_connection
|
||||
- The max number of stations allowed to connect in, the default value is 10. ESP Wi-Fi supports up to {IDF_TARGET_MAX_CONN_STA_NUM} (``ESP_WIFI_MAX_CONN_NUM``) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 17, if :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` <= {IDF_TARGET_SUB_MAX_NUM_FROM_KEYS}, the max_connection can be set up to {IDF_TARGET_MAX_CONN_STA_NUM}, otherwise the max_connection can be set up to (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
||||
- The max number of stations allowed to connect in, the default value is 10. ESP Wi-Fi supports up to 10 (``ESP_WIFI_MAX_CONN_NUM``) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 17, if :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` <= 7, the max_connection can be set up to 10, otherwise the max_connection can be set up to (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
||||
* - beacon_interval
|
||||
- Beacon interval; the value is 100 ~ 60000 ms, with default value being 100 ms. If the value is out of range, AP defaults it to 100 ms.
|
||||
|
||||
@ -1359,7 +1359,7 @@ API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the c
|
||||
* - ssid_hidden
|
||||
- If ssid_hidden is 1, AP does not broadcast the SSID; otherwise, it does broadcast the SSID.
|
||||
* - max_connection
|
||||
- The max number of stations allowed to connect in, the default value is 2. ESP Wi-Fi supports up to {IDF_TARGET_MAX_CONN_STA_NUM} (``ESP_WIFI_MAX_CONN_NUM``) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is {IDF_TARGET_MAX_CONN_STA_NUM}, the max_connection can be set up to ({IDF_TARGET_MAX_CONN_STA_NUM} - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
||||
- The max number of stations allowed to connect in, the default value is 2. ESP Wi-Fi supports up to 4 (``ESP_WIFI_MAX_CONN_NUM``) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 4, the max_connection can be set up to (4 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
||||
* - beacon_interval
|
||||
- Beacon interval; the value is 100 ~ 60000 ms, with default value being 100 ms. If the value is out of range, AP defaults it to 100 ms.
|
||||
|
||||
|
@ -1303,7 +1303,7 @@ API :cpp:func:`esp_wifi_set_config()` 可用于配置 AP。配置的参数信息
|
||||
* - ssid_hidden
|
||||
- 如果 ssid_hidden 为 1,AP 不广播 SSID。若为其他值,则广播。
|
||||
* - max_connection
|
||||
- 允许连接 station 的最大数目,默认值是 10。ESP Wi-Fi 支持 {IDF_TARGET_MAX_CONN_STA_NUM} (``ESP_WIFI_MAX_CONN_NUM``) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys,因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 17,如果 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 小于等于 {IDF_TARGET_SUB_MAX_NUM_FROM_KEYS},那么 max_connection 最大可以设置为 {IDF_TARGET_MAX_CONN_STA_NUM},否则 max_connection 最大可以设置为 (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
|
||||
- 允许连接 station 的最大数目,默认值是 10。ESP Wi-Fi 支持 15 (``ESP_WIFI_MAX_CONN_NUM``) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys,因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 17,如果 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 小于等于 2,那么 max_connection 最大可以设置为 15,否则 max_connection 最大可以设置为 (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
|
||||
* - beacon_interval
|
||||
- beacon 间隔。值为 100 ~ 60000 ms,默认值为 100 ms。如果该值不在上述范围,AP 默认取 100 ms。
|
||||
|
||||
@ -1329,7 +1329,7 @@ API :cpp:func:`esp_wifi_set_config()` 可用于配置 AP。配置的参数信息
|
||||
* - ssid_hidden
|
||||
- 如果 ssid_hidden 为 1,AP 不广播 SSID。若为其他值,则广播。
|
||||
* - max_connection
|
||||
- 允许连接 station 的最大数目,默认值是 2。ESP Wi-Fi 支持 {IDF_TARGET_MAX_CONN_STA_NUM} (``ESP_WIFI_MAX_CONN_NUM``) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys,因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 {IDF_TARGET_MAX_CONN_STA_NUM}, max_connection 最大可以设置为 ({IDF_TARGET_MAX_CONN_STA_NUM} - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
|
||||
- 允许连接 station 的最大数目,默认值是 2。ESP Wi-Fi 支持 4 (``ESP_WIFI_MAX_CONN_NUM``) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys,因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 4, max_connection 最大可以设置为 (4 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
|
||||
* - beacon_interval
|
||||
- beacon 间隔。值为 100 ~ 60000 ms,默认值为 100 ms。如果该值不在上述范围,AP 默认取 100 ms。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user