Kconfig.in 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. choice BT_NIMBLE_MEM_ALLOC_MODE
  2. prompt "Memory allocation strategy"
  3. default BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
  4. help
  5. Allocation strategy for NimBLE host stack, essentially provides ability to
  6. allocate all required dynamic allocations from,
  7. - Internal DRAM memory only
  8. - External SPIRAM memory only
  9. - Either internal or external memory based on default malloc()
  10. behavior in ESP-IDF
  11. - Internal IRAM memory wherever applicable else internal DRAM
  12. config BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
  13. bool "Internal memory"
  14. config BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL
  15. bool "External SPIRAM"
  16. depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
  17. config BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT
  18. bool "Default alloc mode"
  19. config BT_NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT
  20. bool "Internal IRAM"
  21. depends on ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
  22. help
  23. Allows to use IRAM memory region as 8bit accessible region.
  24. Every unaligned (8bit or 16bit) access will result in an exception
  25. and incur penalty of certain clock cycles per unaligned read/write.
  26. endchoice #BT_NIMBLE_MEM_ALLOC_MODE
  27. choice BT_NIMBLE_LOG_LEVEL
  28. prompt "NimBLE Host log verbosity"
  29. depends on BT_NIMBLE_ENABLED
  30. default BT_NIMBLE_LOG_LEVEL_INFO
  31. help
  32. Select NimBLE log level. Please make a note that the selected NimBLE log
  33. verbosity can not exceed the level set in "Component config --> Log output
  34. --> Default log verbosity".
  35. config BT_NIMBLE_LOG_LEVEL_NONE
  36. bool "No logs"
  37. config BT_NIMBLE_LOG_LEVEL_ERROR
  38. bool "Error logs"
  39. config BT_NIMBLE_LOG_LEVEL_WARNING
  40. bool "Warning logs"
  41. config BT_NIMBLE_LOG_LEVEL_INFO
  42. bool "Info logs"
  43. config BT_NIMBLE_LOG_LEVEL_DEBUG
  44. bool "Debug logs"
  45. endchoice #BT_NIMBLE_LOG_LEVEL
  46. config BT_NIMBLE_LOG_LEVEL
  47. int
  48. default 0 if BT_NIMBLE_LOG_LEVEL_DEBUG
  49. default 1 if BT_NIMBLE_LOG_LEVEL_INFO
  50. default 2 if BT_NIMBLE_LOG_LEVEL_WARNING
  51. default 3 if BT_NIMBLE_LOG_LEVEL_ERROR
  52. default 4 if BT_NIMBLE_LOG_LEVEL_NONE
  53. config BT_NIMBLE_MAX_CONNECTIONS
  54. int "Maximum number of concurrent connections"
  55. range 1 8 if (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
  56. range 1 9 if IDF_TARGET_ESP32
  57. default 3
  58. depends on BT_NIMBLE_ENABLED
  59. help
  60. Defines maximum number of concurrent BLE connections. For ESP32, user
  61. is expected to configure BTDM_CTRL_BLE_MAX_CONN from controller menu
  62. along with this option. Similarly for ESP32-C3 or ESP32-S3, user is expected to
  63. configure BT_CTRL_BLE_MAX_ACT from controller menu.
  64. config BT_NIMBLE_MAX_BONDS
  65. int "Maximum number of bonds to save across reboots"
  66. default 3
  67. depends on BT_NIMBLE_ENABLED
  68. help
  69. Defines maximum number of bonds to save for peer security and our security
  70. config BT_NIMBLE_MAX_CCCDS
  71. int "Maximum number of CCC descriptors to save across reboots"
  72. default 8
  73. depends on BT_NIMBLE_ENABLED
  74. help
  75. Defines maximum number of CCC descriptors to save
  76. config BT_NIMBLE_L2CAP_COC_MAX_NUM
  77. int "Maximum number of connection oriented channels"
  78. range 0 9
  79. depends on BT_NIMBLE_ENABLED
  80. default 0
  81. help
  82. Defines maximum number of BLE Connection Oriented Channels. When set to (0), BLE COC is not compiled in
  83. choice BT_NIMBLE_PINNED_TO_CORE_CHOICE
  84. prompt "The CPU core on which NimBLE host will run"
  85. depends on BT_NIMBLE_ENABLED && !FREERTOS_UNICORE
  86. help
  87. The CPU core on which NimBLE host will run. You can choose Core 0 or Core 1.
  88. Cannot specify no-affinity
  89. config BT_NIMBLE_PINNED_TO_CORE_0
  90. bool "Core 0 (PRO CPU)"
  91. config BT_NIMBLE_PINNED_TO_CORE_1
  92. bool "Core 1 (APP CPU)"
  93. depends on !FREERTOS_UNICORE
  94. endchoice
  95. config BT_NIMBLE_PINNED_TO_CORE
  96. int
  97. depends on BT_NIMBLE_ENABLED
  98. default 0 if BT_NIMBLE_PINNED_TO_CORE_0
  99. default 1 if BT_NIMBLE_PINNED_TO_CORE_1
  100. default 0
  101. config BT_NIMBLE_TASK_STACK_SIZE
  102. int "NimBLE Host task stack size"
  103. depends on BT_NIMBLE_ENABLED
  104. default 5120 if BLE_MESH
  105. default 4096
  106. help
  107. This configures stack size of NimBLE host task
  108. config BT_NIMBLE_ROLE_CENTRAL
  109. bool "Enable BLE Central role"
  110. depends on BT_NIMBLE_ENABLED
  111. default y
  112. config BT_NIMBLE_ROLE_PERIPHERAL
  113. bool "Enable BLE Peripheral role"
  114. depends on BT_NIMBLE_ENABLED
  115. default y
  116. config BT_NIMBLE_ROLE_BROADCASTER
  117. bool "Enable BLE Broadcaster role"
  118. depends on BT_NIMBLE_ENABLED
  119. default y
  120. config BT_NIMBLE_ROLE_OBSERVER
  121. bool "Enable BLE Observer role"
  122. depends on BT_NIMBLE_ENABLED
  123. default y
  124. config BT_NIMBLE_NVS_PERSIST
  125. bool "Persist the BLE Bonding keys in NVS"
  126. depends on BT_NIMBLE_ENABLED
  127. default y
  128. help
  129. Enable this flag to make bonding persistent across device reboots
  130. config BT_NIMBLE_SM_LEGACY
  131. bool "Security manager legacy pairing"
  132. depends on BT_NIMBLE_ENABLED
  133. default y
  134. help
  135. Enable security manager legacy pairing
  136. config BT_NIMBLE_SM_SC
  137. bool "Security manager secure connections (4.2)"
  138. depends on BT_NIMBLE_ENABLED
  139. default y
  140. help
  141. Enable security manager secure connections
  142. config BT_NIMBLE_DEBUG
  143. bool "Enable extra runtime asserts and host debugging"
  144. default n
  145. depends on BT_NIMBLE_ENABLED
  146. help
  147. This enables extra runtime asserts and host debugging
  148. config BT_NIMBLE_SM_SC_DEBUG_KEYS
  149. bool "Use predefined public-private key pair"
  150. default n
  151. depends on BT_NIMBLE_SM_SC
  152. help
  153. If this option is enabled, SM uses predefined DH key pair as described
  154. in Core Specification, Vol. 3, Part H, 2.3.5.6.1. This allows to
  155. decrypt air traffic easily and thus should only be used for debugging.
  156. config BT_NIMBLE_SVC_GAP_DEVICE_NAME
  157. string "BLE GAP default device name"
  158. depends on BT_NIMBLE_ENABLED
  159. default "nimble"
  160. help
  161. The Device Name characteristic shall contain the name of the device as an UTF-8 string.
  162. This name can be changed by using API ble_svc_gap_device_name_set()
  163. config BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN
  164. int "Maximum length of BLE device name in octets"
  165. depends on BT_NIMBLE_ENABLED
  166. default 31
  167. help
  168. Device Name characteristic value shall be 0 to 248 octets in length
  169. config BT_NIMBLE_ATT_PREFERRED_MTU
  170. int "Preferred MTU size in octets"
  171. depends on BT_NIMBLE_ENABLED
  172. default 256
  173. help
  174. This is the default value of ATT MTU indicated by the device during an ATT MTU exchange.
  175. This value can be changed using API ble_att_set_preferred_mtu()
  176. config BT_NIMBLE_SVC_GAP_APPEARANCE
  177. hex "External appearance of the device"
  178. depends on BT_NIMBLE_ENABLED
  179. default 0
  180. help
  181. Standard BLE GAP Appearance value in HEX format e.g. 0x02C0
  182. config BT_NIMBLE_ACL_BUF_COUNT
  183. int "ACL Buffer count"
  184. depends on BT_NIMBLE_ENABLED
  185. default 20
  186. help
  187. The number of ACL data buffers.
  188. config BT_NIMBLE_ACL_BUF_SIZE
  189. int "ACL Buffer size"
  190. depends on BT_NIMBLE_ENABLED
  191. default 255
  192. help
  193. This is the maximum size of the data portion of HCI ACL data packets.
  194. It does not include the HCI data header (of 4 bytes)
  195. config BT_NIMBLE_HCI_EVT_BUF_SIZE
  196. int "HCI Event Buffer size"
  197. depends on BT_NIMBLE_ENABLED
  198. default 257 if BT_NIMBLE_EXT_ADV
  199. default 70
  200. help
  201. This is the size of each HCI event buffer in bytes. In case of
  202. extended advertising, packets can be fragmented. 257 bytes is the
  203. maximum size of a packet.
  204. config BT_NIMBLE_HCI_EVT_HI_BUF_COUNT
  205. int "High Priority HCI Event Buffer count"
  206. depends on BT_NIMBLE_ENABLED
  207. default 30
  208. help
  209. This is the high priority HCI events' buffer size. High-priority
  210. event buffers are for everything except advertising reports. If there
  211. are no free high-priority event buffers then host will try to allocate a
  212. low-priority buffer instead
  213. config BT_NIMBLE_HCI_EVT_LO_BUF_COUNT
  214. int "Low Priority HCI Event Buffer count"
  215. depends on BT_NIMBLE_ENABLED
  216. default 8
  217. help
  218. This is the low priority HCI events' buffer size. Low-priority event
  219. buffers are only used for advertising reports. If there are no free
  220. low-priority event buffers, then an incoming advertising report will
  221. get dropped
  222. config BT_NIMBLE_MSYS1_BLOCK_COUNT
  223. int "MSYS_1 Block Count"
  224. depends on BT_NIMBLE_ENABLED
  225. default 12
  226. help
  227. MSYS is a system level mbuf registry. For prepare write & prepare
  228. responses MBUFs are allocated out of msys_1 pool. For NIMBLE_MESH
  229. enabled cases, this block count is increased by 8 than user defined
  230. count.
  231. config BT_NIMBLE_HS_FLOW_CTRL
  232. bool "Enable Host Flow control"
  233. depends on BT_NIMBLE_ENABLED
  234. default n if BT_SOC_SUPPORT_5_0
  235. default y
  236. help
  237. Enable Host Flow control
  238. config BT_NIMBLE_HS_FLOW_CTRL_ITVL
  239. int "Host Flow control interval"
  240. depends on BT_NIMBLE_HS_FLOW_CTRL
  241. default 1000
  242. help
  243. Host flow control interval in msecs
  244. config BT_NIMBLE_HS_FLOW_CTRL_THRESH
  245. int "Host Flow control threshold"
  246. depends on BT_NIMBLE_HS_FLOW_CTRL
  247. default 2
  248. help
  249. Host flow control threshold, if the number of free buffers are at or
  250. below this threshold, send an immediate number-of-completed-packets
  251. event
  252. config BT_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT
  253. bool "Host Flow control on disconnect"
  254. depends on BT_NIMBLE_HS_FLOW_CTRL
  255. default y
  256. help
  257. Enable this option to send number-of-completed-packets event to
  258. controller after disconnection
  259. config BT_NIMBLE_RPA_TIMEOUT
  260. int "RPA timeout in seconds"
  261. range 1 41400
  262. depends on BT_NIMBLE_ENABLED
  263. default 900
  264. help
  265. Time interval between RPA address change. This is applicable in case of
  266. Host based RPA
  267. menuconfig BT_NIMBLE_MESH
  268. bool "Enable BLE mesh functionality"
  269. select BT_NIMBLE_SM_SC
  270. depends on BT_NIMBLE_ENABLED
  271. default n
  272. help
  273. Enable BLE Mesh functionality
  274. config BT_NIMBLE_MESH_PROXY
  275. bool "Enable mesh proxy functionality"
  276. default n
  277. depends on BT_NIMBLE_MESH
  278. help
  279. Enable proxy. This is automatically set whenever NIMBLE_MESH_PB_GATT or
  280. NIMBLE_MESH_GATT_PROXY is set
  281. config BT_NIMBLE_MESH_PROV
  282. bool "Enable BLE mesh provisioning"
  283. default y
  284. depends on BT_NIMBLE_MESH
  285. help
  286. Enable mesh provisioning
  287. config BT_NIMBLE_MESH_PB_ADV
  288. bool "Enable mesh provisioning over advertising bearer"
  289. default y
  290. depends on BT_NIMBLE_MESH_PROV
  291. help
  292. Enable this option to allow the device to be provisioned over
  293. the advertising bearer
  294. config BT_NIMBLE_MESH_PB_GATT
  295. bool "Enable mesh provisioning over GATT bearer"
  296. default y
  297. select BT_NIMBLE_MESH_PROXY
  298. depends on BT_NIMBLE_MESH_PROV
  299. help
  300. Enable this option to allow the device to be provisioned over the GATT
  301. bearer
  302. config BT_NIMBLE_MESH_GATT_PROXY
  303. bool "Enable GATT Proxy functionality"
  304. default y
  305. select BT_NIMBLE_MESH_PROXY
  306. depends on BT_NIMBLE_MESH
  307. help
  308. This option enables support for the Mesh GATT Proxy Service,
  309. i.e. the ability to act as a proxy between a Mesh GATT Client
  310. and a Mesh network
  311. config BT_NIMBLE_MESH_RELAY
  312. bool "Enable mesh relay functionality"
  313. default n
  314. depends on BT_NIMBLE_MESH
  315. help
  316. Support for acting as a Mesh Relay Node
  317. config BT_NIMBLE_MESH_LOW_POWER
  318. bool "Enable mesh low power mode"
  319. default n
  320. depends on BT_NIMBLE_MESH
  321. help
  322. Enable this option to be able to act as a Low Power Node
  323. config BT_NIMBLE_MESH_FRIEND
  324. bool "Enable mesh friend functionality"
  325. default n
  326. depends on BT_NIMBLE_MESH
  327. help
  328. Enable this option to be able to act as a Friend Node
  329. config BT_NIMBLE_MESH_DEVICE_NAME
  330. string "Set mesh device name"
  331. default "nimble-mesh-node"
  332. depends on BT_NIMBLE_MESH
  333. help
  334. This value defines Bluetooth Mesh device/node name
  335. config BT_NIMBLE_MESH_NODE_COUNT
  336. int "Set mesh node count"
  337. default 1
  338. depends on BT_NIMBLE_MESH
  339. help
  340. Defines mesh node count.
  341. config BT_NIMBLE_MESH_PROVISIONER
  342. bool "Enable BLE mesh provisioner"
  343. default 0
  344. depends on BT_NIMBLE_MESH
  345. help
  346. Enable mesh provisioner.
  347. config BT_NIMBLE_CRYPTO_STACK_MBEDTLS
  348. bool "Override TinyCrypt with mbedTLS for crypto computations"
  349. default y
  350. depends on BT_NIMBLE_ENABLED
  351. select MBEDTLS_ECP_RESTARTABLE
  352. select MBEDTLS_CMAC_C
  353. help
  354. Enable this option to choose mbedTLS instead of TinyCrypt for crypto
  355. computations.
  356. config BT_NIMBLE_HS_STOP_TIMEOUT_MS
  357. int "BLE host stop timeout in msec"
  358. default 2000
  359. depends on BT_NIMBLE_ENABLED
  360. help
  361. BLE Host stop procedure timeout in milliseconds.
  362. config BT_NIMBLE_HOST_BASED_PRIVACY
  363. bool "Enable host based privacy for random address."
  364. default n
  365. depends on BT_NIMBLE_ENABLED && !IDF_TARGET_ESP32
  366. help
  367. Use this option to do host based Random Private Address resolution.
  368. If this option is disabled then controller based privacy is used.
  369. config BT_NIMBLE_ENABLE_CONN_REATTEMPT
  370. bool "Enable connection reattempts on connection establishment error"
  371. default y if (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
  372. default n if IDF_TARGET_ESP32
  373. help
  374. Enable to make the NimBLE host to reattempt GAP connection on connection
  375. establishment failure.
  376. config BT_NIMBLE_MAX_CONN_REATTEMPT
  377. int "Maximum number connection reattempts"
  378. range 1 7
  379. default 3
  380. depends on BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLE_CONN_REATTEMPT
  381. help
  382. Defines maximum number of connection reattempts.
  383. config BT_NIMBLE_EXT_ADV
  384. bool "Enable extended advertising."
  385. default n
  386. depends on BT_NIMBLE_ENABLED && BT_SOC_SUPPORT_5_0
  387. help
  388. Enable this option to do extended advertising. Extended advertising
  389. will be supported from BLE 5.0 onwards.
  390. config BT_NIMBLE_MAX_EXT_ADV_INSTANCES
  391. int "Maximum number of extended advertising instances."
  392. range 0 4
  393. default 1 if BT_NIMBLE_EXT_ADV
  394. default 0
  395. depends on BT_NIMBLE_EXT_ADV
  396. help
  397. Change this option to set maximum number of extended advertising
  398. instances. Minimum there is always one instance of
  399. advertising. Enter how many more advertising instances you
  400. want.
  401. config BT_NIMBLE_MAX_EXT_ADV_DATA_LEN
  402. int "Maximum length of the advertising data."
  403. range 0 1650
  404. default 1650 if BT_NIMBLE_EXT_ADV
  405. default 0
  406. depends on BT_NIMBLE_EXT_ADV
  407. help
  408. Defines size of extended advertising data. Size should not increase
  409. 1650.
  410. config BT_NIMBLE_ENABLE_PERIODIC_ADV
  411. bool "Enable periodic advertisement."
  412. default y
  413. depends on BT_NIMBLE_EXT_ADV
  414. help
  415. Enable this option to start periodic advertisement.
  416. config BT_NIMBLE_MAX_PERIODIC_SYNCS
  417. int "Maximum number of periodic advertising syncs."
  418. default 1 if BT_NIMBLE_ENABLE_PERIODIC_ADV
  419. default 0
  420. depends on BT_NIMBLE_ENABLE_PERIODIC_ADV
  421. range 1 8
  422. help
  423. Set this option to set the upper limit for number of periodic sync
  424. connections. This should be less than maximum connections allowed by
  425. controller.
  426. config BT_NIMBLE_BLUFI_ENABLE
  427. bool "Enable blufi functionality"
  428. depends on BT_NIMBLE_ENABLED
  429. default n
  430. help
  431. Set this option to enable blufi functionality.
  432. config BT_NIMBLE_USE_ESP_TIMER
  433. bool "Enable Esp Timer for Nimble"
  434. default y
  435. help
  436. Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer