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
18module = BT
19module-str = bt
20source "subsys/logging/Kconfig.template.log_config"
21
22choice BT_STACK_SELECTION
23	prompt "Bluetooth Stack Selection"
24	default BT_HCI
25	help
26	  Select the Bluetooth stack to compile.
27
28config BT_HCI
29	bool "HCI-based"
30	help
31	  HCI-based stack with optional host & controller parts and an
32	  HCI driver in between.
33
34config BT_CUSTOM
35	bool "Custom"
36	help
37	  Select a custom, non-HCI based stack. If you're not sure what
38	  this is, you probably want the HCI-based stack instead.
39
40endchoice
41
42# The Bluetooth subsystem requires the system workqueue to execute at
43# a cooperative priority.
44config SYSTEM_WORKQUEUE_PRIORITY
45	range -256 -1
46
47if BT_HCI
48
49config BT_HCI_RAW
50	bool "RAW HCI access"
51	help
52	  This option allows to access Bluetooth controller
53	  from the application with the RAW HCI protocol.
54
55config BT_HCI_RAW_H4
56	bool "RAW HCI H:4 transport"
57	help
58	  This option enables HCI RAW access to work over an H:4
59	  transport, note that it still need to be selected at runtime.
60
61config BT_HCI_RAW_H4_ENABLE
62	bool "RAW HCI H:4 transport enable"
63	depends on BT_HCI_RAW_H4
64	help
65	  This option enables use of H:4 transport for HCI RAW access at
66	  build time.
67
68config BT_HCI_RAW_RESERVE
69	int "Buffer headroom needed for HCI transport"
70	depends on BT_HCI_RAW
71	default 1 if BT_HCI_RAW_H4
72	default 0
73	help
74	  This option is used by the HCI raw transport implementation to
75	  declare how much headroom it needs for any HCI transport headers.
76
77config BT_HCI_RAW_CMD_EXT
78	bool "RAW HCI Command Extension"
79	help
80	  This option enables HCI RAW command extension so the driver can
81	  register it own command table extension.
82
83config BT_PERIPHERAL
84	bool "Peripheral Role support"
85	select BT_BROADCASTER
86	select BT_CONN
87	default y if BT_HCI_RAW
88	help
89	  Select this for LE Peripheral role support.
90
91config BT_CENTRAL
92	bool "Central Role support"
93	select BT_OBSERVER
94	select BT_CONN
95	default y if BT_HCI_RAW
96	help
97	  Select this for LE Central role support.
98
99menu "Broadcaster"
100	visible if !BT_PERIPHERAL
101
102config BT_BROADCASTER
103	bool "Broadcaster Role support"
104	default y if !BT_OBSERVER
105	help
106	  Select this for LE Broadcaster role support.
107
108endmenu
109
110rsource "Kconfig.adv"
111
112menu "Observer"
113	visible if !BT_CENTRAL
114
115config BT_OBSERVER
116	bool "Observer Role support"
117	help
118	  Select this for LE Observer role support.
119
120endmenu
121
122rsource "services/Kconfig"
123
124config BT_CONN
125	bool
126
127config BT_MAX_CONN
128	int "Maximum number of simultaneous connections"
129	depends on BT_CONN
130	range 1 64
131	default 1
132	help
133	  Maximum number of simultaneous Bluetooth connections
134	  supported.
135
136if BT_CONN
137config BT_HCI_ACL_FLOW_CONTROL
138	bool "Controller to Host ACL flow control support"
139	# Enable if building a Host-only build
140	default y if !BT_CTLR && !BT_STM32_IPM && !BT_ESP32
141	# Enable if building a Controller-only build
142	default y if BT_HCI_RAW
143	select POLL
144	help
145	  Enable support for throttling ACL buffers from the controller
146	  to the host. This is particularly useful when the host and
147	  controller are on separate cores since it ensures that we do
148	  not run out of incoming ACL buffers.
149
150config BT_REMOTE_VERSION
151	bool "Enable fetching of remote version"
152	# Enable if building a Controller-only build
153	default y if BT_HCI_RAW
154	help
155	  Enable this to get access to the remote version in the Controller and
156	  in the Host through bt_conn_get_info(). The fields in question can
157	  be then found in the bt_conn_info struct.
158
159config BT_PHY_UPDATE
160	bool "PHY Update"
161	default y
162	help
163	  Enable support for Bluetooth 5.0 PHY Update Procedure.
164
165config BT_DATA_LEN_UPDATE
166	bool "Data Length Update"
167	default y
168	help
169	  Enable support for Bluetooth v4.2 LE Data Length Update procedure.
170endif # BT_CONN
171
172rsource "Kconfig.iso"
173rsource "common/Kconfig"
174rsource "host/Kconfig"
175rsource "controller/Kconfig"
176rsource "shell/Kconfig"
177
178endif # BT_HCI
179
180config BT_COMPANY_ID
181	hex "Company Id"
182	default 0x05F1
183	range 0x0000 0xFFFF
184	help
185	  Set the Bluetooth Company Identifier for this device. The Linux
186	  Foundation's Company Identifier (0x05F1) is the default value for
187	  this option although silicon vendors and hardware manufacturers
188	  can set their own. Note that the controller's Company Identifier is
189	  controlled by BT_CTLR_COMPANY_ID. The full list of Bluetooth
190	  Company Identifiers can be found here:
191	  https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
192
193rsource "mesh/Kconfig"
194rsource "audio/Kconfig"
195
196endif # BT
197