Kconfig 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # Bluetooth common configuration options
  2. # Copyright (c) 2017 Nordic Semiconductor ASA
  3. # Copyright (c) 2016 Intel Corporation
  4. # SPDX-License-Identifier: Apache-2.0
  5. config BT_HAS_HCI_VS
  6. bool
  7. help
  8. This option is set by the Bluetooth controller to indicate support
  9. for the Zephyr HCI Vendor-Specific Commands and Event.
  10. config BT_HCI_VS
  11. bool "Zephyr HCI Vendor-Specific Commands"
  12. depends on BT_HAS_HCI_VS || !BT_CTLR
  13. default y if BT_HAS_HCI_VS
  14. help
  15. Enable support for the Zephyr HCI Vendor-Specific Commands in the
  16. Host and/or Controller. This enables Set Version Information,
  17. Supported Commands, Supported Features vendor commands.
  18. config BT_HCI_VS_EXT
  19. bool "Zephyr HCI Vendor-Specific Extensions"
  20. depends on BT_HCI_VS
  21. default y
  22. help
  23. Enable support for the Zephyr HCI Vendor-Specific Extensions in the
  24. Host and/or Controller. This enables Write BD_ADDR, Read Build Info,
  25. Read Static Addresses and Read Key Hierarchy Roots vendor commands.
  26. config BT_HCI_VS_EXT_DETECT
  27. bool "Use heuristics to guess HCI vendor extensions support in advance"
  28. depends on BT_HCI_VS_EXT && !BT_CTLR
  29. default y if BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3 || BOARD_NATIVE_POSIX
  30. help
  31. Use some heuristics to try to guess in advance whether the controller
  32. supports the HCI vendor extensions in advance, in order to prevent
  33. sending vendor commands to controller which may interpret them in
  34. completely different ways.
  35. config BT_HCI_MESH_EXT
  36. bool "Mesh HCI Command support"
  37. depends on BT_BROADCASTER && BT_OBSERVER && !BT_LL_SW_SPLIT
  38. help
  39. Enable support for the Bluetooth Mesh HCI Commands.
  40. config BT_WAIT_NOP
  41. bool "Wait for \"NOP\" Command Complete event during init"
  42. help
  43. Emit a Command Complete event from the Controller (and wait for it
  44. from the Host) for the NOP opcode to indicate that the Controller is
  45. ready to receive commands.
  46. config BT_RPA
  47. bool
  48. select TINYCRYPT
  49. select TINYCRYPT_AES
  50. config BT_ASSERT
  51. bool "Custom Bluetooth assert implementation"
  52. default y
  53. help
  54. Use a custom Bluetooth assert implementation instead of the
  55. kernel-wide __ASSERT() when CONFIG_ASSERT is disabled.
  56. if BT_ASSERT
  57. config BT_ASSERT_VERBOSE
  58. bool "Print out an assert string when using BT_ASSERT"
  59. default y
  60. help
  61. When CONFIG_BT_ASSERT is enabled, this option turns on printing the
  62. cause of the assert to the console using printk().
  63. config BT_ASSERT_PANIC
  64. bool "Use k_panic() instead of k_oops()"
  65. default y
  66. help
  67. When CONFIG_BT_ASSERT is enabled, this option makes the code call
  68. k_panic() instead of k_oops() when an assertion is triggered.
  69. endif # BT_ASSERT
  70. config BT_DEBUG
  71. # Hidden option to make the conditions more intuitive
  72. bool
  73. choice
  74. prompt "Bluetooth debug type"
  75. default ATCS_BT_DEBUG_NONE
  76. config ATCS_BT_DEBUG_NONE
  77. bool "No debug log"
  78. help
  79. Select this to disable all Bluetooth debug logs.
  80. config ATCS_BT_DEBUG_LOG
  81. bool "Normal printf-style to console"
  82. select BT_DEBUG
  83. select LOG
  84. help
  85. This option enables Bluetooth debug going to standard
  86. serial console.
  87. config ATCS_BT_DEBUG_MONITOR
  88. bool "Monitor protocol over UART"
  89. select BT_DEBUG
  90. select LOG
  91. select CONSOLE_HAS_DRIVER
  92. help
  93. Use a custom logging protocol over the console UART
  94. instead of plain-text output. Requires a special application
  95. on the host side that can decode this protocol. Currently
  96. the 'btmon' tool from BlueZ is capable of doing this.
  97. If the target board has two or more external UARTs it is
  98. possible to keep using UART_CONSOLE together with this option,
  99. however if there is only a single external UART then
  100. UART_CONSOLE needs to be disabled (in which case printk/printf
  101. will get encoded into the monitor protocol).
  102. endchoice
  103. if BT_DEBUG
  104. # Workaround for not being able to have commas in macro arguments
  105. DT_CHOSEN_Z_BT_MON_UART := zephyr,bt-mon-uart
  106. config BT_MONITOR_ON_DEV_NAME
  107. string "Device Name of Bluetooth monitor logging UART"
  108. depends on BT_DEBUG_MONITOR
  109. default "$(dt_chosen_label,$(DT_CHOSEN_Z_BT_MON_UART))" if HAS_DTS
  110. default "UART_0"
  111. help
  112. This option specifies the name of UART device to be used
  113. for the Bluetooth monitor logging.
  114. config BT_DEBUG_HCI_DRIVER
  115. bool "Bluetooth HCI driver debug"
  116. help
  117. This option enables debug support for the active
  118. Bluetooth HCI driver, including the Controller-side HCI layer
  119. when included in the build.
  120. config BT_DEBUG_RPA
  121. bool "Bluetooth Resolvable Private Address (RPA) debug"
  122. depends on BT_RPA
  123. help
  124. This option enables debug support for the Bluetooth
  125. Resolvable Private Address (RPA) generation and resolution.
  126. endif # BT_DEBUG