mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/disable_ble_service_change_pr1673' into 'master'
Add option to ena/dis BLE service change registration See merge request idf/esp-idf!2210
This commit is contained in:
commit
088c73bd22
@ -168,6 +168,15 @@ config BLE_SMP_ENABLE
|
||||
help
|
||||
This option can be close when the app not used the ble security connect.
|
||||
|
||||
config BLE_ENABLE_SRVCHG_REG
|
||||
bool "Enable automatic service change notify registration"
|
||||
depends on BLUEDROID_ENABLED
|
||||
default y
|
||||
help
|
||||
This option enables automatic registration of service change notification
|
||||
after connect. Be careful, it can may collide with your command sequences
|
||||
and lead to GATT_BUSY.
|
||||
|
||||
config BT_STACK_NO_LOG
|
||||
bool "Close the bluedroid bt stack log print"
|
||||
depends on BLUEDROID_ENABLED
|
||||
|
@ -1635,7 +1635,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)) {
|
||||
#ifdef CONFIG_BLE_ENABLE_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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user