diff --git a/src/hci.c b/src/hci.c index d2a7607f1..b8a5af99f 100644 --- a/src/hci.c +++ b/src/hci.c @@ -2214,6 +2214,12 @@ le_command_status_t le_central_stop_scan(){ return BLE_PERIPHERAL_OK; } +void le_central_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window){ + hci_stack->le_scan_type = scan_type; + hci_stack->le_scan_interval = scan_interval; + hci_stack->le_scan_window = scan_window; + hci_run(); +} le_command_status_t le_central_connect(bd_addr_t * addr, bd_addr_type_t addr_type){ hci_connection_t * conn = hci_connection_for_bd_addr_and_type(addr, addr_type); diff --git a/src/hci.h b/src/hci.h index 3e5b02300..32b1ec7e8 100644 --- a/src/hci.h +++ b/src/hci.h @@ -424,6 +424,7 @@ le_command_status_t le_central_stop_scan(); le_command_status_t le_central_connect(bd_addr_t * addr, bd_addr_type_t addr_type); le_command_status_t le_central_connect_cancel(); le_command_status_t gap_disconnect(hci_con_handle_t handle); +void le_central_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window); //*************** le client end