diff --git a/src/hci.c b/src/hci.c index 6bc1c38a0..893f842d3 100644 --- a/src/hci.c +++ b/src/hci.c @@ -4367,6 +4367,12 @@ int hci_get_sco_packet_length(void){ } #endif + +HCI_STATE hci_get_state(void){ + return hci_stack->state; +} + + /** * @brief Set callback for Bluetooth Hardware Error */ diff --git a/src/hci.h b/src/hci.h index 88dae1f05..64557dbb7 100644 --- a/src/hci.h +++ b/src/hci.h @@ -1109,6 +1109,11 @@ uint16_t hci_get_manufacturer(void); */ void hci_disable_l2cap_timeout_check(void); +/** + * Get state + */ +HCI_STATE hci_get_state(void); + #if defined __cplusplus } #endif