diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-06-29 00:37:11 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-07-17 22:43:40 -0400 |
commit | 3796f76c56d42ca9b4fd36edae7f6bf6656009b9 (patch) | |
tree | 367eaa4b9c7b80c1e0d8a5f196668c2c911a4137 /app/src/ble.c | |
parent | f6110a632d0ddbc0a9ebd7bfd4997366f95facfd (diff) |
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.
Diffstat (limited to 'app/src/ble.c')
-rw-r--r-- | app/src/ble.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <bluetooth/gatt.h> #include <zmk/keys.h> +#include <zmk/split/bluetooth/service.h> 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) |