From 838e632c8e6b0fe7b34f65aba8f00d42566104f8 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 30 Jan 2018 19:11:23 +0100 Subject: [PATCH] gatt_client: drop gatt_client_pts_suppress_mtu_exchange function, replaced by gatt_client_mtu_enable_auto_negotiation(0) --- src/ble/gatt_client.c | 11 ----------- src/ble/gatt_client.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/ble/gatt_client.c b/src/ble/gatt_client.c index 271409222..7dc118af6 100644 --- a/src/ble/gatt_client.c +++ b/src/ble/gatt_client.c @@ -65,7 +65,6 @@ static btstack_linked_list_t gatt_client_connections; static btstack_linked_list_t gatt_client_value_listeners; static btstack_packet_callback_registration_t hci_event_callback_registration; -static uint8_t pts_suppress_mtu_exchange; static uint8_t mtu_exchange_enabled; @@ -87,7 +86,6 @@ static uint16_t peripheral_mtu(gatt_client_t *peripheral){ void gatt_client_init(void){ gatt_client_connections = NULL; - pts_suppress_mtu_exchange = 0; mtu_exchange_enabled = 1; // regsister for HCI Events hci_event_callback_registration.callback = &gatt_client_hci_event_packet_handler; @@ -160,11 +158,6 @@ static gatt_client_t * provide_context_for_conn_handle(hci_con_handle_t con_hand } context->gatt_client_state = P_READY; btstack_linked_list_add(&gatt_client_connections, (btstack_linked_item_t*)context); - - // skip mtu exchange for testing sm with pts - if (pts_suppress_mtu_exchange){ - context->mtu_state = MTU_EXCHANGED; - } return context; } @@ -1879,10 +1872,6 @@ uint8_t gatt_client_cancel_write(btstack_packet_handler_t callback, hci_con_hand return 0; } -void gatt_client_pts_suppress_mtu_exchange(void){ - pts_suppress_mtu_exchange = 1; -} - void gatt_client_deserialize_service(const uint8_t *packet, int offset, gatt_client_service_t *service){ service->start_group_handle = little_endian_read_16(packet, offset); service->end_group_handle = little_endian_read_16(packet, offset + 2); diff --git a/src/ble/gatt_client.h b/src/ble/gatt_client.h index 64cd65825..654309773 100644 --- a/src/ble/gatt_client.h +++ b/src/ble/gatt_client.h @@ -220,7 +220,7 @@ void gatt_client_init(void); uint8_t gatt_client_get_mtu(hci_con_handle_t con_handle, uint16_t * mtu); /** -* @brief Sets whether a MTU Exchange Request shall be automatically send before the first attribute read request is send. +* @brief Sets whether a MTU Exchange Request shall be automatically send before the first attribute read request is send. Default is enable.d */ void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled);