diff --git a/app/Kconfig b/app/Kconfig index e1c4ada9f..7f5b25732 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -210,6 +210,10 @@ config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE config ZMK_BLE_CLEAR_BONDS_ON_START bool "Configuration that clears all bond information from the keyboard on startup." +config ZMK_BLE_PROFILE_ADVERTISING + bool "Advertise on BLE profiles" + default y + # HID GATT notifications sent this way are *not* picked up by Linux, and possibly others. config BT_GATT_NOTIFY_MULTIPLE default n diff --git a/app/src/ble.c b/app/src/ble.c index 51b172b9f..64ca3880a 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -175,6 +175,13 @@ bool zmk_ble_profile_is_connected(uint8_t index) { advertising_status = ZMK_ADV_CONN; int update_advertising(void) { +#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) +#if !IS_ENABLED(CONFIG_ZMK_BLE_PROFILE_ADVERTISING) + LOG_INF("skipping advertising since profile advertising is disabled"); + return 0; +#endif +#endif + int err = 0; bt_addr_le_t *addr; struct bt_conn *conn;