1# Bluetooth LE stack configuration options
2
3# Copyright (c) 2016-2020 Nordic Semiconductor ASA
4# Copyright (c) 2015-2016 Intel Corporation
5# SPDX-License-Identifier: Apache-2.0
6
7comment "Host Stack Configuration"
8
9config BT_HCI_HOST
10	# Hidden option to make the conditions more intuitive
11	bool
12	default y
13	depends on !BT_HCI_RAW
14	select POLL
15
16
17config BT_HCI_TX_STACK_SIZE
18	# NOTE: This value is derived from other symbols and should only be
19	# changed if required by architecture
20	int
21	prompt "HCI Tx thread stack size" if BT_HCI_TX_STACK_SIZE_WITH_PROMPT
22	default 512 if BT_H4
23	default 512 if BT_H5
24	default 416 if BT_SPI
25	default 940 if BT_CTLR && BT_LL_SW_SPLIT && NO_OPTIMIZATIONS
26	default 1024 if BT_CTLR && BT_LL_SW_SPLIT && BT_CENTRAL
27	default 640 if BT_CTLR && BT_LL_SW_SPLIT
28	default 512 if BT_USERCHAN
29	default 640 if BT_STM32_IPM
30	# Even if no driver is selected the following default is still
31	# needed e.g. for unit tests. This default will also server as
32	# the worst-case stack size if an out-of-tree controller is used.
33	default 1024
34	help
35	  Stack size needed for executing bt_send with specified driver.
36	  NOTE: This is an advanced setting and should not be changed unless
37	  absolutely necessary.  To change this you must first select
38	  BT_HCI_TX_STACK_SIZE_WITH_PROMPT.
39
40config BT_HCI_TX_STACK_SIZE_WITH_PROMPT
41	bool "Override HCI Tx thread stack size"
42
43config BT_HCI_ECC_STACK_SIZE
44	# NOTE: This value is derived from other symbols and should only be
45	# changed if required by architecture
46	int "HCI ECC thread stack size"
47	default 1140
48	help
49	  NOTE: This is an advanced setting and should not be changed unless
50	  absolutely necessary
51
52config BT_HCI_TX_PRIO
53	# Hidden option for Co-Operative Tx thread priority
54	int
55	default 7
56
57config BT_HCI_RESERVE
58	int
59	default 0 if BT_H4
60	default 1 if BT_H5
61	default 1 if BT_RPMSG
62	default 1 if BT_SPI
63	default 1 if BT_STM32_IPM
64	default 1 if BT_USERCHAN
65	default 1 if BT_ESP32
66	# Even if no driver is selected the following default is still
67	# needed e.g. for unit tests.
68	default 0
69	help
70	  Headroom that the driver needs for sending and receiving buffers. Add a
71	  new 'default' entry for each new driver.
72
73config BT_RECV_IS_RX_THREAD
74	# Hidden option set by the HCI driver to indicate that there's
75	# no need for the host to have its own RX thread.
76	# If this option has been enabled it is then the responsibility of the
77	# HCI driver to call bt_recv_prio from a higher priority context than
78	# bt_recv in order to avoid deadlocks.
79	# If this option is disabled then only bt_recv should be called.
80	bool
81	prompt "bt_recv is called from RX thread" if BT_NO_DRIVER
82
83config BT_RX_STACK_SIZE
84	int "Size of the receiving thread stack"
85	depends on BT_HCI_HOST || BT_RECV_IS_RX_THREAD
86	default 512 if BT_HCI_RAW
87	default 2048 if BT_MESH
88	default 2200 if BT_SETTINGS
89	default 1024
90	help
91	  Size of the receiving thread stack. This is the context from
92	  which all event callbacks to the application occur. The
93	  default value is sufficient for basic operation, but if the
94	  application needs to do advanced things in its callbacks that
95	  require extra stack space, this value can be increased to
96	  accommodate for that.
97
98config BT_RX_PRIO
99	# Hidden option for Co-Operative Rx thread priority
100	int
101	depends on BT_HCI_HOST || BT_RECV_IS_RX_THREAD
102	default 8
103
104config BT_DRIVER_RX_HIGH_PRIO
105	# Hidden option for Co-Operative HCI driver RX thread priority
106	int
107	default 6
108
109if BT_HCI_HOST
110
111config BT_HOST_CRYPTO
112	# Hidden option that compiles in random number generation and AES
113	# encryption support using TinyCrypt library if this is not provided
114	# by the controller implementation.
115	bool
116	default y if !BT_CTLR_CRYPTO
117	select TINYCRYPT
118	select TINYCRYPT_AES
119	select TINYCRYPT_SHA256
120	select TINYCRYPT_SHA256_HMAC
121	select TINYCRYPT_SHA256_HMAC_PRNG
122
123config BT_SETTINGS
124	bool "Store Bluetooth state and configuration persistently"
125	depends on SETTINGS
126	select MPU_ALLOW_FLASH_WRITE if ARM_MPU
127	help
128	  When selected, the Bluetooth stack will take care of storing
129	  (and restoring) the Bluetooth state (e.g. pairing keys) and
130	  configuration persistently in flash.
131
132	  When this option has been enabled, it's important that the
133	  application makes a call to settings_load() after having done
134	  all necessary initialization (e.g. calling bt_enable). The
135	  reason settings_load() is handled externally to the stack, is
136	  that there may be other subsystems using the settings API, in
137	  which case it's more efficient to load all settings in one go,
138	  instead of each subsystem doing it independently.
139
140if BT_SETTINGS
141config BT_SETTINGS_CCC_LAZY_LOADING
142	bool "Load CCC values from settings when peer connects"
143	depends on BT_CONN
144	default y
145	help
146	  Load Client Configuration Characteristic setting right after a bonded
147	  device connects.
148	  Disabling this option will increase memory usage as CCC values for all
149	  bonded devices will be loaded when calling settings_load.
150
151config BT_SETTINGS_CCC_STORE_ON_WRITE
152	bool "Store CCC value immediately after it has been written"
153	depends on BT_CONN
154	help
155	  Store Client Configuration Characteristic value right after it has
156	  been updated.
157
158	  By default, CCC is only stored on disconnection.
159	  Choosing this option is safer for battery-powered devices or devices
160	  that expect to be reset suddenly. However, it requires additional
161	  workqueue stack space.
162
163config BT_SETTINGS_USE_PRINTK
164	bool "Use snprintk to encode Bluetooth settings key strings"
165	depends on SETTINGS && PRINTK
166	default y
167	help
168	  When selected, Bluetooth settings will use snprintk to encode
169	  key strings.
170	  When not selected, Bluetooth settings will use a faster builtin
171	  function to encode the key string. The drawback is that if
172	  printk is enabled then the program memory footprint will be larger.
173endif # BT_SETTINGS
174
175config BT_WHITELIST
176	bool "DEPRECATED: Use BT_FILTER_ACCEPT_LIST instead"
177	select BT_FILTER_ACCEPT_LIST
178
179config BT_FILTER_ACCEPT_LIST
180	bool "Enable filter accept list support"
181	help
182	  This option enables the filter accep list API. This takes advantage of the
183	  filtering feature of a BLE controller.
184	  The filter accept list is a global list and the same list is used
185	  by both scanner and advertiser. The filter accept list cannot be modified while
186	  it is in use.
187
188	  An Advertiser can filter which peers can connect or request scan
189	  response data.
190	  A scanner can filter advertisers for which it will generate
191	  advertising reports.
192	  Connections can be established automatically for accepted peers.
193
194	  This options deprecates the bt_le_set_auto_conn API in favor of the
195	  bt_conn_create_aute_le API.
196
197if BT_CONN
198
199config BT_CONN_TX_MAX
200	int "Maximum number of pending TX buffers with a callback"
201	default BT_L2CAP_TX_BUF_COUNT
202	range BT_L2CAP_TX_BUF_COUNT 255
203	help
204	  Maximum number of pending TX buffers that have an associated
205	  callback. Normally this can be left to the default value, which
206	  is equal to the number of TX buffers in the stack-internal pool.
207
208config BT_USER_PHY_UPDATE
209	bool "User control of PHY Update Procedure"
210	depends on BT_PHY_UPDATE
211	help
212	  Enable application access to initiate the PHY Update Procedure.
213	  The application can also register a callback to be notified about PHY
214	  changes on the connection. The current PHY info is available in the
215	  connection info.
216
217config BT_AUTO_PHY_UPDATE
218	bool "Auto-initiate PHY Update Procedure"
219	depends on BT_PHY_UPDATE
220	default y if !BT_USER_PHY_UPDATE
221	help
222	  Initiate PHY Update Procedure on connection establishment.
223
224	  Disable this if you want the PHY Update Procedure feature supported
225	  but want to rely on the remote device to initiate the procedure at its
226	  discretion or want to initiate manually.
227
228config BT_USER_DATA_LEN_UPDATE
229	bool "User control of Data Length Update Procedure"
230	depends on BT_DATA_LEN_UPDATE
231	help
232	  Enable application access to initiate the Data Length Update
233	  Procedure. The application can also a register callback to be notified
234	  about Data Length changes on the connection. The current Data Length
235	  info is available in the connection info.
236
237config BT_AUTO_DATA_LEN_UPDATE
238	bool "Auto-initiate Data Length Update procedure"
239	depends on BT_DATA_LEN_UPDATE
240	default y if !BT_USER_DATA_LEN_UPDATE
241	help
242	  Initiate Data Length Update Procedure on connection establishment.
243
244	  Disable this if you want the Data Length Update Procedure feature
245	  supported but want to rely on the remote device to initiate the
246	  procedure at its discretion or want to initiate manually.
247
248config BT_REMOTE_INFO
249	bool "Enable application access to remote information"
250	help
251	  Enable application access to the remote information available in the
252	  stack. The remote information is retrieved once a connection has been
253	  established and the application will be notified when this information
254	  is available through the remote_version_available connection callback.
255
256config BT_REMOTE_VERSION
257	bool "Enable remote version information"
258	depends on BT_REMOTE_INFO
259	help
260	  Enable this to get access to the remote version through
261	  the remote_version_available callback. The host will automatically ask
262	  the remote device after the connection has been established.
263
264config BT_SMP
265	bool "Security Manager Protocol support"
266	select TINYCRYPT
267	select TINYCRYPT_AES
268	select TINYCRYPT_AES_CMAC
269	select BT_RPA
270	select BT_ECC
271	help
272	  This option enables support for the Security Manager Protocol
273	  (SMP), making it possible to pair devices over LE.
274
275if BT_SMP
276config BT_PRIVACY
277	bool "Privacy Feature"
278	help
279	  Enable local Privacy Feature support. This makes it possible
280	  to use Resolvable Private Addresses (RPAs).
281
282config BT_RPA_TIMEOUT
283	int "Resolvable Private Address timeout"
284	depends on BT_PRIVACY
285	default 900
286	range 1 65535
287	help
288	  This option defines how often resolvable private address is rotated.
289	  Value is provided in seconds and defaults to 900 seconds (15 minutes).
290
291config BT_SIGNING
292	bool "Data signing support"
293	help
294	  This option enables data signing which is used for transferring
295	  authenticated data in an unencrypted connection.
296
297config BT_SMP_APP_PAIRING_ACCEPT
298	bool "Accept or reject pairing initiative"
299	help
300	  When receiving pairing request or pairing response query the
301	  application whether to accept to proceed with pairing or not. This is
302	  for pairing over SMP and does not affect SSP, which will continue
303	  pairing without querying the application.
304	  The application can return an error code, which is translated into
305	  a SMP return value if the pairing is not allowed.
306
307config BT_SMP_SC_PAIR_ONLY
308	bool "Disable legacy pairing"
309	help
310	  This option disables LE legacy pairing and forces LE secure connection
311	  pairing. All Security Mode 1 levels can be used with legacy pairing
312	  disabled, but pairing with devices that do not support secure
313	  connections pairing will not be supported.
314	  To force a higher security level use "Secure Connections Only Mode"
315
316config BT_SMP_SC_ONLY
317	bool "Secure Connections Only Mode"
318	select BT_SMP_SC_PAIR_ONLY
319	help
320	  This option enables support for Secure Connection Only Mode. In this
321	  mode device shall only use Security Mode 1 Level 4 with exception
322	  for services that only require Security Mode 1 Level 1 (no security).
323	  Security Mode 1 Level 4 stands for authenticated LE Secure Connections
324	  pairing with encryption. Enabling this option disables legacy pairing.
325
326config BT_SMP_OOB_LEGACY_PAIR_ONLY
327	bool "Force Out Of Band Legacy pairing"
328	depends on !(BT_SMP_SC_PAIR_ONLY || BT_SMP_SC_ONLY)
329	help
330	  This option disables Legacy and LE SC pairing and forces legacy OOB.
331
332config BT_SMP_DISABLE_LEGACY_JW_PASSKEY
333	bool "Forbid usage of insecure legacy pairing methods"
334	depends on !(BT_SMP_SC_PAIR_ONLY || BT_SMP_SC_ONLY || \
335		     BT_SMP_OOB_LEGACY_PAIR_ONLY)
336	help
337	  This option disables Just Works and Passkey legacy pairing methods to
338	  increase security.
339
340config BT_SMP_ALLOW_UNAUTH_OVERWRITE
341	bool "Allow unauthenticated pairing for paired device"
342	help
343	  This option allows all unauthenticated pairing attempts made by the
344	  peer where an unauthenticated bond already exists.
345	  This would enable cases where an attacker could copy the peer device
346	  address to connect and start an unauthenticated pairing procedure
347	  to replace the existing bond. When this option is disabled in order
348	  to create a new bond the old bond has to be explicitly deleted with
349	  bt_unpair.
350
351config BT_SMP_USB_HCI_CTLR_WORKAROUND
352	bool "Workaround for USB HCI controller out-of-order events"
353	depends on BT_TESTING
354	help
355	  This option enables support for USB HCI controllers that sometimes
356	  send out-of-order HCI events and ACL Data due to using different USB
357	  endpoints.
358	  Enabling this option will make the central role not require the
359	  encryption-change event to be received before accepting key-distribution
360	  data.
361	  It opens up for a potential vulnerability as the central cannot detect
362	  if the keys are distributed over an encrypted link.
363
364config BT_FIXED_PASSKEY
365	bool "Use a fixed passkey for pairing"
366	help
367	  With this option enabled, the application will be able to call the
368	  bt_passkey_set() API to set a fixed passkey. If set, the
369	  pairing_confim() callback will be called for all incoming pairings.
370
371config BT_USE_DEBUG_KEYS
372	bool "Enable Security Manager Debug Mode"
373	help
374	  This option places Security Manager in a Debug Mode. In this mode
375	  predefined Diffie-Hellman private/public key pair is used as described
376	  in Core Specification Vol. 3, Part H, 2.3.5.6.1.
377
378	  WARNING: This option enables anyone to decrypt on-air traffic.
379	  Use of this feature in production is strongly discouraged.
380
381config BT_BONDABLE
382	bool "Bondable Mode"
383	default y
384	help
385	  This option enables support for Bondable Mode. In this mode,
386	  Bonding flag in AuthReq of SMP Pairing Request/Response will be set
387	  indicating the support for this mode.
388
389config BT_BONDING_REQUIRED
390	bool "Always require bonding"
391	depends on BT_BONDABLE
392	help
393	  When this option is enabled remote devices are required to always
394	  set the bondable flag in their pairing request. Any other kind of
395	  requests will be rejected.
396
397config BT_STORE_DEBUG_KEYS
398	bool "Store Debug Mode bonds"
399	help
400	  This option enables support for storing bonds where either of devices
401	  is using the predefined Diffie-Hellman private/public key pair as
402	  described in the Core Specification Vol 3, Part H, 2.3.5.6.1.
403
404	  WARNING: This option potentially enables anyone to decrypt on-air
405	  traffic.
406	  Use of this feature in production is strongly discouraged.
407
408config BT_SMP_ENFORCE_MITM
409	bool "Enforce MITM protection"
410	default y
411	help
412	  With this option enabled, the Security Manager will set MITM option in
413	  the Authentication Requirements Flags whenever local IO Capabilities
414	  allow the generated key to be authenticated.
415
416config BT_OOB_DATA_FIXED
417	bool "Use a fixed random number for LESC OOB pairing"
418	depends on BT_TESTING
419	help
420	  With this option enabled, the application will be able to perform LESC
421	  pairing with OOB data that consists of fixed random number and confirm
422	  value.
423
424	  WARNING: This option stores a hardcoded Out-of-Band value in the image.
425	  Use of this feature in production is strongly discouraged.
426
427config BT_KEYS_OVERWRITE_OLDEST
428	bool "Overwrite the oldest key if key storage is full"
429	help
430	  If a pairing attempt occurs and the key storage is full then the
431	  oldest key from the set of not currently in use keys will be selected
432	  and overwritten by the pairing device.
433
434config BT_KEYS_SAVE_AGING_COUNTER_ON_PAIRING
435	bool "Store aging counter every time a successful paring occurs"
436	depends on BT_SETTINGS && BT_KEYS_OVERWRITE_OLDEST
437	help
438	  With this option enabled, aging counter will be stored in settings every
439	  time a successful pairing occurs. This increases flash wear out but offers
440	  a more correct finding of the oldest unused pairing info.
441
442config BT_SMP_MIN_ENC_KEY_SIZE
443	int
444	prompt "Minimum encryption key size accepted in octets" if !BT_SMP_SC_ONLY
445	range 7 16
446	default 7
447	default 16 if BT_SMP_SC_ONLY
448	help
449	  This option sets the minimum encryption key size accepted during pairing.
450
451endif # BT_SMP
452
453rsource "Kconfig.l2cap"
454rsource "Kconfig.gatt"
455
456config BT_MAX_PAIRED
457	int "Maximum number of paired devices"
458	default 0 if !BT_SMP
459	default 1
460	range 0 128
461	help
462	  Maximum number of paired Bluetooth devices. The minimum (and
463	  default) number is 1.
464
465config BT_CREATE_CONN_TIMEOUT
466	int "Timeout for pending LE Create Connection command in seconds"
467	default 3
468	range 1 BT_RPA_TIMEOUT if BT_PRIVACY && (BT_RPA_TIMEOUT < 655)
469	range 1 655
470
471config BT_CONN_PARAM_UPDATE_TIMEOUT
472	int "Peripheral connection parameter update timeout in milliseconds"
473	default 5000
474	range 0 65535
475
476	help
477	  The value is a timeout used by peripheral device to wait until it
478	  starts the first connection parameters update procedure after a
479	  connection has been established.
480	  The connection parameters requested will be the parameters set by the
481	  application, or the peripheral preferred connection parameters if
482	  configured.
483	  The default value is set to 5 seconds, to comply with the Bluetooth
484	  Core specification: Core 4.2 Vol 3, Part C, 9.3.12.2:
485	  "The Peripheral device should not perform a Connection Parameter
486	  Update procedure within 5 seconds after establishing a connection."
487
488endif # BT_CONN
489
490if BT_OBSERVER
491config BT_BACKGROUND_SCAN_INTERVAL
492	int "Scan interval used for background scanning in 0.625 ms units"
493	default 2048
494	range 4 16384
495config BT_BACKGROUND_SCAN_WINDOW
496	int "Scan window used for background scanning in 0.625 ms units"
497	default 18
498	range 4 16384
499endif # BT_OBSERVER
500
501config BT_SCAN_WITH_IDENTITY
502	bool "Perform active scanning using local identity address"
503	depends on !BT_PRIVACY && (BT_CENTRAL || BT_OBSERVER)
504	help
505	  Enable this if you want to perform active scanning using the local
506	  identity address as the scanner address. By default the stack will
507	  always use a non-resolvable private address (NRPA) in order to avoid
508	  disclosing local identity information. By not scanning with the
509	  identity address the scanner will receive directed advertise reports
510	  for for the local identity. If this use case is required, then enable
511	  this option.
512
513config BT_DEVICE_NAME_DYNAMIC
514	bool "Allow to set Bluetooth device name on runtime"
515	help
516	  Enabling this option allows for runtime configuration of Bluetooth
517	  device name.
518
519config BT_DEVICE_NAME_MAX
520	int "Maximum size in bytes for device name"
521	depends on BT_DEVICE_NAME_DYNAMIC
522	default 28
523	range 2 248
524	help
525	  Bluetooth device name storage size. Storage can be up to 248 bytes
526	  long (excluding NULL termination).
527
528config BT_DEVICE_NAME
529	string "Bluetooth device name"
530	default "Zephyr"
531	help
532	  Bluetooth device name. Name can be up to 248 bytes long (excluding
533	  NULL termination). Can be empty string.
534
535config BT_DEVICE_APPEARANCE
536	int "Bluetooth device appearance"
537	range 0 65535
538	default 0
539	help
540	  Bluetooth device appearance. For the list of possible values please
541	  consult the following link:
542	  https://www.bluetooth.com/specifications/assigned-numbers
543
544config BT_ID_MAX
545	int "Maximum number of local identities"
546	range 1 64
547	default 1
548	help
549	  Maximum number of supported local identity addresses. For most
550	  products this is safe to leave as the default value (1).
551
552config BT_DF
553	bool "Enable Direction Finding support [EXPERIMENTAL]"
554	help
555	  Enable support for Bluetooth 5.1 Direction Finding.
556	  It will allow to: get information about antennae, configure
557	  Constant Tone Extension, transmit CTE and sample incoming CTE.
558
559config BT_DF_CONNECTIONLESS_CTE_RX
560	bool "Enable support for receive of CTE in connectionless mode"
561	depends on BT_DF
562	help
563	  Enable support for reception and sampling of Constant Tone Extension
564	  in connectionless mode.
565
566config BT_DF_CONNECTION_CTE_RX
567	bool "Enable support for receive of CTE in connection mode"
568	depends on BT_DF
569	help
570	  Enable support for reception and sampling of Constant Tone Extension
571	  in connection mode.
572
573config BT_DEBUG_DF
574	bool "Bluetooth Direction Finding debug"
575	depends on BT_DF
576	help
577	  This option enables debug support for Bluetooth Direction Finding
578
579endif # BT_HCI_HOST
580
581config BT_ECC
582	bool "Enable ECDH key generation support"
583	default y if BT_MESH_PROV || (BT_SMP && !BT_SMP_OOB_LEGACY_PAIR_ONLY)
584	help
585	  This option adds support for ECDH HCI commands.
586
587config BT_TINYCRYPT_ECC
588	bool "Emulate ECDH in the Host using TinyCrypt library"
589	select TINYCRYPT
590	select TINYCRYPT_ECC_DH
591	depends on BT_ECC && (BT_HCI_RAW || BT_HCI_HOST)
592	default y if BT_CTLR && !BT_CTLR_ECDH
593	help
594	  If this option is set TinyCrypt library is used for emulating the
595	  ECDH HCI commands and events needed by e.g. LE Secure Connections.
596	  In builds including the BLE Host, if not set the controller crypto is
597	  used for ECDH and if the controller doesn't support the required HCI
598	  commands the LE Secure Connections support will be disabled.
599	  In builds including the HCI Raw interface and the BLE Controller, this
600	  option injects support for the 2 HCI commands required for LE Secure
601	  Connections so that Hosts can make use of those. The option defaults
602	  to enabled for a combined build with Zephyr's own controller, since it
603	  does not have any special ECC support itself (at least not currently).
604
605config BT_HOST_CCM
606	bool "Enable host side AES-CCM module"
607	help
608	  Enables the software based AES-CCM engine in the host. Will use the
609	  controller's AES encryption functions if available, or BT_HOST_CRYPTO
610	  otherwise.
611
612if BT_DEBUG
613config BT_DEBUG_SETTINGS
614	bool "Bluetooth storage debug"
615	depends on BT_SETTINGS
616	help
617	  This option enables debug support for Bluetooth storage.
618
619config BT_DEBUG_HCI_CORE
620	bool "Bluetooth HCI core debug"
621	help
622	  This option enables debug support for Bluetooth HCI
623	  core.
624
625config BT_DEBUG_CONN
626	bool "Bluetooth connection debug"
627	depends on BT_CONN || BT_ISO
628	help
629	  This option enables debug support for Bluetooth
630	  connection handling.
631
632config BT_DEBUG_ISO
633	bool "ISO channel debug"
634	help
635	  Use this option to enable ISO channels debug logs for the
636	  Bluetooth Audio functionality.
637
638config BT_DEBUG_KEYS
639	bool "Bluetooth security keys debug"
640	depends on BT_HCI_HOST
641	depends on BT_SMP
642	help
643	  This option enables debug support for the handling of
644	  Bluetooth security keys.
645
646	  WARNING: This option prints out private security keys such as
647	  the Long Term Key.
648	  Use of this feature in production is strongly discouraged.
649
650config BT_DEBUG_SMP
651	bool "Bluetooth Security Manager Protocol (SMP) debug"
652	depends on BT_HCI_HOST
653	depends on BT_SMP
654	help
655	  This option enables debug support for the Bluetooth
656	  Security Manager Protocol (SMP).
657
658	  WARNING: This option prints out private security keys such as
659	  the Long Term Key.
660	  Use of this feature in production is strongly discouraged.
661
662config BT_SMP_SELFTEST
663	bool "Bluetooth SMP self tests executed on init"
664	depends on BT_DEBUG_SMP
665	help
666	  This option enables SMP self-tests executed on startup
667	  to verify security and crypto functions.
668
669config BT_SMP_FORCE_BREDR
670	bool "Force Bluetooth SMP over BR/EDR"
671	depends on BT_DEBUG_SMP
672	help
673	  This option enables SMP over BR/EDR even if controller is not
674	  supporting BR/EDR Secure Connections. This option is solely for
675	  testing and should never be enabled on production devices.
676
677config BT_DEBUG_RFCOMM
678	bool "Bluetooth RFCOMM debug"
679	depends on BT_RFCOMM
680	help
681	  This option enables debug support for the Bluetooth
682	  RFCOMM layer.
683
684config BT_DEBUG_HFP_HF
685	bool "Bluetooth Hands Free Profile (HFP) debug"
686	depends on BT_HFP_HF
687	help
688	  This option enables debug support for the Bluetooth
689	  Hands Free Profile (HFP).
690
691config BT_DEBUG_AVDTP
692	bool "Bluetooth AVDTP debug"
693	depends on BT_AVDTP
694	help
695	  This option enables debug support for the Bluetooth AVDTP.
696
697config BT_DEBUG_A2DP
698	bool "Bluetooth A2DP debug"
699	depends on BT_A2DP
700	help
701	  This option enables debug support for the Bluetooth
702	  A2DP profile.
703
704config BT_DEBUG_SDP
705	bool "Bluetooth Service Discovery Protocol (SDP) debug"
706	depends on BT_BREDR
707	help
708	  This option enables debug support for the Bluetooth
709	  Service Discovery Protocol (SDP).
710
711config BT_DEBUG_SERVICE
712	bool "Bluetooth Services debug"
713	depends on BT_CONN
714	help
715	  This option enables debug support for the Bluetooth
716	  Services.
717
718endif # BT_DEBUG
719
720config BT_LOG_SNIFFER_INFO
721	bool "Bluetooth log information for sniffer"
722	help
723	  This option enables the Bluetooth stack to log information such as
724	  DH private key and LTK keys, which can be used by sniffers to decrypt
725	  the connection without the use of Debug keys.
726
727	  WARNING: This option prints out private security keys such as
728	  the Long Term Key.
729	  Use of this feature in production is strongly discouraged
730
731config BT_TESTING
732	bool "Bluetooth Testing"
733	help
734	  This option enables custom Bluetooth testing interface.
735	  Shall only be used for testing purposes.
736
737config BT_CONN_DISABLE_SECURITY
738	bool "Disable security"
739	depends on BT_TESTING
740	help
741	  This option disables security checks for incoming requests enabling
742	  to test accessing GATT attributes and L2CAP channels that would
743	  otherwise require encryption/authentication in order to be accessed.
744
745	  WARNING: This option enables anyone to snoop on-air traffic.
746	  Use of this feature in production is strongly discouraged.
747
748config BT_BREDR
749	bool "Bluetooth BR/EDR support [EXPERIMENTAL]"
750	depends on BT_HCI_HOST
751	select BT_PERIPHERAL
752	select BT_CENTRAL
753	select BT_SMP
754	select BT_L2CAP_DYNAMIC_CHANNEL
755	help
756	  This option enables Bluetooth BR/EDR support
757
758if BT_BREDR
759config BT_MAX_SCO_CONN
760	int "Maximum number of simultaneous SCO connections"
761	default 1
762	range 1 3
763	help
764	  Maximum number of simultaneous Bluetooth synchronous connections
765	  supported. The minimum (and default) number is 1.
766
767config BT_RFCOMM
768	bool "Bluetooth RFCOMM protocol support [EXPERIMENTAL]"
769	help
770	  This option enables Bluetooth RFCOMM support
771
772config BT_RFCOMM_L2CAP_MTU
773	int "L2CAP MTU for RFCOMM frames"
774	depends on BT_RFCOMM
775	# RX MTU will be truncated to account for the L2CAP PDU header.
776	default BT_BUF_ACL_RX_SIZE
777	range 23 32767
778	help
779	  Maximum size of L2CAP PDU for RFCOMM frames.
780
781config BT_HFP_HF
782	bool "Bluetooth Handsfree profile HF Role support [EXPERIMENTAL]"
783	depends on PRINTK
784	select BT_RFCOMM
785	help
786	  This option enables Bluetooth HF support
787
788config BT_AVDTP
789	bool "Bluetooth AVDTP protocol support [EXPERIMENTAL]"
790	help
791	  This option enables Bluetooth AVDTP support
792
793config BT_A2DP
794	bool "Bluetooth A2DP Profile [EXPERIMENTAL]"
795	select BT_AVDTP
796	help
797	  This option enables the A2DP profile
798
799config BT_PAGE_TIMEOUT
800	hex "Bluetooth Page Timeout"
801	default 0x2000
802	range 0x0001 0xffff
803	help
804	  This option sets the page timeout value. Value is selected as
805	  (N * 0.625) ms.
806
807endif # BT_BREDR
808
809config BT_HCI_VS_EVT_USER
810	bool "User Vendor-Specific event handling"
811	help
812	  Enable registering a callback for delegating to the user the handling of
813	  VS events that are not known to the stack
814