This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_BT_GATT_AUTO_SEC_REQ

Automatic security re-establishment request as a peripheral

Type: bool

Help

This option requests security re-establishment automatically whenever
a reconnection to a GATT client is established and
there are notifiable or indicatable characteristics for which security
is required. This configuration option only applies to the peripheral
role, which sends a Security Request for this purpose.
When disabled, it is the application's responsibility to call
bt_conn_set_security() to re-establish security prior to sending any
notifications or indications on the characteristics that require
security (unless the central does that first).
This option has been introduced to avoid interoperability issues with
commercially available central devices that react negatively to
receiving a Security Request immediately after reconnection.

Direct dependencies

BT_SMP && BT_CONN && BT_HCI_HOST && BT_HCI && BT

(Includes any dependencies from ifs and menus.)

Default

  • y

Kconfig definition

At subsys/bluetooth/host/Kconfig.gatt:58

Included via Kconfig:8Kconfig.zephyr:42subsys/Kconfig:9subsys/bluetooth/Kconfig:323subsys/bluetooth/host/Kconfig:450

Menu path: (Top) → Sub Systems and OS Services → Bluetooth → ATT and GATT Options

config BT_GATT_AUTO_SEC_REQ
    bool "Automatic security re-establishment request as a peripheral"
    default y
    depends on BT_SMP && BT_CONN && BT_HCI_HOST && BT_HCI && BT
    help
      This option requests security re-establishment automatically whenever
      a reconnection to a GATT client is established and
      there are notifiable or indicatable characteristics for which security
      is required. This configuration option only applies to the peripheral
      role, which sends a Security Request for this purpose.
      When disabled, it is the application's responsibility to call
      bt_conn_set_security() to re-establish security prior to sending any
      notifications or indications on the characteristics that require
      security (unless the central does that first).
      This option has been introduced to avoid interoperability issues with
      commercially available central devices that react negatively to
      receiving a Security Request immediately after reconnection.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)