Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a76998 authored by Md Shahriar Hossain Sajib's avatar Md Shahriar Hossain Sajib Committed by Ugo Yu
Browse files

Configurable Generic Attribute service handles in ServiceChanged indications

Using generic config variables to handle service change indications to
handle device specific behaviors.

Bug: 199827901
Test: gd/cert/run
Tag: #compatibility
Change-Id: Id584a46857b2af6f75dddc96215610c21b6fa59f
parent 98bae56c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -262,6 +262,14 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) {
#define GATT_GAP_START_HANDLE 20
#define GATT_APP_START_HANDLE 40

#ifndef GATT_DEFAULT_START_HANDLE
#define GATT_DEFAULT_START_HANDLE GATT_GATT_START_HANDLE
#endif

#ifndef GATT_LAST_HANDLE
#define GATT_LAST_HANDLE 0xFFFF
#endif

typedef struct hdl_cfg {
  uint16_t gatt_start_hdl;
  uint16_t gap_start_hdl;
+2 −2
Original line number Diff line number Diff line
@@ -867,8 +867,8 @@ void gatt_send_srv_chg_ind(const RawAddress& peer_bda) {

  uint8_t handle_range[GATT_SIZE_OF_SRV_CHG_HNDL_RANGE];
  uint8_t* p = handle_range;
  UINT16_TO_STREAM(p, 1);
  UINT16_TO_STREAM(p, 0xFFFF);
  UINT16_TO_STREAM(p, GATT_DEFAULT_START_HANDLE);
  UINT16_TO_STREAM(p, GATT_LAST_HANDLE);
  GATTS_HandleValueIndication(conn_id, gatt_cb.handle_of_h_r,
                              GATT_SIZE_OF_SRV_CHG_HNDL_RANGE, handle_range);
}