mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
hci: fix init sequence if le central not supported
This commit is contained in:
parent
e691bb38f1
commit
903ea03a2f
@ -1416,11 +1416,17 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#ifdef ENABLE_BLE
|
||||
case HCI_INIT_W4_LE_READ_BUFFER_SIZE:
|
||||
// skip write le host if not supported (e.g. on LE only EM9301)
|
||||
if (hci_stack->local_supported_commands[0] & 0x02) break;
|
||||
hci_stack->substate = HCI_INIT_LE_SET_SCAN_PARAMETERS;
|
||||
#ifdef ENABLE_LE_CENTRAL
|
||||
hci_stack->substate = HCI_INIT_READ_WHITE_LIST_SIZE;
|
||||
#else
|
||||
hci_init_done();
|
||||
#endif
|
||||
return;
|
||||
#endif
|
||||
case HCI_INIT_W4_WRITE_LOCAL_NAME:
|
||||
// skip write eir data if no eir data set
|
||||
if (hci_stack->eir_data) break;
|
||||
|
@ -550,15 +550,20 @@ typedef enum hci_init_state{
|
||||
HCI_INIT_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING,
|
||||
HCI_INIT_W4_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING,
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
HCI_INIT_LE_READ_BUFFER_SIZE,
|
||||
HCI_INIT_W4_LE_READ_BUFFER_SIZE,
|
||||
HCI_INIT_WRITE_LE_HOST_SUPPORTED,
|
||||
HCI_INIT_W4_WRITE_LE_HOST_SUPPORTED,
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_LE_CENTRAL
|
||||
HCI_INIT_READ_WHITE_LIST_SIZE,
|
||||
HCI_INIT_W4_READ_WHITE_LIST_SIZE,
|
||||
|
||||
HCI_INIT_LE_SET_SCAN_PARAMETERS,
|
||||
HCI_INIT_W4_LE_SET_SCAN_PARAMETERS,
|
||||
#endif
|
||||
|
||||
HCI_INIT_DONE,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user