Skip to content

Bluetooth: CCC connected change event #81056

@alwa-nordic

Description

@alwa-nordic

As a developer of a GATT service making use of notifications, I may need to send notifications continuously when a client is connected and subscribed. The notifications may be tailored to the connections.

I would like a signal telling me when a client is connected and subscribed to notifications, and likewise for indications.

Alternatives:

  • Poll _bt_gatt_ccc.cfg periodically. There may be some happens-to-work solution to avoid the periodic scanning by listening for _bt_gatt_ccc.write, bt_conn_cb.connected, bt_conn_cb.disconnected, but AFAIK these are not ordered with respect to the change in _bt_gatt_ccc.cfg.

Non-alternatives:

  • _bt_gatt_ccc.cfg_changed: Signals a change to _bt_gatt_ccc.value, which is a summary.
  • _bt_gatt_ccc.cfg_write: Callback for the ATT write. Does not react to a bonded subscribed client connecting. Does not react to disconnection.

Possibly relevant discussion: #79822

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions