Skip to content

Commit

Permalink
host/ble_svc_gatt.c: return local Client supported features based on …
Browse files Browse the repository at this point in the history
…config

EATT supported bit is returned when EATT channel number is greater than 0
and Multiple Handle notification based on BLE_ATT_SVR_NOTIFY_MULTI.
  • Loading branch information
KKopyscinski committed Aug 18, 2023
1 parent 0379060 commit 71bbaaf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nimble/host/services/gatt/src/ble_svc_gatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ ble_svc_gatt_cl_sup_feat_access(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
if (ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) {
/* TODO For now just send 1*/
uint8_t eatt_supported = 2;
os_mbuf_append(ctxt->om, &eatt_supported, sizeof(eatt_supported));
uint8_t supported_feat =
(MYNEWT_VAL(BLE_EATT_CHAN_NUM) > 0) << 1 |
(MYNEWT_VAL(BLE_ATT_SVR_NOTIFY_MULTI) == 1) << 2;
os_mbuf_append(ctxt->om, &supported_feat, sizeof(supported_feat));
return 0;
}
if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
Expand Down

0 comments on commit 71bbaaf

Please sign in to comment.