mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 03:35:20 +00:00
hci: read local name during init
This commit is contained in:
parent
92c070be58
commit
e90bae0148
@ -957,6 +957,10 @@ static void hci_initializing_run(void){
|
||||
hci_send_cmd(&hci_read_local_version_information);
|
||||
hci_stack->substate = HCI_INIT_W4_SEND_READ_LOCAL_VERSION_INFORMATION;
|
||||
break;
|
||||
case HCI_INIT_SEND_READ_LOCAL_NAME:
|
||||
hci_send_cmd(&hci_read_local_name);
|
||||
hci_stack->substate = HCI_INIT_W4_SEND_READ_LOCAL_NAME;
|
||||
break;
|
||||
case HCI_INIT_SEND_RESET_CSR_WARM_BOOT:
|
||||
hci_state_reset();
|
||||
// prepare reset if command complete not received in 100ms
|
||||
@ -1277,8 +1281,8 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
||||
case HCI_INIT_W4_SEND_RESET:
|
||||
btstack_run_loop_remove_timer(&hci_stack->timeout);
|
||||
break;
|
||||
case HCI_INIT_W4_SEND_READ_LOCAL_VERSION_INFORMATION:
|
||||
log_info("Received local version info, need baud change %d", need_baud_change);
|
||||
case HCI_INIT_W4_SEND_READ_LOCAL_NAME:
|
||||
log_info("Received local name, need baud change %d", need_baud_change);
|
||||
if (need_baud_change){
|
||||
hci_stack->substate = HCI_INIT_SEND_BAUD_CHANGE;
|
||||
return;
|
||||
|
@ -450,6 +450,8 @@ typedef enum hci_init_state{
|
||||
HCI_INIT_W4_SEND_RESET,
|
||||
HCI_INIT_SEND_READ_LOCAL_VERSION_INFORMATION,
|
||||
HCI_INIT_W4_SEND_READ_LOCAL_VERSION_INFORMATION,
|
||||
HCI_INIT_SEND_READ_LOCAL_NAME,
|
||||
HCI_INIT_W4_SEND_READ_LOCAL_NAME,
|
||||
|
||||
HCI_INIT_SEND_BAUD_CHANGE,
|
||||
HCI_INIT_W4_SEND_BAUD_CHANGE,
|
||||
|
@ -576,6 +576,12 @@ const hci_cmd_t hci_write_local_name = {
|
||||
OPCODE(OGF_CONTROLLER_BASEBAND, 0x13), "N"
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
const hci_cmd_t hci_read_local_name = {
|
||||
OPCODE(OGF_CONTROLLER_BASEBAND, 0x14), ""
|
||||
};
|
||||
|
||||
/**
|
||||
* @param page_timeout (* 0.625 ms)
|
||||
*/
|
||||
|
@ -112,6 +112,7 @@ extern const hci_cmd_t hci_read_buffer_size;
|
||||
extern const hci_cmd_t hci_read_le_host_supported;
|
||||
extern const hci_cmd_t hci_read_link_policy_settings;
|
||||
extern const hci_cmd_t hci_read_link_supervision_timeout;
|
||||
extern const hci_cmd_t hci_read_local_name;
|
||||
extern const hci_cmd_t hci_read_local_version_information;
|
||||
extern const hci_cmd_t hci_read_local_supported_commands;
|
||||
extern const hci_cmd_t hci_read_local_supported_features;
|
||||
|
Loading…
x
Reference in New Issue
Block a user