From 42292686d9dcfa7083d49bf4a3a990826fe8d4a3 Mon Sep 17 00:00:00 2001 From: Mateusz Kapala Date: Tue, 24 Sep 2024 12:04:47 +0200 Subject: [PATCH] samples: bluetooth: fast_pair: locator_tag: Use SMP UUIDs from header Replace the custom mcumgr SMP BT UUIDs with the ones available in the smp_bt.h header file from Zephyr. Jira: NCSDK-28457 Signed-off-by: Mateusz Kapala --- .../bluetooth/fast_pair/locator_tag/src/dfu.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/samples/bluetooth/fast_pair/locator_tag/src/dfu.c b/samples/bluetooth/fast_pair/locator_tag/src/dfu.c index 17e567ad6ea1..b2456eaa52e8 100644 --- a/samples/bluetooth/fast_pair/locator_tag/src/dfu.c +++ b/samples/bluetooth/fast_pair/locator_tag/src/dfu.c @@ -14,6 +14,8 @@ #include #include +#include + #include "app_dfu.h" #include "app_factory_reset.h" #include "app_fp_adv.h" @@ -25,17 +27,7 @@ LOG_MODULE_DECLARE(fp_fmdn, LOG_LEVEL_INF); /* DFU mode timeout in minutes. */ #define DFU_MODE_TIMEOUT_MIN (5) -/* UUID of the SMP service used for the DFU. */ -#define BT_UUID_SMP_SVC_VAL \ - BT_UUID_128_ENCODE(0x8d53dc1d, 0x1db7, 0x4cd3, 0x868b, 0x8a527460aa84) - -/* UUID of the SMP characteristic used for the DFU. */ -#define BT_UUID_SMP_CHAR_VAL \ - BT_UUID_128_ENCODE(0xda2e7828, 0xfbce, 0x4e01, 0xae9e, 0x261174997c48) - -#define BT_UUID_SMP_CHAR BT_UUID_DECLARE_128(BT_UUID_SMP_CHAR_VAL) - -static const struct bt_data data = BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_SMP_SVC_VAL); +static const struct bt_data data = BT_DATA_BYTES(BT_DATA_UUID128_ALL, SMP_BT_SVC_UUID_VAL); static bool dfu_mode; APP_FP_ADV_TRIGGER_REGISTER(fp_adv_trigger_dfu, "dfu"); @@ -83,7 +75,7 @@ APP_FACTORY_RESET_CALLBACKS_REGISTER(factory_reset_cbs, dfu_factory_reset_prepar bool app_dfu_bt_gatt_operation_allow(const struct bt_uuid *uuid) { - if (bt_uuid_cmp(uuid, BT_UUID_SMP_CHAR) != 0) { + if (bt_uuid_cmp(uuid, SMP_BT_CHR_UUID) != 0) { return true; }