Kconfig.in 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. menu "HCI Config"
  2. choice BT_LE_HCI_INTERFACE
  3. prompt "Select HCI interface"
  4. default BT_LE_HCI_INTERFACE_USE_RAM
  5. config BT_LE_HCI_INTERFACE_USE_RAM
  6. bool "ram"
  7. help
  8. Use RAM as HCI interface
  9. config BT_LE_HCI_INTERFACE_USE_UART
  10. bool "uart"
  11. help
  12. Use UART as HCI interface
  13. endchoice
  14. config BT_LE_HCI_UART_PORT
  15. int "HCI UART port"
  16. depends on BT_LE_HCI_INTERFACE_USE_UART
  17. default 1
  18. help
  19. Set the port number of HCI UART
  20. config BT_LE_HCI_UART_FLOWCTRL
  21. bool "HCI uart Hardware Flow ctrl"
  22. depends on BT_LE_HCI_INTERFACE_USE_UART
  23. default n
  24. config BT_LE_HCI_UART_TX_PIN
  25. int "HCI uart Tx gpio"
  26. depends on BT_LE_HCI_INTERFACE_USE_UART
  27. default 19
  28. config BT_LE_HCI_UART_RX_PIN
  29. int "HCI uart Rx gpio"
  30. depends on BT_LE_HCI_INTERFACE_USE_UART
  31. default 10
  32. config BT_LE_HCI_UART_RTS_PIN
  33. int "HCI uart RTS gpio"
  34. depends on BT_LE_HCI_UART_FLOWCTRL
  35. default 4
  36. config BT_LE_HCI_UART_CTS_PIN
  37. int "HCI uart CTS gpio"
  38. depends on BT_LE_HCI_UART_FLOWCTRL
  39. default 5
  40. config BT_LE_HCI_UART_BAUD
  41. int "HCI uart baudrate"
  42. depends on BT_LE_HCI_INTERFACE_USE_UART
  43. default 921600
  44. help
  45. HCI uart baud rate 115200 ~ 1000000
  46. choice BT_LE_HCI_UART_PARITY
  47. prompt "select uart parity"
  48. depends on BT_LE_HCI_INTERFACE_USE_UART
  49. default BT_LE_HCI_UART_UART_PARITY_DISABLE
  50. config BT_LE_HCI_UART_UART_PARITY_DISABLE
  51. bool "PARITY_DISABLE"
  52. help
  53. UART_PARITY_DISABLE
  54. config BT_LE_HCI_UART_UART_PARITY_EVEN
  55. bool "PARITY_EVEN"
  56. help
  57. UART_PARITY_EVEN
  58. config BT_LE_HCI_UART_UART_PARITY_ODD
  59. bool "PARITY_ODD"
  60. help
  61. UART_PARITY_ODD
  62. endchoice
  63. config BT_LE_HCI_UART_TASK_STACK_SIZE
  64. int "HCI uart task stack size"
  65. depends on BT_LE_HCI_INTERFACE_USE_UART
  66. default 1000
  67. help
  68. Set the size of uart task stack
  69. endmenu
  70. config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
  71. bool
  72. default y
  73. help
  74. Enable NPL porting for controller.
  75. menuconfig BT_LE_50_FEATURE_SUPPORT
  76. bool "Enable BLE 5 feature"
  77. depends on !BT_NIMBLE_ENABLED
  78. default y
  79. help
  80. Enable BLE 5 feature
  81. config BT_LE_LL_CFG_FEAT_LE_2M_PHY
  82. bool "Enable 2M Phy"
  83. depends on BT_LE_50_FEATURE_SUPPORT
  84. default y
  85. help
  86. Enable 2M-PHY
  87. config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
  88. bool "Enable coded Phy"
  89. depends on BT_LE_50_FEATURE_SUPPORT
  90. default y
  91. help
  92. Enable coded-PHY
  93. config BT_LE_EXT_ADV
  94. bool "Enable extended advertising"
  95. depends on BT_LE_50_FEATURE_SUPPORT
  96. default y
  97. help
  98. Enable this option to do extended advertising. Extended advertising
  99. will be supported from BLE 5.0 onwards.
  100. if BT_LE_EXT_ADV
  101. config BT_LE_MAX_EXT_ADV_INSTANCES
  102. int "Maximum number of extended advertising instances."
  103. range 0 4
  104. default 1
  105. depends on BT_LE_EXT_ADV
  106. help
  107. Change this option to set maximum number of extended advertising
  108. instances. Minimum there is always one instance of
  109. advertising. Enter how many more advertising instances you
  110. want.
  111. Each extended advertising instance will take about 0.5k DRAM.
  112. config BT_LE_EXT_ADV_MAX_SIZE
  113. int "Maximum length of the advertising data."
  114. range 0 1650
  115. default 1650
  116. depends on BT_LE_EXT_ADV
  117. help
  118. Defines the length of the extended adv data. The value should not
  119. exceed 1650.
  120. config BT_LE_ENABLE_PERIODIC_ADV
  121. bool "Enable periodic advertisement."
  122. default y
  123. depends on BT_LE_EXT_ADV
  124. help
  125. Enable this option to start periodic advertisement.
  126. config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
  127. bool "Enable Transer Sync Events"
  128. depends on BT_LE_ENABLE_PERIODIC_ADV
  129. default y
  130. help
  131. This enables controller transfer periodic sync events to host
  132. endif
  133. config BT_LE_MAX_PERIODIC_SYNCS
  134. int "Maximum number of periodic advertising syncs"
  135. depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
  136. range 0 3
  137. default 1 if BT_LE_ENABLE_PERIODIC_ADV
  138. default 0
  139. help
  140. Set this option to set the upper limit for number of periodic sync
  141. connections. This should be less than maximum connections allowed by
  142. controller.
  143. config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
  144. int "Maximum number of periodic advertiser list"
  145. depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
  146. range 1 5
  147. default 5
  148. help
  149. Set this option to set the upper limit for number of periodic advertiser list.
  150. menu "Memory Settings"
  151. depends on !BT_NIMBLE_ENABLED
  152. config BT_LE_MSYS_1_BLOCK_COUNT
  153. int "MSYS_1 Block Count"
  154. default 12
  155. help
  156. MSYS is a system level mbuf registry. For prepare write & prepare
  157. responses MBUFs are allocated out of msys_1 pool. For NIMBLE_MESH
  158. enabled cases, this block count is increased by 8 than user defined
  159. count.
  160. config BT_LE_MSYS_1_BLOCK_SIZE
  161. int "MSYS_1 Block Size"
  162. default 256
  163. help
  164. Dynamic memory size of block 1
  165. config BT_LE_MSYS_2_BLOCK_COUNT
  166. int "MSYS_2 Block Count"
  167. default 24
  168. help
  169. Dynamic memory count
  170. config BT_LE_MSYS_2_BLOCK_SIZE
  171. int "MSYS_2 Block Size"
  172. default 320
  173. help
  174. Dynamic memory size of block 2
  175. config BT_LE_ACL_BUF_COUNT
  176. int "ACL Buffer count"
  177. default 10
  178. help
  179. The number of ACL data buffers.
  180. config BT_LE_ACL_BUF_SIZE
  181. int "ACL Buffer size"
  182. default 517
  183. help
  184. This is the maximum size of the data portion of HCI ACL data packets.
  185. It does not include the HCI data header (of 4 bytes)
  186. config BT_LE_HCI_EVT_BUF_SIZE
  187. int "HCI Event Buffer size"
  188. default 257 if BT_LE_EXT_ADV
  189. default 70
  190. help
  191. This is the size of each HCI event buffer in bytes. In case of
  192. extended advertising, packets can be fragmented. 257 bytes is the
  193. maximum size of a packet.
  194. config BT_LE_HCI_EVT_HI_BUF_COUNT
  195. int "High Priority HCI Event Buffer count"
  196. default 30
  197. help
  198. This is the high priority HCI events' buffer size. High-priority
  199. event buffers are for everything except advertising reports. If there
  200. are no free high-priority event buffers then host will try to allocate a
  201. low-priority buffer instead
  202. config BT_LE_HCI_EVT_LO_BUF_COUNT
  203. int "Low Priority HCI Event Buffer count"
  204. default 8
  205. help
  206. This is the low priority HCI events' buffer size. Low-priority event
  207. buffers are only used for advertising reports. If there are no free
  208. low-priority event buffers, then an incoming advertising report will
  209. get dropped
  210. endmenu
  211. config BT_LE_CONTROLLER_TASK_STACK_SIZE
  212. int "Controller task stack size"
  213. default 5120 if BLE_MESH
  214. default 4096
  215. help
  216. This configures stack size of NimBLE controller task
  217. config BT_LE_CONTROLLER_LOG_ENABLED
  218. bool "Controller log enable"
  219. default n
  220. help
  221. Enable controller log
  222. config BT_LE_CONTROLLER_LOG_CTRL_ENABLED
  223. bool "enable controller log module"
  224. depends on BT_LE_CONTROLLER_LOG_ENABLED
  225. default y
  226. help
  227. Enable controller log module
  228. config BT_LE_CONTROLLER_LOG_HCI_ENABLED
  229. bool "enable HCI log module"
  230. depends on BT_LE_CONTROLLER_LOG_ENABLED
  231. default y
  232. help
  233. Enable hci log module
  234. config BT_LE_CONTROLLER_LOG_DUMP_ONLY
  235. bool "Controller log dump mode only"
  236. depends on BT_LE_CONTROLLER_LOG_ENABLED
  237. default y
  238. help
  239. Only operate in dump mode
  240. config BT_LE_LL_RESOLV_LIST_SIZE
  241. int "BLE LL Resolving list size"
  242. range 1 5
  243. default 4
  244. help
  245. Configure the size of resolving list used in link layer.
  246. menuconfig BT_LE_SECURITY_ENABLE
  247. bool "Enable BLE SM feature"
  248. depends on !BT_NIMBLE_ENABLED
  249. default y
  250. help
  251. Enable BLE sm feature
  252. config BT_LE_SM_LEGACY
  253. bool "Security manager legacy pairing"
  254. depends on BT_LE_SECURITY_ENABLE
  255. default y
  256. help
  257. Enable security manager legacy pairing
  258. config BT_LE_SM_SC
  259. bool "Security manager secure connections (4.2)"
  260. depends on BT_LE_SECURITY_ENABLE
  261. default y
  262. help
  263. Enable security manager secure connections
  264. config BT_LE_SM_SC_DEBUG_KEYS
  265. bool "Use predefined public-private key pair"
  266. default n
  267. depends on BT_LE_SECURITY_ENABLE && BT_LE_SM_SC
  268. help
  269. If this option is enabled, SM uses predefined DH key pair as described
  270. in Core Specification, Vol. 3, Part H, 2.3.5.6.1. This allows to
  271. decrypt air traffic easily and thus should only be used for debugging.
  272. config BT_LE_LL_CFG_FEAT_LE_ENCRYPTION
  273. bool "Enable LE encryption"
  274. depends on BT_LE_SECURITY_ENABLE
  275. default y
  276. help
  277. Enable encryption connection
  278. config BT_LE_CRYPTO_STACK_MBEDTLS
  279. bool "Override TinyCrypt with mbedTLS for crypto computations"
  280. default y
  281. depends on !BT_NIMBLE_ENABLED
  282. select MBEDTLS_ECP_RESTARTABLE
  283. select MBEDTLS_CMAC_C
  284. help
  285. Enable this option to choose mbedTLS instead of TinyCrypt for crypto
  286. computations.
  287. config BT_LE_WHITELIST_SIZE
  288. int "BLE white list size"
  289. range 1 15
  290. default 12
  291. depends on !BT_NIMBLE_ENABLED
  292. help
  293. BLE list size
  294. config BT_LE_LL_DUP_SCAN_LIST_COUNT
  295. int "BLE duplicate scan list count"
  296. range 1 100
  297. default 20
  298. help
  299. config the max count of duplicate scan list
  300. config BT_LE_LL_SCA
  301. int "BLE Sleep clock accuracy"
  302. range 0 500
  303. default 60
  304. help
  305. Sleep clock accuracy of our device (in ppm)
  306. config BT_LE_MAX_CONNECTIONS
  307. int "Maximum number of concurrent connections"
  308. depends on !BT_NIMBLE_ENABLED
  309. range 1 2
  310. default 2
  311. help
  312. Defines maximum number of concurrent BLE connections. For ESP32, user
  313. is expected to configure BTDM_CTRL_BLE_MAX_CONN from controller menu
  314. along with this option. Similarly for ESP32-C3 or ESP32-S3, user is expected to
  315. configure BT_CTRL_BLE_MAX_ACT from controller menu.
  316. Each connection will take about 1k DRAM.
  317. choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
  318. prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
  319. default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
  320. depends on ESP_COEX_SW_COEXIST_ENABLE
  321. help
  322. When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
  323. better avoid dramatic performance deterioration of Wi-Fi.
  324. config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
  325. bool "Force Enable"
  326. help
  327. Always enable the limitation on max tx/rx time for Coded-PHY connection
  328. config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
  329. bool "Force Disable"
  330. help
  331. Disable the limitation on max tx/rx time for Coded-PHY connection
  332. endchoice
  333. config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
  334. int
  335. default 0 if !ESP_COEX_SW_COEXIST_ENABLE
  336. default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
  337. default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
  338. config BT_LE_SLEEP_ENABLE
  339. bool "Enable BLE sleep"
  340. default n
  341. help
  342. Enable BLE sleep
  343. config BT_LE_USE_ESP_TIMER
  344. bool "Use Esp Timer for callout"
  345. depends on !BT_NIMBLE_ENABLED
  346. default y
  347. help
  348. Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer
  349. config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  350. bool "BLE adv report flow control supported"
  351. default y
  352. help
  353. The function is mainly used to enable flow control for advertising reports. When it is enabled,
  354. advertising reports will be discarded by the controller if the number of unprocessed advertising
  355. reports exceeds the size of BLE adv report flow control.
  356. config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
  357. int "BLE adv report flow control number"
  358. depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  359. range 50 1000
  360. default 100
  361. help
  362. The number of unprocessed advertising report that bluetooth host can save.If you set
  363. `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
  364. If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
  365. lot of adv packets and this may cause system memory run out. For example, if you set
  366. it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
  367. `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
  368. packets as fast as possible, otherwise it will cause adv packets lost.
  369. config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
  370. int "BLE adv lost event threshold value"
  371. depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  372. range 1 1000
  373. default 20
  374. help
  375. When adv report flow control is enabled, The ADV lost event will be generated when the number
  376. of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
  377. If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
  378. may cause adv packets lost more.
  379. config BT_LE_RELEASE_IRAM_SUPPORTED
  380. bool
  381. default y