From 3796f76c56d42ca9b4fd36edae7f6bf6656009b9 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 29 Jun 2020 00:37:11 -0400 Subject: Initial exploration of split BLE service. * Service for split peripheral to report position state to split central. * Updated advertising info. * Behavior for split BT until we have a proper event system. --- app/src/ble.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/src/ble.c') diff --git a/app/src/ble.c b/app/src/ble.c index c0e81a9..94a23da 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -12,6 +12,7 @@ #include #include +#include static struct bt_conn *auth_passkey_entry_conn; static u8_t passkey_entries[6] = {0, 0, 0, 0, 0, 0}; @@ -121,9 +122,13 @@ static struct bt_conn_auth_cb zmk_ble_auth_cb_display = { static const struct bt_data zmk_ble_ad[] = { BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), - BT_DATA_BYTES(BT_DATA_UUID16_ALL, + BT_DATA_BYTES(BT_DATA_UUID16_SOME, 0x12, 0x18, /* HID Service */ 0x0f, 0x18), /* Battery Service */ +#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) + BT_DATA_BYTES(BT_DATA_UUID128_SOME, + ZMK_SPLIT_BT_SERVICE_UUID) +#endif }; static void zmk_ble_ready(int err) -- cgit v1.2.3