Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/targets/f6/furi_hal/furi_hal_bt.c')
-rwxr-xr-x[-rw-r--r--]firmware/targets/f6/furi_hal/furi_hal_bt.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/firmware/targets/f6/furi_hal/furi_hal_bt.c b/firmware/targets/f6/furi_hal/furi_hal_bt.c
index 7147c7f0..4465f15e 100644..100755
--- a/firmware/targets/f6/furi_hal/furi_hal_bt.c
+++ b/firmware/targets/f6/furi_hal/furi_hal_bt.c
@@ -42,6 +42,13 @@ FuriHalBtProfileConfig profile_config[FuriHalBtProfileNumber] = {
.bonding_mode = true,
.pairing_method = GapPairingPinCodeShow,
.mac_address = FURI_HAL_BT_DEFAULT_MAC_ADDR,
+ .conn_param =
+ {
+ .conn_int_min = 0x08,
+ .conn_int_max = 0x18,
+ .slave_latency = 0,
+ .supervisor_timeout = 50,
+ },
},
},
[FuriHalBtProfileHidKeyboard] =
@@ -55,6 +62,14 @@ FuriHalBtProfileConfig profile_config[FuriHalBtProfileNumber] = {
.bonding_mode = true,
.pairing_method = GapPairingPinCodeVerifyYesNo,
.mac_address = FURI_HAL_BT_DEFAULT_MAC_ADDR,
+ // TODO optimize
+ .conn_param =
+ {
+ .conn_int_min = 0x12,
+ .conn_int_max = 0x1e,
+ .slave_latency = 6,
+ .supervisor_timeout = 700,
+ },
},
},
};
@@ -277,6 +292,16 @@ void furi_hal_bt_nvm_sram_sem_release() {
HAL_HSEM_Release(CFG_HW_BLE_NVM_SRAM_SEMID, 0);
}
+bool furi_hal_bt_clear_white_list() {
+ furi_hal_bt_nvm_sram_sem_acquire();
+ tBleStatus status = aci_gap_clear_security_db();
+ if(status) {
+ FURI_LOG_E(TAG, "Clear while list failed with status %d", status);
+ }
+ furi_hal_bt_nvm_sram_sem_release();
+ return status != BLE_STATUS_SUCCESS;
+}
+
void furi_hal_bt_dump_state(string_t buffer) {
if(furi_hal_bt_is_alive()) {
uint8_t HCI_Version;