Skip to content

Commit 5d6688b

Browse files
committed
hci: add ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT
1 parent 028ead5 commit 5d6688b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/manual/docs-template/how_to.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ BTstack properties:
9898
| ENABLE_LE_PERIPHERAL | Enable support for LE Peripheral Role in HCI and Security Manager |
9999
| ENABLE_LE_CENTRAL | Enable support for LE Central Role in HCI and Security Manager |
100100
| ENABLE_LE_SECURE_CONNECTIONS | Enable LE Secure Connections |
101-
| ENABLE_LE_SECURE_CONNECTIONS_DEBUG_KEY | Enable support for LE Secure Connection debug keys for testing |
101+
| ENABLE_LE_SECURE_CONNECTIONS_DEBUG_KEY | Enable support for LE Secure Connection debug keys for testing |
102102
| ENABLE_LE_PROACTIVE_AUTHENTICATION | Enable automatic encryption for bonded devices on re-connect |
103103
| ENABLE_GATT_CLIENT_PAIRING | Enable GATT Client to start pairing and retry operation on security error |
104104
| ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS | Use [micro-ecc library](https://github.com/kmackay/micro-ecc) for ECC operations |
105105
| ENABLE_LE_DATA_LENGTH_EXTENSION | Enable LE Data Length Extension support |
106+
| ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT | Enable LE Enhanced Connection Complete Event v1 & v2 |
106107
| ENABLE_LE_EXTENDED_ADVERTISING | Enable extended advertising and scanning |
107108
| ENABLE_LE_PERIODIC_ADVERTISING | Enable periodic advertising and scanning |
108109
| ENABLE_LE_SIGNED_WRITE | Enable LE Signed Writes in ATT/GATT |

src/hci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,11 @@ static void hci_initializing_run(void){
22722272
case HCI_INIT_LE_SET_EVENT_MASK:
22732273
if (hci_le_supported()){
22742274
hci_stack->substate = HCI_INIT_W4_LE_SET_EVENT_MASK;
2275+
#ifdef ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT
2276+
hci_send_cmd(&hci_le_set_event_mask, 0xffffffff, 0x07); // all events from core v5.3
2277+
#else
22752278
hci_send_cmd(&hci_le_set_event_mask, 0xfffffdff, 0x07); // all events from core v5.3 without LE Enhanced Connection Complete
2279+
#endif
22762280
break;
22772281
}
22782282
#endif

0 commit comments

Comments
 (0)