gatt_client: add bearer type

This commit is contained in:
Matthias Ringwald 2023-06-13 14:28:42 +02:00
parent 9228fd328a
commit e9cdf30bbc
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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;