mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-11 00:40:00 +00:00
hci: check if Read Remote Extended Features Command is implemented
This commit is contained in:
parent
d505770669
commit
8d2d8af11c
@ -2051,12 +2051,14 @@ static void event_handler(uint8_t *packet, int size){
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+14] & 0x80) >> 7) | // bit 0 = Octet 14, bit 7 / Read Buffer Size
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+24] & 0x40) >> 5) | // bit 1 = Octet 24, bit 6 / Write Le Host Supported
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+10] & 0x10) >> 2) | // bit 2 = Octet 10, bit 4 / Write Synchronous Flow Control Enable
|
||||
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+18] & 0x08) | // bit 3 = Octet 18, bit 3 / Write Default Erroneous Data Reporting
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+18] & 0x08) ) | // bit 3 = Octet 18, bit 3 / Write Default Erroneous Data Reporting
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+34] & 0x01) << 4) | // bit 4 = Octet 34, bit 0 / LE Write Suggested Default Data Length
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+35] & 0x08) << 2) | // bit 5 = Octet 35, bit 3 / LE Read Maximum Data Length
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+35] & 0x20) << 1) | // bit 6 = Octet 35, bit 5 / LE Set Default PHY
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+20] & 0x10) << 3); // bit 7 = Octet 20, bit 4 / Read Encryption Key Size
|
||||
log_info("Local supported commands summary 0x%02x", hci_stack->local_supported_commands[0]);
|
||||
hci_stack->local_supported_commands[1] =
|
||||
((packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+ 2] & 0x40) >> 6); // bit 8 = Octet 2, bit 6 / Read Remote Extended Features
|
||||
log_info("Local supported commands summary %02x - %02x", hci_stack->local_supported_commands[0], hci_stack->local_supported_commands[1]);
|
||||
}
|
||||
#ifdef ENABLE_CLASSIC
|
||||
else if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_write_synchronous_flow_control_enable)){
|
||||
|
@ -806,7 +806,8 @@ typedef struct {
|
||||
/* 5 - LE Read Maximum Data Length (Octet 35/bit 3) */
|
||||
/* 6 - LE Set Default PHY (Octet 35/bit 5) */
|
||||
/* 7 - Read Encryption Key Size (Octet 20/bit 4) */
|
||||
uint8_t local_supported_commands[1];
|
||||
/* 8 - Read Remote Extended Features (Octet 2/bit 5) */
|
||||
uint8_t local_supported_commands[2];
|
||||
|
||||
/* bluetooth device information from hci read local version information */
|
||||
// uint16_t hci_version;
|
||||
|
Loading…
x
Reference in New Issue
Block a user