Kconfig.gatt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. # Bluetooth ATT/GATT configuration options
  2. # Copyright (c) 2019 Intel Corporation
  3. # SPDX-License-Identifier: Apache-2.0
  4. menu "ATT and GATT Options"
  5. config BT_ATT_ENFORCE_FLOW
  6. bool "Enforce strict flow control semantics for incoming PDUs"
  7. default y if !(BOARD_QEMU_CORTEX_M3 || BOARD_QEMU_X86 || ARCH_POSIX || ACTS_BT)
  8. help
  9. Enforce flow control rules on incoming PDUs, preventing a peer
  10. from sending new requests until a previous one has been responded
  11. or sending a new indication until a previous one has been
  12. confirmed. This may need to be disabled to avoid potential race
  13. conditions arising from a USB based HCI transport that splits
  14. HCI events and ACL data to separate endpoints.
  15. config BT_ATT_PREPARE_COUNT
  16. int "Number of ATT prepare write buffers"
  17. default 0
  18. range 0 64
  19. help
  20. Number of buffers available for ATT prepare write, setting
  21. this to 0 disables GATT long/reliable writes.
  22. config BT_EATT
  23. bool "Enhanced ATT Bearers support [EXPERIMENTAL]"
  24. depends on BT_L2CAP_ECRED
  25. help
  26. This option enables support for Enhanced ATT bearers support. When
  27. enabled additional L2CAP channels can be connected as bearers enabling
  28. multiple outstanding request.
  29. if BT_EATT
  30. config BT_EATT_MAX
  31. int "Maximum number of Enhanced ATT bearers"
  32. default 3
  33. range 1 16
  34. help
  35. Number of Enhanced ATT bearers available.
  36. config BT_EATT_RX_MTU
  37. int "Maximum supported Enhanced ATT MTU for incoming data"
  38. default 70
  39. range 70 519
  40. depends on BT_EATT
  41. help
  42. Maximum size incoming PDUs on EATT bearers, value shall include L2CAP
  43. headers and SDU length, maximum is limited to 512 bytes payload, which
  44. is the maximum size for a GATT attribute, plus 1 byte for ATT opcode.
  45. This option influences the stack buffer size and by that may also
  46. limit the outgoing MTU.
  47. config BT_EATT_SEC_LEVEL
  48. int "Enhanced ATT bearer security level"
  49. default 1
  50. range 1 4
  51. help
  52. L2CAP server required security level of EATT bearers:
  53. Level 1 (BT_SECURITY_L1) = No encryption or authentication required
  54. Level 2 (BT_SECURITY_L2) = Only encryption required
  55. Level 3 (BT_SECURITY_L3) = Encryption and authentication required
  56. Level 4 (BT_SECURITY_L4) = Secure connection required
  57. endif # BT_EATT
  58. config BT_GATT_SERVICE_CHANGED
  59. bool "GATT Service Changed support"
  60. default y
  61. help
  62. This option enables support for the service changed characteristic.
  63. config BT_GATT_DYNAMIC_DB
  64. bool "GATT dynamic database support"
  65. depends on BT_GATT_SERVICE_CHANGED
  66. help
  67. This option enables registering/unregistering services at runtime.
  68. config BT_GATT_CACHING
  69. bool "GATT Caching support"
  70. default y
  71. depends on BT_GATT_SERVICE_CHANGED
  72. select TINYCRYPT
  73. select TINYCRYPT_AES
  74. select TINYCRYPT_AES_CMAC
  75. help
  76. This option enables support for GATT Caching. When enabled the stack
  77. will register Client Supported Features and Database Hash
  78. characteristics which can be used by clients to detect if anything has
  79. changed on the GATT database.
  80. if BT_GATT_CACHING
  81. config BT_GATT_NOTIFY_MULTIPLE
  82. bool "GATT Notify Multiple Characteristic Values support"
  83. depends on BT_GATT_CACHING
  84. default y
  85. help
  86. This option enables support for the GATT Notify Multiple
  87. Characteristic Values procedure.
  88. config BT_GATT_ENFORCE_CHANGE_UNAWARE
  89. bool "GATT Enforce change-unaware state"
  90. depends on BT_GATT_CACHING
  91. help
  92. When enable this option blocks notification and indications to client
  93. to conform to the following statement from the Bluetooth 5.1
  94. specification:
  95. '...the server shall not send notifications and indications to such
  96. a client until it becomes change-aware."
  97. In case the service cannot deal with sudden errors (-EAGAIN) then it
  98. shall not use this option.
  99. endif # BT_GATT_CACHING
  100. config BT_GATT_CLIENT
  101. bool "GATT client support"
  102. help
  103. This option enables support for the GATT Client role.
  104. config BT_GATT_READ_MULTIPLE
  105. bool "GATT Read Multiple Characteristic Values support"
  106. default y
  107. help
  108. This option enables support for the GATT Read Multiple Characteristic
  109. Values procedure.
  110. config BT_GAP_AUTO_UPDATE_CONN_PARAMS
  111. bool "Automatic Update of Connection Parameters"
  112. default y
  113. depends on BT_PERIPHERAL
  114. help
  115. This option if enabled allows automatically sending request for connection
  116. parameters update after GAP recommended 5 seconds of connection as
  117. peripheral.
  118. config BT_GAP_PERIPHERAL_PREF_PARAMS
  119. bool "Configure peripheral preferred connection parameters"
  120. default y
  121. depends on BT_PERIPHERAL
  122. help
  123. This allows to configure peripheral preferred connection parameters.
  124. Enabling this option results in adding PPCP characteristic in GAP.
  125. If disabled it is up to application to set expected connection parameters.
  126. if BT_GAP_PERIPHERAL_PREF_PARAMS
  127. config BT_PERIPHERAL_PREF_MIN_INT
  128. int "Peripheral preferred minimum connection interval in 1.25ms units"
  129. default 24
  130. range 6 65535
  131. help
  132. Range 3200 to 65534 is invalid. 65535 represents no specific value.
  133. config BT_PERIPHERAL_PREF_MAX_INT
  134. int "Peripheral preferred maximum connection interval in 1.25ms units"
  135. default 40
  136. range 6 65535
  137. help
  138. Range 3200 to 65534 is invalid. 65535 represents no specific value.
  139. config BT_PERIPHERAL_PREF_SLAVE_LATENCY
  140. int "Peripheral preferred slave latency in Connection Intervals"
  141. default 0
  142. range 0 499
  143. config BT_PERIPHERAL_PREF_TIMEOUT
  144. int "Peripheral preferred supervision timeout in 10ms units"
  145. default 500
  146. range 10 65535
  147. help
  148. It is up to user to provide valid timeout which pass required minimum
  149. value: in milliseconds it shall be larger than
  150. "(1+ Conn_Latency) * Conn_Interval_Max * 2"
  151. where Conn_Interval_Max is given in milliseconds.
  152. Range 3200 to 65534 is invalid. 65535 represents no specific value.
  153. endif # BT_GAP_PERIPHERAL_PREF_PARAMS
  154. config BT_DEVICE_NAME_GATT_WRITABLE
  155. bool "Allow to write name by remote GATT clients"
  156. depends on BT_DEVICE_NAME_DYNAMIC
  157. default y
  158. help
  159. Enabling this option allows remote GATT clients to write to device
  160. name GAP characteristic.
  161. if BT_DEBUG
  162. config BT_DEBUG_ATT
  163. bool "Bluetooth Attribute Protocol (ATT) debug"
  164. help
  165. This option enables debug support for the Bluetooth
  166. Attribute Protocol (ATT).
  167. config BT_DEBUG_GATT
  168. bool "Bluetooth Generic Attribute Profile (GATT) debug"
  169. help
  170. This option enables debug support for the Bluetooth
  171. Generic Attribute Profile (GATT).
  172. endif # BT_DEBUG
  173. endmenu