Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | # Bluetooth common configuration options # Copyright (c) 2017 Nordic Semiconductor ASA # Copyright (c) 2016 Intel Corporation # SPDX-License-Identifier: Apache-2.0 menu "Bluetooth buffer configuration" config BT_BUF_ACL_TX_SIZE int "Maximum supported ACL size for outgoing data" range 27 65535 default 27 help Maximum supported ACL size of data packets sent from the Host to the Controller. This value does not include the HCI ACL header. The Host will segment the data transmitted to the Controller so that packets sent to the Controller will contain data up to this size. In a combined build this value will be set in both the Host and the Controller. In a Host-only build the Host will read the maximum ACL size supported by the Controller and use the smallest value supported by both the Host and the Controller. The Host supports sending of larger L2CAP PDUs than the ACL size and will fragment L2CAP PDUs into ACL data packets. The Controller will return this value in the HCI LE Read Buffer Size command response. If this size if greater than effective Link Layer transmission size then the Controller will perform fragmentation before transmitting the packet(s) on air. If this value is less than the effective Link Layer transmission size then this will restrict the maximum Link Layer transmission size. config BT_BUF_ACL_TX_COUNT int "Number of outgoing ACL data buffers" default 7 if BT_HCI_RAW default 3 range 1 255 help Number of outgoing ACL data buffers sent from the Host to the Controller. This determines the maximum amount of data packets the Host can have queued in the Controller before waiting for the to notify the Host that more packets can be queued with the Number of Completed Packets event. The buffers are shared between all of the connections and the Host determines how to divide the buffers between the connections. The Controller will return this value in the HCI LE Read Buffer Size command response. config BT_BUF_ACL_RX_SIZE int "Maximum supported ACL size for incoming data" default 200 if BT_BREDR # Mesh Proxy Recommended: 64 Pkey + 2 Bytes Mesh header. # Overhead: ATT Write command Header (3) in an L2CAP PDU (4). default 73 if BT_MESH_GATT default 70 if BT_EATT default 69 if BT_SMP default 27 range 70 65535 if BT_EATT range 69 65535 if BT_SMP range 27 65535 help Maximum support ACL size of data packets sent from the Controller to the Host. This value does not include the HCI ACL header. In a combined Host and Controller build the buffer sizes in both the Host and the Controller will use this value for buffer sizes, and therefore Controller to Host flow Controller is not needed. In a Host only build with Controller to Host flow control enabled the Host will inform the Controller about the maximum ACL data size it can send by setting this value in the Host Buffer Size command. If Controller to Host flow control is not enabled then the Controller can assume the Host has infinite buffer size so this value should then be set to something that is guaranteed the Controller will not exceed or the data packets will be dropped. In a Controller only build this will determine the maximum ACL size that the Controller will send to the Host. The Host supports reassembling of L2CAP PDUs from ACL data packets, but the maximum supported L2CAP PDU size is limited by the maximum supported ACL size. This means the maximum L2CAP PDU MTU is restricted by the maximum ACL size subtracting the 4 byte header of an L2CAP PDU. When using L2CAP Connection oriented Channels without segmentation then the L2CAP SDU MTU is also restricted by the maximum ACL size subtracting the 4 Byte header of an L2CAP PDU plus the 2 byte header of an L2CAP SDU. With Enhanced ATT enabled the minimum of 70 is needed to support the minimum ATT_MTU of 64 octets in an L2CAP SDU without segmentation. With SMP LE Secure Connections enabled the minimum of 69 is needed to support the minimum SMP MTU of 65 octets (public key + opcode) in an L2CAP PDU. An L2CAP PDU is also referred to as an L2CAP basic frame or B-frame. An L2CAP SDU is also referred to as an L2CAP Credit-based frame or K-frame. config BT_BUF_ACL_RX_COUNT int "Number of incoming ACL data buffers" default NET_BUF_RX_COUNT if NET_L2_BT default 3 if BT_RECV_BLOCKING default 6 range 1 64 help Number or incoming ACL data buffers sent from the Controller to the Host. In a combined Host and Controller build the buffers are shared and therefore Controller to Host flow control is not needed. In a Host only build with Controller to Host flow control enabled the Host will inform the Controller about the maximum number of buffers by setting this value in the Host Buffer Size command. When Controller to Host flow control is not enabled the Controller can assume that the Host has infinite amount of buffers. config BT_BUF_EVT_RX_SIZE int "Maximum supported HCI Event buffer length" default 255 if (BT_EXT_ADV && BT_OBSERVER) || BT_PER_ADV_SYNC || BT_DF_CONNECTION_CTE_RX # LE Read Supported Commands command complete event. default 68 range 68 255 help Maximum supported HCI event buffer size. This value does not include the HCI Event header. This value is used by both the Host and the Controller for buffer sizes that include HCI events. It should be set according to the expected HCI events that can be generated from the configuration. If the subset of possible HCI events is unknown, this should be set to the maximum of 255. config BT_BUF_EVT_RX_COUNT int "Number of HCI Event buffers" default 3 if BT_RECV_BLOCKING default 20 if (BT_MESH && !(BT_BUF_EVT_DISCARDABLE_COUNT > 0)) default 10 range 2 255 help Number of buffers available for incoming HCI events from the Controller. config BT_BUF_EVT_DISCARDABLE_SIZE int "Maximum supported discardable HCI Event buffer length" range 43 255 if !BT_EXT_ADV range 58 255 if BT_EXT_ADV # LE Extended Advertising Report event default 255 if BT_BREDR # Le Advertising Report event default 43 if !BT_EXT_ADV default 58 if BT_EXT_ADV help Maximum support discardable HCI event size of buffers in the separate discardable event buffer pool. This value does not include the HCI Event header. The minimum size is set based on the Advertising Report. Setting the buffer size different than BT_BUF_EVT_RX_SIZE can save memory. config BT_BUF_EVT_DISCARDABLE_COUNT int "Number of discardable HCI Event buffers" range 1 255 default 20 if BT_MESH default 3 depends on !BT_HCI_RAW help Number of buffers in a separate buffer pool for events which the HCI driver considers discardable. Examples of such events could be e.g. Advertising Reports. The benefit of having such a pool is that the if there is a heavy inflow of such events it will not cause the allocation for other critical events to block and may even eliminate deadlocks in some cases. config BT_BUF_CMD_TX_SIZE int "Maximum support HCI Command buffer length" # LE Set Extended Advertising Data command default 255 if (BT_EXT_ADV || BT_BREDR) # LE Set Connection CTE Receive Parameters. Value required to store max allowed number # of antenna ids for platforms other than Nordic. default 83 if (!BT_EXT_ADV && !BT_BREDR && BT_CTLR_DF && BT_CTLR_DF_CONN_CTE_REQ && !SOC_COMPATIBLE_NRF) # LE Generate DHKey v2 command default 65 range 65 255 help Maximum data size for each HCI Command buffer. This value does not include the HCI Command header. This value is used by both the Host and the Controller for buffer sizes that include HCI commands. It should be set according to the expected HCI commands that can be sent from the configuration. If the subset of possible HCI commands is unknown, this should be set to the maximum of 255. config BT_BUF_CMD_TX_COUNT int "Number of HCI command buffers" default 2 range 2 64 help Number of buffers available for outgoing HCI commands from the Host. endmenu config BT_HAS_HCI_VS bool help This option is set by the Bluetooth controller to indicate support for the Zephyr HCI Vendor-Specific Commands and Event. config BT_HCI_VS bool "Zephyr HCI Vendor-Specific Commands" depends on BT_HAS_HCI_VS || !BT_CTLR default y if BT_HAS_HCI_VS help Enable support for the Zephyr HCI Vendor-Specific Commands in the Host and/or Controller. This enables Set Version Information, Supported Commands, Supported Features vendor commands. config BT_HCI_VS_EXT bool "Zephyr HCI Vendor-Specific Extensions" depends on BT_HCI_VS default y help Enable support for the Zephyr HCI Vendor-Specific Extensions in the Host and/or Controller. This enables Write BD_ADDR, Read Build Info, Read Static Addresses and Read Key Hierarchy Roots vendor commands. config BT_HCI_VS_EVT bool "Zephyr HCI Vendor-Specific Events" depends on BT_HCI_VS_EXT help Enable support for the Zephyr HCI Vendor-Specific Events in the Host and/or Controller. config BT_HCI_VS_FATAL_ERROR bool "Allow vendor specific HCI event Zephyr Fatal Error" depends on BT_HCI_VS_EXT help Enable emiting HCI Vendor-Specific events for system and Controller errors that are unrecoverable. config BT_HCI_VS_EXT_DETECT bool "Use heuristics to guess HCI vendor extensions support in advance" depends on BT_HCI_VS_EXT && !BT_CTLR default y if BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3 || BOARD_NATIVE_POSIX help Use some heuristics to try to guess in advance whether the controller supports the HCI vendor extensions in advance, in order to prevent sending vendor commands to controller which may interpret them in completely different ways. config BT_HCI_MESH_EXT bool "Mesh HCI Command support" depends on BT_BROADCASTER && BT_OBSERVER && !BT_LL_SW_SPLIT help Enable support for the Bluetooth mesh HCI Commands. config BT_WAIT_NOP bool "Wait for \"NOP\" Command Complete event during init" help Emit a Command Complete event from the Controller (and wait for it from the Host) for the NOP opcode to indicate that the Controller is ready to receive commands. config BT_RPA bool select TINYCRYPT select TINYCRYPT_AES config BT_ASSERT bool "Custom Bluetooth assert implementation" default y help Use a custom Bluetooth assert implementation instead of the kernel-wide __ASSERT() when CONFIG_ASSERT is disabled. if BT_ASSERT config BT_ASSERT_VERBOSE bool "Print out an assert string when using BT_ASSERT" default y help When CONFIG_BT_ASSERT is enabled, this option turns on printing the cause of the assert to the console using printk(). config BT_ASSERT_PANIC bool "Use k_panic() instead of k_oops()" help When CONFIG_BT_ASSERT is enabled, this option makes the code call k_panic() instead of k_oops() when an assertion is triggered. endif # BT_ASSERT config BT_DEBUG # Hidden option to make the conditions more intuitive bool config BT_MONITOR bool choice BT_DEBUG_TYPE prompt "Bluetooth debug type" default BT_DEBUG_NONE config BT_DEBUG_NONE bool "No debug log" help Select this to disable all Bluetooth debug logs. config BT_DEBUG_LOG bool "Normal printf-style to console" select BT_DEBUG select LOG imply LOG_FUNC_NAME_PREFIX_INF imply LOG_FUNC_NAME_PREFIX_WRN imply LOG_FUNC_NAME_PREFIX_ERR help This option enables Bluetooth debug going to standard serial console. config BT_DEBUG_MONITOR_UART bool "Monitor protocol over UART" select BT_DEBUG select LOG select CONSOLE_HAS_DRIVER select BT_MONITOR help Use a custom logging protocol over the console UART instead of plain-text output. Requires a special application on the host side that can decode this protocol. Currently the 'btmon' tool from BlueZ is capable of doing this. If the target board has two or more external UARTs it is possible to keep using UART_CONSOLE together with this option, however if there is only a single external UART then UART_CONSOLE needs to be disabled (in which case printk/printf will get encoded into the monitor protocol). config BT_DEBUG_MONITOR_RTT bool "Monitor protocol over RTT" depends on USE_SEGGER_RTT depends on SEGGER_RTT_MAX_NUM_UP_BUFFERS >= 2 select BT_DEBUG select LOG select CONSOLE_HAS_DRIVER select BT_MONITOR help Use a custom logging protocol over the RTT buffer instead of plain-text output. Requires a special application on the host side that can decode this protocol. Currently the 'btmon' tool from BlueZ is capable of doing this. if BT_DEBUG_MONITOR_RTT config BT_DEBUG_MONITOR_RTT_BUFFER int "Buffer number used for custom logger output." range 1 SEGGER_RTT_MAX_NUM_UP_BUFFERS default 1 help Select index of up-buffer used for logger output. Make sure the buffer number is not used by other logger, e.g. in LOG_BACKEND_RTT_BUFFER, otherwise the buffer will be overwritten. config BT_DEBUG_MONITOR_RTT_BUFFER_NAME string "Buffer name used for custom logger output." default "btmonitor" help Select index of up-buffer used for logger output. config BT_DEBUG_MONITOR_RTT_BUFFER_SIZE int "Size of reserved up-buffer for custom logger output." default 1024 help Specify reserved size of up-buffer used for custom logger output. endif # BT_DEBUG_MONITOR_RTT endchoice # Bluetooth debug type if BT_DEBUG config BT_DEBUG_HCI_DRIVER bool "Bluetooth HCI driver debug" select DEPRECATED help This option enables debug support for the active Bluetooth HCI driver, including the Controller-side HCI layer when included in the build. module = BT_HCI_DRIVER legacy-debug-sym = BT_DEBUG_HCI_DRIVER module-str = "Bluetooth HCI driver" source "subsys/bluetooth/common/Kconfig.template.log_config_bt" config BT_DEBUG_RPA bool "Bluetooth Resolvable Private Address (RPA) debug" select DEPRECATED depends on BT_RPA help This option enables debug support for the Bluetooth Resolvable Private Address (RPA) generation and resolution. module = BT_RPA legacy-debug-sym = BT_DEBUG_RPA module-str = "Bluetooth Resolvable Private Address (RPA)" source "subsys/bluetooth/common/Kconfig.template.log_config_bt" endif # BT_DEBUG |