Loading system/stack/gatt/gatt_int.h +2 −8 Original line number Diff line number Diff line Loading @@ -259,6 +259,8 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) { } #undef CASE_RETURN_TEXT // If you change these values make sure to look at b/262219144 before. // Some platform rely on this to never changes #define GATT_GATT_START_HANDLE 1 #define GATT_GAP_START_HANDLE 20 #define GATT_GMCS_START_HANDLE 40 Loading @@ -266,14 +268,6 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) { #define GATT_TMAS_START_HANDLE 130 #define GATT_APP_START_HANDLE 134 #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; Loading system/stack/gatt/gatt_main.cc +9 −2 Original line number Diff line number Diff line Loading @@ -909,6 +909,13 @@ void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda) { /** This function is called to send a service chnaged indication to the * specified bd address */ void gatt_send_srv_chg_ind(const RawAddress& peer_bda) { static const uint16_t sGATT_DEFAULT_START_HANDLE = (uint16_t)osi_property_get_int32( "bluetooth.gatt.default_start_handle_for_srvc_change.value", GATT_GATT_START_HANDLE); static const uint16_t sGATT_LAST_HANDLE = (uint16_t)osi_property_get_int32( "bluetooth.gatt.last_handle_for_srvc_change.value", 0xFFFF); VLOG(1) << __func__; if (!gatt_cb.handle_of_h_r) return; Loading @@ -921,8 +928,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, GATT_DEFAULT_START_HANDLE); UINT16_TO_STREAM(p, GATT_LAST_HANDLE); UINT16_TO_STREAM(p, sGATT_DEFAULT_START_HANDLE); UINT16_TO_STREAM(p, sGATT_LAST_HANDLE); GATTS_HandleValueIndication(conn_id, gatt_cb.handle_of_h_r, GATT_SIZE_OF_SRV_CHG_HNDL_RANGE, handle_range); } Loading Loading
system/stack/gatt/gatt_int.h +2 −8 Original line number Diff line number Diff line Loading @@ -259,6 +259,8 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) { } #undef CASE_RETURN_TEXT // If you change these values make sure to look at b/262219144 before. // Some platform rely on this to never changes #define GATT_GATT_START_HANDLE 1 #define GATT_GAP_START_HANDLE 20 #define GATT_GMCS_START_HANDLE 40 Loading @@ -266,14 +268,6 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) { #define GATT_TMAS_START_HANDLE 130 #define GATT_APP_START_HANDLE 134 #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; Loading
system/stack/gatt/gatt_main.cc +9 −2 Original line number Diff line number Diff line Loading @@ -909,6 +909,13 @@ void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda) { /** This function is called to send a service chnaged indication to the * specified bd address */ void gatt_send_srv_chg_ind(const RawAddress& peer_bda) { static const uint16_t sGATT_DEFAULT_START_HANDLE = (uint16_t)osi_property_get_int32( "bluetooth.gatt.default_start_handle_for_srvc_change.value", GATT_GATT_START_HANDLE); static const uint16_t sGATT_LAST_HANDLE = (uint16_t)osi_property_get_int32( "bluetooth.gatt.last_handle_for_srvc_change.value", 0xFFFF); VLOG(1) << __func__; if (!gatt_cb.handle_of_h_r) return; Loading @@ -921,8 +928,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, GATT_DEFAULT_START_HANDLE); UINT16_TO_STREAM(p, GATT_LAST_HANDLE); UINT16_TO_STREAM(p, sGATT_DEFAULT_START_HANDLE); UINT16_TO_STREAM(p, sGATT_LAST_HANDLE); GATTS_HandleValueIndication(conn_id, gatt_cb.handle_of_h_r, GATT_SIZE_OF_SRV_CHG_HNDL_RANGE, handle_range); } Loading