Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing"
select RING_BUFFER

# Modifying Start: Disable BLE HID host advertising for USB dongle receivers.
config ZMK_BLE_DISABLE_HOST_ADV
bool "Disable BLE HID host advertising"
help
Disable BLE HID advertising to host devices while keeping BLE enabled.
This is useful for USB dongle receivers that still need BLE split central
communication with peripherals.
# End of Modifying

config BT_SMP_ALLOW_UNAUTH_OVERWRITE
imply ZMK_BLE_PASSKEY_ENTRY

Expand Down
9 changes: 9 additions & 0 deletions app/src/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ int update_advertising(void) {
struct bt_conn *conn;
enum advertising_type desired_adv = ZMK_ADV_NONE;

/* Modifying Start: Disable BLE HID host advertising for USB dongle receivers. */
if (IS_ENABLED(CONFIG_ZMK_BLE_DISABLE_HOST_ADV)) {
if (advertising_status != ZMK_ADV_NONE) {
CHECKED_ADV_STOP();
}
return 0;
}
/* End of Modifying */

if (zmk_ble_active_profile_is_open()) {
desired_adv = ZMK_ADV_CONN;
} else if (!zmk_ble_active_profile_is_connected()) {
Expand Down