From e9cdf30bbcdc3ad1eebaf0d535ba80c0cc39a66b Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 13 Jun 2023 14:28:42 +0200 Subject: [PATCH] gatt_client: add bearer type --- src/ble/gatt_client.c | 2 ++ src/ble/gatt_client.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ble/gatt_client.c b/src/ble/gatt_client.c index fc01b5be2..0caf8f27d 100644 --- a/src/ble/gatt_client.c +++ b/src/ble/gatt_client.c @@ -179,6 +179,7 @@ static uint8_t gatt_client_provide_context_for_handle(hci_con_handle_t con_handl return ERROR_CODE_MEMORY_CAPACITY_EXCEEDED; } // init state + gatt_client->bearer_type = ATT_BEARER_UNENHANCED_LE; gatt_client->con_handle = con_handle; gatt_client->mtu = ATT_DEFAULT_MTU; gatt_client->security_level = gatt_client_le_security_level_for_connection(con_handle); @@ -2813,6 +2814,7 @@ uint8_t gatt_client_classic_connect(btstack_packet_handler_t callback, bd_addr_t return ERROR_CODE_MEMORY_CAPACITY_EXCEEDED; } // init state + gatt_client->bearer_type = ATT_BEARER_UNENHANCED_CLASSIC; gatt_client->con_handle = HCI_CON_HANDLE_INVALID; memcpy(gatt_client->addr, addr, 6); gatt_client->mtu = ATT_DEFAULT_MTU; diff --git a/src/ble/gatt_client.h b/src/ble/gatt_client.h index ff1c133b6..704ecbad4 100644 --- a/src/ble/gatt_client.h +++ b/src/ble/gatt_client.h @@ -163,6 +163,8 @@ typedef struct gatt_client{ hci_con_handle_t con_handle; + att_bearer_type_t bearer_type; + #ifdef ENABLE_GATT_OVER_CLASSIC bd_addr_t addr; uint16_t l2cap_psm;