Skip to content

Commit

Permalink
Add option to disable ble service change registration
Browse files Browse the repository at this point in the history
Add option to disable automatic registration of BLE Gattc
service change notify. Which sends in parralel
(with user message flow) commands to BLE server which
sometime leads to GATT_BUSY.
(BLE server is able to handle only one command at time)

add -DCONFIG_BLE_DISABLE_SRVCHG_REG to use it

Solving Issue 1575
  • Loading branch information
jedi7 committed Mar 2, 2018
1 parent 37765d0 commit 5f551f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/bt/bluedroid/bta/gatt/bta_gattc_act.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ void bta_gattc_read_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
} else {
cb_data.read.handle = p_clcb->p_q_cmd->api_read.handle;
}

if (p_clcb->p_q_cmd->hdr.event != BTA_GATTC_API_READ_MULTI_EVT) {
event = p_clcb->p_q_cmd->api_read.cmpl_evt;
} else {
Expand Down Expand Up @@ -1625,7 +1625,9 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,

if ((transport == BT_TRANSPORT_LE) && (connected == TRUE) && (p_conn != NULL) \
&& (p_conn->service_change_ccc_written == FALSE) && (p_conn->ccc_timer_used == FALSE)) {
#ifndef CONFIG_BLE_DISABLE_SRVCHG_REG
result = bta_gattc_register_service_change_notify(conn_id, bda, &start_ccc_timer);
#endif
if (start_ccc_timer == TRUE) {
TIMER_LIST_ENT *ccc_timer = &(p_conn->service_change_ccc_timer);
/* start a 1000ms timer to wait for service discovery finished */
Expand Down

0 comments on commit 5f551f0

Please sign in to comment.