hci: check if LE Data Length commands are supported

This commit is contained in:
Matthias Ringwald 2017-07-07 16:52:06 +02:00
parent f1042e9d0d
commit 220006fb3b
2 changed files with 8 additions and 4 deletions

View File

@ -1731,7 +1731,9 @@ 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
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+24] & 0x40) >> 5 | // bit 1 = Octet 24, bit 6
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+10] & 0x10) >> 2 | // bit 2 = Octet 10, bit 4
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+18] & 0x08); // bit 3 = Octet 18, bit 3
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+18] & 0x08) | // bit 3 = Octet 18, bit 3
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+34] & 0x01) << 4 | // bit 4 = Octet 34, bit 0
(packet[OFFSET_OF_DATA_IN_COMMAND_COMPLETE+1+35] & 0x08) << 2; // bit 5 = Octet 35, bit 3
log_info("Local supported commands summary 0x%02x", hci_stack->local_supported_commands[0]);
}
#ifdef ENABLE_CLASSIC

View File

@ -704,10 +704,12 @@ typedef struct {
uint8_t local_supported_features[8];
/* local supported commands summary - complete info is 64 bytes */
/* 0 - read buffer size */
/* 1 - write le host supported */
/* 0 - Read Buffer Size */
/* 1 - Write Le Host Supported */
/* 2 - Write Synchronous Flow Control Enable (Octet 10/bit 4) */
/* 3 - Write Default Erroneous Data Reporting (Octect 18/bit 3) */
/* 3 - Write Default Erroneous Data Reporting (Octet 18/bit 3) */
/* 4 - LE Write Suggested Default Data Length (Octet 34/bit 0) */
/* 5 - LE Read Maximum Data Length (Octet 35/bit 3) */
uint8_t local_supported_commands[1];
/* bluetooth device information from hci read local version information */