1# Bluetooth configuration options 2 3# Copyright (c) 2016 Intel Corporation 4# Copyright (c) 2021 Nordic Semiconductor ASA 5# SPDX-License-Identifier: Apache-2.0 6 7menuconfig BT 8 bool "Bluetooth" 9 # Some BT threads use co-op priorities to implement critical sections, 10 # will need some refactoring to work on SMP systems. 11 depends on !SMP 12 select NET_BUF 13 help 14 This option enables Bluetooth support. 15 16if BT 17 18choice BT_STACK_SELECTION 19 prompt "Bluetooth Stack Selection" 20 default BT_HCI 21 help 22 Select the Bluetooth stack to compile. 23 24config BT_HCI 25 bool "HCI-based" 26 help 27 HCI-based stack with optional host & controller parts and an 28 HCI driver in between. 29 30config BT_CUSTOM 31 bool "Custom" 32 help 33 Select a custom, non-HCI based stack. If you're not sure what 34 this is, you probably want the HCI-based stack instead. 35 36endchoice 37 38# The Bluetooth subsystem requires the system workqueue to execute at 39# a cooperative priority. 40config SYSTEM_WORKQUEUE_PRIORITY 41 range -256 -1 42 43if BT_HCI 44 45config BT_HCI_RAW 46 bool "RAW HCI access" 47 help 48 This option allows to access Bluetooth controller 49 from the application with the RAW HCI protocol. 50 51config BT_HCI_RAW_H4 52 bool "RAW HCI H:4 transport" 53 help 54 This option enables HCI RAW access to work over an H:4 55 transport, note that it still need to be selected at runtime. 56 57config BT_HCI_RAW_H4_ENABLE 58 bool "RAW HCI H:4 transport enable" 59 depends on BT_HCI_RAW_H4 60 help 61 This option enables use of H:4 transport for HCI RAW access at 62 build time. 63 64config BT_HCI_RAW_CMD_EXT 65 bool "RAW HCI Command Extension" 66 help 67 This option enables HCI RAW command extension so the driver can 68 register it own command table extension. 69 70config BT_PERIPHERAL 71 bool "Peripheral Role support" 72 select BT_BROADCASTER 73 select BT_CONN 74 default y if BT_HCI_RAW 75 help 76 Select this for LE Peripheral role support. 77 78config BT_CENTRAL 79 bool "Central Role support" 80 select BT_OBSERVER 81 select BT_CONN 82 default y if BT_HCI_RAW 83 help 84 Select this for LE Central role support. 85 86config BT_BROADCASTER 87 bool "Broadcaster Role support" 88 default y if !BT_OBSERVER 89 help 90 Select this for LE Broadcaster role support. 91 92config BT_OBSERVER 93 bool "Observer Role support" 94 help 95 Select this for LE Observer role support. 96 97rsource "Kconfig.adv" 98 99config BT_CONN 100 bool 101 102config BT_MAX_CONN 103 int "Maximum number of simultaneous connections" 104 depends on BT_CONN 105 range 1 250 106 default 2 if BT_MESH_GATT_CLIENT 107 default 1 108 help 109 Maximum number of simultaneous Bluetooth connections 110 supported. 111 112config BT_CONN_TX 113 bool 114 default BT_CONN || BT_ISO_TX 115 help 116 Hidden configuration that is true if ACL or broadcast ISO is enabled 117 118if BT_CONN 119config BT_HCI_ACL_FLOW_CONTROL 120 bool "Controller to Host ACL flow control support" 121 # Enable if building a Host-only build 122 default y if !HAS_BT_CTLR && !BT_STM32_IPM && !BT_ESP32 && !BT_STM32WBA 123 # Enable if building a Controller-only build 124 default y if BT_HCI_RAW 125 select POLL 126 help 127 Enable support for throttling ACL buffers from the controller 128 to the host. This is particularly useful when the host and 129 controller are on separate cores since it ensures that we do 130 not run out of incoming ACL buffers. 131 132config BT_REMOTE_VERSION 133 bool "Allow fetching of remote version" 134 # Enable if building a Controller-only build 135 default y if BT_HCI_RAW 136 help 137 Enable this to get access to the remote version in the Controller and 138 in the Host through bt_conn_get_remote_info(). The fields in question 139 can then be found in the bt_conn_remote_info struct. 140 141config BT_PHY_UPDATE 142 bool "PHY Update" 143 default y 144 depends on !HAS_BT_CTLR || BT_CTLR_PHY_UPDATE_SUPPORT 145 help 146 Enable support for Bluetooth 5.0 PHY Update Procedure. 147 148config BT_DATA_LEN_UPDATE 149 bool "Data Length Update" 150 default y if ((BT_BUF_ACL_TX_SIZE > 27) || (BT_BUF_ACL_RX_SIZE > 27)) 151 depends on !HAS_BT_CTLR || BT_CTLR_DATA_LEN_UPDATE_SUPPORT 152 help 153 Enable support for Bluetooth v4.2 LE Data Length Update procedure. 154 155config BT_PER_ADV_SYNC_TRANSFER_RECEIVER 156 bool "Periodic Advertising Sync Transfer receiver" 157 depends on BT_PER_ADV_SYNC && BT_CONN && (!HAS_BT_CTLR || BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT) 158 159config BT_PER_ADV_SYNC_TRANSFER_SENDER 160 bool "Periodic Advertising Sync Transfer sender" 161 depends on (BT_PER_ADV_SYNC || BT_PER_ADV) && BT_CONN && (!HAS_BT_CTLR || BT_CTLR_SYNC_TRANSFER_SENDER_SUPPORT) 162 163config BT_SCA_UPDATE 164 bool "Sleep Clock Accuracy Update" 165 default y if BT_ISO_PERIPHERAL || BT_ISO_CENTRAL 166 depends on !HAS_BT_CTLR || BT_CTLR_SCA_UPDATE_SUPPORT 167 help 168 Enable support for Bluetooth 5.1 Sleep Clock Accuracy Update Procedure 169 170config BT_TRANSMIT_POWER_CONTROL 171 bool "LE Power Control" 172 depends on !HAS_BT_CTLR || BT_CTLR_LE_POWER_CONTROL_SUPPORT 173 help 174 Enable support for LE Power Control Request feature that is defined in the 175 Bluetooth Core specification, Version 5.4 | Vol 6, Part B, Section 4.6.31. 176 177config BT_PATH_LOSS_MONITORING 178 bool "LE Path Loss Monitoring" 179 depends on !HAS_BT_CTLR || BT_CTLR_LE_PATH_LOSS_MONITORING_SUPPORT 180 help 181 Enable support for LE Path Loss Monitoring feature that is defined in the 182 Bluetooth Core specification, Version 5.4 | Vol 6, Part B, Section 4.6.32. 183 184config BT_SUBRATING 185 bool "LE Connection Subrating" 186 depends on !HAS_BT_CTLR || BT_CTLR_SUBRATING_SUPPORT 187 help 188 Enable support for LE Connection Subrating feature that is defined in the 189 Bluetooth Core specification, Version 5.4 | Vol 6, Part B, Section 4.6.35. 190 191config BT_CHANNEL_SOUNDING 192 bool "Channel Sounding [EXPERIMENTAL]" 193 select EXPERIMENTAL 194 depends on !HAS_BT_CTLR || BT_CTLR_CHANNEL_SOUNDING_SUPPORT 195 help 196 Enable support for Bluetooth 6.0 Channel Sounding feature. 197 198config BT_CHANNEL_SOUNDING_TEST 199 bool "Channel Sounding Test [EXPERIMENTAL]" 200 select EXPERIMENTAL 201 depends on BT_CHANNEL_SOUNDING 202 help 203 Enable support for Channel Sounding test mode. 204 205config BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE 206 int "Subevent result reassembly buffer size" 207 depends on BT_CHANNEL_SOUNDING 208 range 239 5600 209 default 5600 210 help 211 When the results for a CS subevent cannot fit into a single HCI event, 212 it will be split up into multiple events and consequently, reassembled into a 213 full CS subevent. This config sets the size of the reassembly buffer. 214 215config BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_CNT 216 int "Subevent result reassembly buffer count" 217 depends on BT_CHANNEL_SOUNDING 218 range 1 BT_MAX_CONN 219 default 1 220 help 221 Controls the number of the reassembly buffers for CS subevent 222 results. Each running CS procedure is allocated one buffer and the 223 number of concurrent CS procedures is limited by this value. 224 225endif # BT_CONN 226 227config BT_ISO 228 bool 229 230config BT_ISO_TX 231 bool 232 233config BT_ISO_RX 234 bool 235 236#TODO : Split between client(central) and server(peripheral) 237config BT_ISO_UNICAST 238 bool 239 depends on BT_CONN 240 select BT_ISO 241 select BT_ISO_TX 242 select BT_ISO_RX 243 help 244 This option enables support for Bluetooth Unicast 245 Isochronous channels. 246 247config BT_ISO_PERIPHERAL 248 bool "Bluetooth Isochronous Channel Unicast Peripheral Support" 249 depends on !HAS_BT_CTLR || BT_CTLR_PERIPHERAL_ISO_SUPPORT 250 depends on BT_PERIPHERAL 251 select BT_ISO_UNICAST 252 help 253 This option enables support for Bluetooth Unicast 254 Isochronous channels for the peripheral role. 255 256config BT_ISO_CENTRAL 257 bool "Bluetooth Isochronous Channel Unicast Central Support" 258 depends on !HAS_BT_CTLR || BT_CTLR_CENTRAL_ISO_SUPPORT 259 depends on BT_CENTRAL 260 select BT_ISO_UNICAST 261 help 262 This option enables support for Bluetooth Broadcast 263 Isochronous channels for the central role. 264 265config BT_ISO_BROADCAST 266 bool 267 select BT_ISO 268 select BT_EXT_ADV 269 270config BT_ISO_BROADCASTER 271 bool "Bluetooth Isochronous Broadcaster Support" 272 depends on !HAS_BT_CTLR || BT_CTLR_ADV_ISO_SUPPORT 273 select BT_ISO_BROADCAST 274 select BT_ISO_TX 275 select BT_BROADCASTER 276 select BT_PER_ADV 277 help 278 This option enables support for the Bluetooth Isochronous Broadcaster. 279 280config BT_ISO_SYNC_RECEIVER 281 bool "Bluetooth Isochronous Synchronized Receiver Support" 282 depends on !HAS_BT_CTLR || BT_CTLR_SYNC_ISO_SUPPORT 283 depends on BT_OBSERVER 284 select BT_ISO_BROADCAST 285 select BT_ISO_RX 286 select BT_PER_ADV_SYNC 287 help 288 This option enables support for the Bluetooth Isochronous 289 Synchronized Receiver. 290 291if BT_ISO 292 293config BT_ISO_MAX_CHAN 294 int "Maximum number of simultaneous ISO channels" 295 depends on BT_ISO 296 default BT_MAX_CONN if BT_CONN 297 default 1 298 range 1 64 299 help 300 Maximum number of simultaneous Bluetooth isochronous channels 301 supported. 302 303config BT_ISO_TX_BUF_COUNT 304 int "Number of Isochronous TX buffers" 305 default 1 306 range 1 $(UINT8_MAX) 307 help 308 Number of buffers available for outgoing Isochronous channel SDUs. 309 310config BT_ISO_TX_FRAG_COUNT 311 int "Number of ISO TX fragment buffers" 312 default 2 313 range 0 $(UINT8_MAX) 314 help 315 Number of buffers available for fragments of TX buffers. Warning: 316 setting this to 0 means that the application must ensure that 317 queued TX buffers never need to be fragmented, i.e. that the 318 controller's buffer size is large enough. If this is not ensured, 319 and there are no dedicated fragment buffers, a deadlock may occur. 320 In most cases the default value of 2 is a safe bet. 321 322config BT_ISO_TX_MTU 323 int "Maximum supported MTU for Isochronous TX buffers" 324 range 1 4095 325 default 247 326 help 327 Maximum MTU for Isochronous channels TX buffers. 328 This is the actual data payload. It doesn't include the optional 329 HCI ISO Data packet fields (e.g. `struct bt_hci_iso_sdu_ts_hdr`). 330 Set this value to 247 to fit 247 bytes of data within a single 331 HCI ISO Data packet with Data_Total_Length of 255, utilizing 332 timestamps. 333 334config BT_ISO_RX_BUF_COUNT 335 int "Number of Isochronous RX buffers" 336 default 1 337 range 1 $(UINT8_MAX) 338 help 339 Number of buffers available for incoming Isochronous channel SDUs. 340 341config BT_ISO_RX_MTU 342 int "Maximum supported MTU for Isochronous RX buffers" 343 default 251 344 range 23 4095 345 help 346 Maximum MTU for Isochronous channels RX buffers. 347 This is the actual data payload. It doesn't include the optional 348 HCI ISO Data packet fields (e.g. `struct bt_hci_iso_sdu_ts_hdr`) 349 350config BT_ISO_TEST_PARAMS 351 bool "ISO test parameters support" 352 help 353 Enabling advanced ISO parameters will allow the use of the ISO test 354 parameters for creating a CIG or a BIG. These test parameters were 355 intended for testing, but can be used to allow the host to set more 356 settings that are otherwise usually controlled by the controller. 357 358if BT_ISO_UNICAST 359 360config BT_ISO_MAX_CIG 361 int "Maximum number of Connected Isochronous Groups (CIGs) to support" 362 default 1 363 help 364 Maximum number of CIGs that are supported by the host. A CIG can be 365 used for either transmitting or receiving. 366 367endif # BT_ISO_UNICAST 368 369if BT_ISO_BROADCAST 370 371config BT_ISO_MAX_BIG 372 int "Maximum number of Broadcast Isochronous Groups (BIGs) to support" 373 default 1 374 range 1 BT_EXT_ADV_MAX_ADV_SET 375 help 376 Maximum number of BIGs that are supported by the host. A BIG can be 377 used for either transmitting or receiving, but not at the same time. 378 379endif # BT_ISO_BROADCAST 380endif # BT_ISO 381 382rsource "common/Kconfig" 383rsource "host/Kconfig" 384rsource "controller/Kconfig" 385rsource "crypto/Kconfig" 386rsource "lib/Kconfig" 387rsource "Kconfig.logging" 388 389config BT_SHELL 390 bool "Bluetooth shell" 391 select SHELL 392 select BT_PRIVATE_SHELL 393 select BT_TICKER_NEXT_SLOT_GET if BT_LL_SW_SPLIT 394 help 395 Activate shell module that provides Bluetooth commands to the 396 console. 397 398endif # BT_HCI 399 400config BT_COMPANY_ID 401 hex "Company Id" 402 default 0x05F1 403 range 0x0000 0xFFFF 404 help 405 Set the Bluetooth Company Identifier for this device. The Linux 406 Foundation's Company Identifier (0x05F1) is the default value for 407 this option although silicon vendors and hardware manufacturers 408 can set their own. Note that the controller's Company Identifier is 409 controlled by BT_CTLR_COMPANY_ID. The full list of Bluetooth 410 Company Identifiers can be found here: 411 https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers 412 413endif # BT 414