Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. menu "Wi-Fi"
  2. visible if !IDF_TARGET_ESP32H2
  3. config ESP32_WIFI_ENABLED
  4. bool
  5. default "y" if !IDF_TARGET_ESP32H2 # TODO: replace with SOC_CAPS_SUPPORT_WIFI after IDF-2223 is done
  6. config ESP32_WIFI_SW_COEXIST_ENABLE
  7. bool "Software controls WiFi/Bluetooth coexistence"
  8. depends on ESP32_WIFI_ENABLED && BT_ENABLED
  9. default y
  10. help
  11. If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware.
  12. Recommended for heavy traffic scenarios. Both coexistence configuration options are
  13. automatically managed, no user intervention is required.
  14. If only Bluetooth is used, it is recommended to disable this option to reduce binary file
  15. size.
  16. config ESP32_WIFI_STATIC_RX_BUFFER_NUM
  17. int "Max number of WiFi static RX buffers"
  18. range 2 25
  19. default 10 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  20. default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  21. help
  22. Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
  23. The static rx buffers are allocated when esp_wifi_init is called, they are not freed
  24. until esp_wifi_deinit is called.
  25. WiFi hardware use these buffers to receive all 802.11 frames.
  26. A higher number may allow higher throughput but increases memory use. If ESP32_WIFI_AMPDU_RX_ENABLED
  27. is enabled, this value is recommended to set equal or bigger than ESP32_WIFI_RX_BA_WIN in order to
  28. achieve better throughput and compatibility with both stations and APs.
  29. config ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM
  30. int "Max number of WiFi dynamic RX buffers"
  31. range 0 128 if !LWIP_WND_SCALE
  32. range 0 1024 if LWIP_WND_SCALE
  33. default 32
  34. help
  35. Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
  36. (provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
  37. the received data frame.
  38. For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
  39. it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
  40. successfully received the data frame.
  41. For some applications, WiFi data frames may be received faster than the application can
  42. process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
  43. If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
  44. choice ESP32_WIFI_TX_BUFFER
  45. prompt "Type of WiFi TX buffers"
  46. default ESP32_WIFI_DYNAMIC_TX_BUFFER
  47. help
  48. Select type of WiFi TX buffers:
  49. If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
  50. when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
  51. If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
  52. delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
  53. has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
  54. of each data frame sent by the TCP/IP layer.
  55. If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
  56. If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
  57. config ESP32_WIFI_STATIC_TX_BUFFER
  58. bool "Static"
  59. config ESP32_WIFI_DYNAMIC_TX_BUFFER
  60. bool "Dynamic"
  61. depends on !SPIRAM_USE_MALLOC
  62. endchoice
  63. config ESP32_WIFI_TX_BUFFER_TYPE
  64. int
  65. default 0 if ESP32_WIFI_STATIC_TX_BUFFER
  66. default 1 if ESP32_WIFI_DYNAMIC_TX_BUFFER
  67. config ESP32_WIFI_STATIC_TX_BUFFER_NUM
  68. int "Max number of WiFi static TX buffers"
  69. depends on ESP32_WIFI_STATIC_TX_BUFFER
  70. range 1 64
  71. default 16
  72. help
  73. Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
  74. The static RX buffers are allocated when esp_wifi_init() is called, they are not released
  75. until esp_wifi_deinit() is called.
  76. For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
  77. copy of it in a TX buffer. For some applications especially UDP applications, the upper
  78. layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
  79. of TX buffers.
  80. config ESP32_WIFI_CACHE_TX_BUFFER_NUM
  81. int "Max number of WiFi cache TX buffers"
  82. depends on (ESP32_SPIRAM_SUPPORT || ESP32S2_SPIRAM_SUPPORT || ESP32S3_SPIRAM_SUPPORT)
  83. range 16 128
  84. default 32
  85. help
  86. Set the number of WiFi cache TX buffer number.
  87. For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
  88. buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
  89. it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
  90. size of the cached TX queue.
  91. config ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM
  92. int "Max number of WiFi dynamic TX buffers"
  93. depends on ESP32_WIFI_DYNAMIC_TX_BUFFER
  94. range 1 128
  95. default 32
  96. help
  97. Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
  98. it depends on the size of each transmitted data frame.
  99. For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
  100. of it in a TX buffer. For some applications, especially UDP applications, the upper layer
  101. can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
  102. buffers.
  103. config ESP32_WIFI_CSI_ENABLED
  104. bool "WiFi CSI(Channel State Information)"
  105. default n
  106. help
  107. Select this option to enable CSI(Channel State Information) feature. CSI takes about
  108. CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
  109. this feature in order to save memory.
  110. config ESP32_WIFI_AMPDU_TX_ENABLED
  111. bool "WiFi AMPDU TX"
  112. default y
  113. help
  114. Select this option to enable AMPDU TX feature
  115. config ESP32_WIFI_TX_BA_WIN
  116. int "WiFi AMPDU TX BA window size"
  117. depends on ESP32_WIFI_AMPDU_TX_ENABLED
  118. range 2 32
  119. default 6
  120. help
  121. Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
  122. more memory. Most of time we should NOT change the default value unless special reason, e.g.
  123. test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
  124. value is 9~12.
  125. config ESP32_WIFI_AMPDU_RX_ENABLED
  126. bool "WiFi AMPDU RX"
  127. default y
  128. help
  129. Select this option to enable AMPDU RX feature
  130. config ESP32_WIFI_RX_BA_WIN
  131. int "WiFi AMPDU RX BA window size"
  132. depends on ESP32_WIFI_AMPDU_RX_ENABLED
  133. range 2 32
  134. default 6 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  135. default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  136. help
  137. Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
  138. compatibility but more memory. Most of time we should NOT change the default value unless special
  139. reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
  140. recommended value is 9~12. If PSRAM is used and WiFi memory is prefered to allocat in PSRAM first,
  141. the default and minimum value should be 16 to achieve better throughput and compatibility with both
  142. stations and APs.
  143. config ESP32_WIFI_AMSDU_TX_ENABLED
  144. bool "WiFi AMSDU TX"
  145. depends on (ESP32_SPIRAM_SUPPORT || ESP32S2_SPIRAM_SUPPORT || ESP32S3_SPIRAM_SUPPORT)
  146. default n
  147. help
  148. Select this option to enable AMSDU TX feature
  149. config ESP32_WIFI_NVS_ENABLED
  150. bool "WiFi NVS flash"
  151. default y
  152. help
  153. Select this option to enable WiFi NVS flash
  154. choice ESP32_WIFI_TASK_CORE_ID
  155. depends on !FREERTOS_UNICORE
  156. prompt "WiFi Task Core ID"
  157. default ESP32_WIFI_TASK_PINNED_TO_CORE_0
  158. help
  159. Pinned WiFi task to core 0 or core 1.
  160. config ESP32_WIFI_TASK_PINNED_TO_CORE_0
  161. bool "Core 0"
  162. config ESP32_WIFI_TASK_PINNED_TO_CORE_1
  163. bool "Core 1"
  164. endchoice
  165. config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
  166. int "Max length of WiFi SoftAP Beacon"
  167. range 752 1256
  168. default 752
  169. help
  170. ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
  171. default length of a beacon frame can simultaneously hold only five root node identifier structures,
  172. meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
  173. more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
  174. five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
  175. until all root node conflicts are resolved. However this process can generally take a very long time.
  176. To counter this situation, the beacon frame length can be increased such that more root nodes can be
  177. detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
  178. default beacon frame length of
  179. 752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
  180. frame length as
  181. 932 (752+36*5).
  182. Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified
  183. more quickly.
  184. config ESP32_WIFI_MGMT_SBUF_NUM
  185. int "WiFi mgmt short buffer number"
  186. range 6 32
  187. default 32
  188. help
  189. Set the number of WiFi management short buffer.
  190. config ESP32_WIFI_IRAM_OPT
  191. bool "WiFi IRAM speed optimization"
  192. default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT)
  193. default y
  194. help
  195. Select this option to place frequently called Wi-Fi library functions in IRAM.
  196. When this option is disabled, more than 10Kbytes of IRAM memory will be saved
  197. but Wi-Fi throughput will be reduced.
  198. config ESP32_WIFI_RX_IRAM_OPT
  199. bool "WiFi RX IRAM speed optimization"
  200. default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT)
  201. default y
  202. help
  203. Select this option to place frequently called Wi-Fi library RX functions in IRAM.
  204. When this option is disabled, more than 17Kbytes of IRAM memory will be saved
  205. but Wi-Fi performance will be reduced.
  206. config ESP32_WIFI_ENABLE_WPA3_SAE
  207. bool "Enable WPA3-Personal"
  208. default y
  209. depends on WPA_MBEDTLS_CRYPTO
  210. help
  211. Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
  212. PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
  213. explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
  214. config ESP_WIFI_SLP_IRAM_OPT
  215. bool "WiFi SLP IRAM speed optimization"
  216. select PM_SLP_DEFAULT_PARAMS_OPT
  217. help
  218. Select this option to place called Wi-Fi library TBTT process and receive beacon functions in IRAM.
  219. Some functions can be put in IRAM either by ESP32_WIFI_IRAM_OPT and ESP32_WIFI_RX_IRAM_OPT, or this one.
  220. If already enabled ESP32_WIFI_IRAM_OPT, the other 7.3KB IRAM memory would be taken by this option.
  221. If already enabled ESP32_WIFI_RX_IRAM_OPT, the other 1.3KB IRAM memory would be taken by this option.
  222. If neither of them are enabled, the other 7.4KB IRAM memory would be taken by this option.
  223. Wi-Fi power-save mode average current would be reduced if this option is enabled.
  224. config ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME
  225. int "Minimum active time"
  226. range 8 60
  227. default 50
  228. depends on ESP_WIFI_SLP_IRAM_OPT
  229. help
  230. The minimum timeout for waiting to receive data, unit: milliseconds.
  231. config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME
  232. int "Maximum keep alive time"
  233. range 10 60
  234. default 10
  235. depends on ESP_WIFI_SLP_IRAM_OPT
  236. help
  237. The maximum time that wifi keep alive, unit: seconds.
  238. config ESP_WIFI_FTM_ENABLE
  239. bool "WiFi FTM"
  240. default n
  241. depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
  242. help
  243. Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
  244. config ESP_WIFI_FTM_INITIATOR_SUPPORT
  245. bool "FTM Initiator support"
  246. default y
  247. depends on ESP_WIFI_FTM_ENABLE
  248. config ESP_WIFI_FTM_RESPONDER_SUPPORT
  249. bool "FTM Responder support"
  250. default y
  251. depends on ESP_WIFI_FTM_ENABLE
  252. config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
  253. bool "Power Management for station at disconnected"
  254. help
  255. Select this option to enable power_management for station when disconnected.
  256. Chip will do modem-sleep when rf module is not in use any more.
  257. config ESP_WIFI_EXTERNAL_COEXIST_ENABLE
  258. bool "WiFi External Coexistence"
  259. default n
  260. depends on (!BT_ENABLED && (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3))
  261. help
  262. If enabled, HW External coexistence arbitration is managed by GPIO pins.
  263. It can support three types of wired combinations so far which are 1-wired/2-wired/3-wired.
  264. User can select GPIO pins in application code with configure interfaces.
  265. This function depends on BT-off
  266. because currently we don't support external coex and internal coex simultaneously.
  267. config ESP_WIFI_GCMP_SUPPORT
  268. bool "WiFi GCMP Support(GCMP128 and GCMP256)"
  269. default n
  270. depends on (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
  271. help
  272. Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
  273. config ESP_WIFI_GMAC_SUPPORT
  274. bool "WiFi GMAC Support(GMAC128 and GMAC256)"
  275. default n
  276. help
  277. Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification.
  278. endmenu # Wi-Fi