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 !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 !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 !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 && (!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 && (!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 !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 !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 !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
184endif # BT_CONN
185
186rsource "Kconfig.iso"
187rsource "common/Kconfig"
188rsource "host/Kconfig"
189rsource "controller/Kconfig"
190rsource "shell/Kconfig"
191rsource "crypto/Kconfig"
192rsource "lib/Kconfig"
193rsource "Kconfig.logging"
194
195config BT_USE_PSA_API
196	bool "Use PSA APIs instead of TinyCrypt for crypto operations"
197	depends on BT_CRYPTO || BT_HOST_CRYPTO || BT_ECC
198	depends on PSA_CRYPTO_CLIENT
199	help
200	  Use PSA APIs instead of TinyCrypt for crypto operations
201
202endif # BT_HCI
203
204config BT_COMPANY_ID
205	hex "Company Id"
206	default 0x05F1
207	range 0x0000 0xFFFF
208	help
209	  Set the Bluetooth Company Identifier for this device. The Linux
210	  Foundation's Company Identifier (0x05F1) is the default value for
211	  this option although silicon vendors and hardware manufacturers
212	  can set their own. Note that the controller's Company Identifier is
213	  controlled by BT_CTLR_COMPANY_ID. The full list of Bluetooth
214	  Company Identifiers can be found here:
215	  https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
216
217endif # BT
218