Linux Audio

Check our new training course

Embedded Linux Audio

Check our new training course
with Creative Commons CC-BY-SA
lecture materials

Bootlin logo

Elixir Cross Referencer

Loading...
# Kconfig - Bluetooth common configuration options
#
# Copyright (c) 2017 Nordic Semiconductor ASA
# Copyright (c) 2016 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

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
	default y
	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_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
	# Virtual/hidden option
	bool
	select TINYCRYPT
	select TINYCRYPT_AES

config BT_DEBUG
	# Virtual/hidden option to make the conditions more intuitive
	bool

choice
	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
	help
	  This option enables Bluetooth debug going to standard
	  serial console.

config BT_DEBUG_MONITOR
	bool "Monitor protocol over UART"
	select BT_DEBUG
	select LOG
	select CONSOLE_HAS_DRIVER
	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).

endchoice

if BT_DEBUG

config BT_MONITOR_ON_DEV_NAME
	string "Device Name of Bluetooth monitor logging UART"
	depends on BT_DEBUG_MONITOR
	default "$(dt_str_val,DT_BT_MONITOR_ON_DEV_NAME)" if HAS_DTS
	default "UART_0"
	help
	 This option specifies the name of UART device to be used
	 for the Bluetooth monitor logging.

config BT_DEBUG_HCI_DRIVER
	bool "Bluetooth HCI driver debug"
	help
	  This option enables debug support for the active
	  Bluetooth HCI driver, including the Controller-side HCI layer
	  when included in the build.

config BT_DEBUG_RPA
	bool "Bluetooth Resolvable Private Address (RPA) debug"
	depends on BT_RPA
	help
	  This option enables debug support for the Bluetooth
	  Resolvable Private Address (RPA) generation and resolution.

endif # BT_DEBUG