From 033d40c7732f2d9d775aac3f32c5ca3589c55bcd Mon Sep 17 00:00:00 2001 From: Kamil Piszczek Date: Thu, 6 Mar 2025 14:21:43 +0100 Subject: [PATCH] bluetooth: fast_pair: fmdn: add API for checking the provisioning state Added the new FMDN API - bt_fast_pair_fmdn_is_provisioned. The API can be used to check the device provisioning state synchronously. Changed the bt_fast_pair_fmdn_info_cb.provisioning_state_changed callback behavior. The callback no longer reports the initial provisioning state after the Fast Pair subsystem is enabled with the bt_fast_pair_enable API. Aligned the affected Fast Pair projects that use the FMDN extension. Ref: NCSDK-30856 Signed-off-by: Kamil Piszczek --- include/bluetooth/services/fast_pair/fmdn.h | 33 +++-- .../fast_pair/locator_tag/src/fp_adv.c | 61 +++++++-- .../fast_pair/locator_tag/src/main.c | 122 ++++++++++-------- .../services/fast_pair/fmdn/beacon_actions.c | 12 +- .../fmdn/include_priv/fp_fmdn_state.h | 6 - .../services/fast_pair/fmdn/read_mode.c | 4 +- .../bluetooth/services/fast_pair/fmdn/state.c | 34 ++--- west.yml | 2 +- 8 files changed, 171 insertions(+), 103 deletions(-) diff --git a/include/bluetooth/services/fast_pair/fmdn.h b/include/bluetooth/services/fast_pair/fmdn.h index a3fe634ccb82..65bbc8879f78 100644 --- a/include/bluetooth/services/fast_pair/fmdn.h +++ b/include/bluetooth/services/fast_pair/fmdn.h @@ -538,17 +538,18 @@ struct bt_fast_pair_fmdn_info_cb { /** @brief Indicate provisioning state changes. * * This callback is called to indicate that the FMDN accessory has been - * successfully provisioned or unprovisioned. + * successfully provisioned or unprovisioned by the connected Bluetooth + * peer. * - * This callback also reports the initial provisioning state when the - * user enables Fast Pair with the @ref bt_fast_pair_enable API. + * This callback does not report the initial provisioning state when the + * user enables Fast Pair with the @ref bt_fast_pair_enable API. To check + * the initial state, use the @ref bt_fast_pair_fmdn_is_provisioned API. * - * The first callback is executed in the workqueue context after the - * @ref bt_fast_pair_enable function call. Subsequent callbacks are - * also executed in the cooperative thread context. You can learn about - * the exact thread context by analyzing the @kconfig{CONFIG_BT_RECV_CONTEXT} - * configuration choice. By default, this callback is executed in the - * Bluetooth-specific workqueue thread (@kconfig{CONFIG_BT_RECV_WORKQ_BT}). + * This callback is executed in the cooperative thread context. You + * can learn about the exact thread context by analyzing the + * @kconfig{CONFIG_BT_RECV_CONTEXT} configuration choice. By default, this + * callback is executed in the Bluetooth-specific workqueue thread + * (@kconfig{CONFIG_BT_RECV_WORKQ_BT}). * * @param provisioned true if the accessory has been successfully provisioned. * false if the accessory has been successfully unprovisioned. @@ -559,6 +560,20 @@ struct bt_fast_pair_fmdn_info_cb { sys_snode_t node; }; +/** @brief Check the FMDN provisioning state. + * + * This function can be used to synchronously check the FMDN provisioning state. + * To track the provisioning state asynchronously, use the + * @ref bt_fast_pair_fmdn_info_cb.provisioning_state_changed callback. + * + * The function shall only be used after the Fast Pair module is enabled with the + * @ref bt_fast_pair_enable API. In the disabled state, this function always returns + * false. + * + * @return True if the device is provisioned, false otherwise. + */ +bool bt_fast_pair_fmdn_is_provisioned(void); + /** @brief Register the information callbacks in the FMDN module. * * This function registers the information callbacks. You can call this function only diff --git a/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c b/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c index 997a8fc33c62..7e224a2538e6 100644 --- a/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c +++ b/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c @@ -324,6 +324,7 @@ static void fp_advertising_update(void) static void fp_adv_connected(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_connected_info *info) { __ASSERT_NO_MSG(!fp_conn); + __ASSERT_NO_MSG(fp_adv_set); fp_adv_set_active = false; fp_adv_state_changed_notify(fp_adv_set_active); @@ -344,10 +345,14 @@ static bool fp_adv_rpa_expired(struct bt_le_ext_adv *adv) __ASSERT_NO_MSG(!k_is_preempt_thread()); __ASSERT_NO_MSG(!k_is_in_isr()); - __ASSERT_NO_MSG(is_enabled); + __ASSERT_NO_MSG(fp_adv_set); LOG_INF("Fast Pair: RPA expired"); + if (!fp_adv_set_active) { + LOG_INF("Fast Pair: RPA rotation in the inactive advertising state"); + } + if (!uptime) { uptime = k_uptime_get(); } else { @@ -369,6 +374,18 @@ static bool fp_adv_rpa_expired(struct bt_le_ext_adv *adv) LOG_INF("Fast Pair: setting RPA timeout to %d [s]", next_rpa_timeout); } + } else { + if (!fp_adv_set_active) { + /* Keep the RPA in the valid state to ensure that the RPA expired callback + * will be received on a forced RPA rotation during the FMDN unprovisioning + * operation. The forced RPA rotation allows the Fast Pair advertising set + * to take control from the FMDN advertising set over the RPA timeout. The + * RPA expired callback will not be received if any RPA rotation was + * previously allowed here in the provisioned state and with inactive Fast + * Pair advertising set. + */ + expire_rpa = false; + } } if (fp_adv_mode == APP_FP_ADV_MODE_DISCOVERABLE) { @@ -394,6 +411,25 @@ static bool fp_adv_rpa_expired(struct bt_le_ext_adv *adv) return expire_rpa; } +static int fp_adv_set_rotate(void) +{ + int err; + struct bt_le_oob oob; + + __ASSERT(fp_adv_set, "Fast Pair: invalid state of the advertising set"); + + /* Force the RPA rotation to synchronize the Fast Pair advertising + * payload with its RPA address using rpa_expired callback. + */ + err = bt_le_oob_get_local(fp_adv_param.id, &oob); + if (err) { + LOG_ERR("Fast Pair: bt_le_oob_get_local failed: %d", err); + return err; + } + + return 0; +} + static int fp_adv_set_setup(void) { int err; @@ -502,16 +538,7 @@ static void fp_adv_provisioning_state_changed(bool provisioned) } if (!provisioned) { - int err; - struct bt_le_oob oob; - - /* Force the RPA rotation to synchronize the Fast Pair advertising - * payload with its RPA address using rpa_expired callback. - */ - err = bt_le_oob_get_local(fp_adv_param.id, &oob); - if (err) { - LOG_ERR("Fast Pair: bt_le_oob_get_local failed: %d", err); - } + (void) fp_adv_set_rotate(); } else { fp_adv_rpa_suspension_cancel(); } @@ -688,13 +715,23 @@ int app_fp_adv_enable(void) return 0; } + fp_account_key_present = bt_fast_pair_has_account_key(); + fmdn_provisioned = bt_fast_pair_fmdn_is_provisioned(); + err = fp_adv_set_setup(); if (err) { LOG_ERR("Fast Pair: fp_adv_set_setup failed (err %d)", err); return err; } - fp_account_key_present = bt_fast_pair_has_account_key(); + if (!fmdn_provisioned) { + err = fp_adv_set_rotate(); + if (err) { + LOG_ERR("Fast Pair: fp_adv_set_rotate failed: %d", err); + (void) fp_adv_set_teardown(); + return err; + } + } fp_adv_mode_update(); diff --git a/samples/bluetooth/fast_pair/locator_tag/src/main.c b/samples/bluetooth/fast_pair/locator_tag/src/main.c index 4a7af491b050..cb64d689a234 100644 --- a/samples/bluetooth/fast_pair/locator_tag/src/main.c +++ b/samples/bluetooth/fast_pair/locator_tag/src/main.c @@ -79,7 +79,6 @@ APP_FP_ADV_TRIGGER_REGISTER(fp_adv_trigger_fmdn_provisioning, "fmdn_provisioning */ APP_FP_ADV_TRIGGER_REGISTER(fp_adv_trigger_ui, "ui"); -static bool factory_reset_executed; static enum factory_reset_trigger factory_reset_trigger; static void init_work_handle(struct k_work *w); @@ -87,6 +86,22 @@ static void init_work_handle(struct k_work *w); static K_SEM_DEFINE(init_work_sem, 0, 1); static K_WORK_DEFINE(init_work, init_work_handle); +static void fmdn_provisioning_state_set(bool provisioned) +{ + __ASSERT_NO_MSG(bt_fast_pair_is_ready()); + __ASSERT_NO_MSG(bt_fast_pair_fmdn_is_provisioned() == provisioned); + + if (fmdn_provisioned == provisioned) { + return; + } + + LOG_INF("FMDN: state changed to %s", + provisioned ? "provisioned" : "unprovisioned"); + + app_ui_state_change_indicate(APP_UI_STATE_PROVISIONED, provisioned); + fmdn_provisioned = provisioned; +} + static void fmdn_factory_reset_prepare(void) { /* Disable advertising requests related to the FMDN. */ @@ -100,9 +115,21 @@ static void fmdn_factory_reset_prepare(void) static void fmdn_factory_reset_executed(void) { + if (factory_reset_trigger != FACTORY_RESET_TRIGGER_NONE) { + LOG_INF("The device has been reset to factory settings"); + LOG_INF("Please press a button to put the device in the Fast Pair discoverable " + "advertising mode"); + } + /* Clear the trigger state for the scheduled factory reset operations. */ factory_reset_trigger = FACTORY_RESET_TRIGGER_NONE; - factory_reset_executed = true; + + if (bt_fast_pair_is_ready()) { + fp_account_key_present = bt_fast_pair_has_account_key(); + } + __ASSERT_NO_MSG(!fp_account_key_present); + + __ASSERT_NO_MSG(!fmdn_provisioned); } APP_FACTORY_RESET_CALLBACKS_REGISTER(factory_reset_cbs, fmdn_factory_reset_prepare, @@ -421,75 +448,66 @@ static void fmdn_conn_authenticated(struct bt_conn *conn) fmdn_conn_auth_bm_conn_status_set(conn, true); } -static bool fmdn_provisioning_state_is_first_cb_after_bootup(void) +static void fmdn_provisioning_state_changed(bool provisioned) { - static bool first_cb_after_bootup = true; - bool is_first_cb_after_bootup = first_cb_after_bootup; + fmdn_provisioning_state_set(provisioned); + if (provisioned) { + /* Fast Pair Implementation Guidelines for the locator tag use case: + * cancel the provisioning timeout. + */ + if (factory_reset_trigger == FACTORY_RESET_TRIGGER_PROVISIONING_TIMEOUT) { + fmdn_factory_reset_cancel(); + } - first_cb_after_bootup = false; + app_fp_adv_request(&fp_adv_trigger_fmdn_provisioning, false); - return is_first_cb_after_bootup; -} + fp_adv_ui_request = false; + app_fp_adv_request(&fp_adv_trigger_ui, fp_adv_ui_request); + } else { + /* Fast Pair Implementation Guidelines for the locator tag use case: + * trigger the reset to factory settings on the unprovisioning operation. + * + * Delay the factory reset operation to allow the local device + * to send a response to the unprovisioning command and give + * the connected peer necessary time to finalize its operations + * and shutdown the connection. + */ + fmdn_factory_reset_schedule(FACTORY_RESET_TRIGGER_KEY_STATE_MISMATCH, + K_SECONDS(FACTORY_RESET_DELAY)); -static void fmdn_provisioning_state_changed(bool provisioned) -{ - bool clock_sync_required = fmdn_provisioning_state_is_first_cb_after_bootup() && - provisioned; + app_fp_adv_request(&fp_adv_trigger_clock_sync, false); + } +} - LOG_INF("FMDN: state changed to %s", - provisioned ? "provisioned" : "unprovisioned"); +static struct bt_fast_pair_fmdn_info_cb fmdn_info_cb = { + .clock_synced = fmdn_clock_synced, + .conn_authenticated = fmdn_conn_authenticated, + .provisioning_state_changed = fmdn_provisioning_state_changed, +}; - app_ui_state_change_indicate(APP_UI_STATE_PROVISIONED, provisioned); - fmdn_provisioned = provisioned; +static void fmdn_provisioning_state_init(void) +{ + bool provisioned; - /* Fast Pair Implementation Guidelines for the locator tag use case: - * cancel the provisioning timeout. - */ - if (provisioned && - (factory_reset_trigger == FACTORY_RESET_TRIGGER_PROVISIONING_TIMEOUT)) { - fmdn_factory_reset_cancel(); - } + provisioned = bt_fast_pair_fmdn_is_provisioned(); + fmdn_provisioning_state_set(provisioned); /* Fast Pair Implementation Guidelines for the locator tag use case: - * trigger the reset to factory settings on the unprovisioning operation - * or on the loss of the Owner Account Key. + * trigger the reset to factory settings on the mismatch between the + * Owner Account Key and the FMDN provisioning state. */ fp_account_key_present = bt_fast_pair_has_account_key(); if (fp_account_key_present != provisioned) { - /* Delay the factory reset operation to allow the local device - * to send a response to the unprovisioning command and give - * the connected peer necessary time to finalize its operations - * and shutdown the connection. - */ - fmdn_factory_reset_schedule( - FACTORY_RESET_TRIGGER_KEY_STATE_MISMATCH, - K_SECONDS(FACTORY_RESET_DELAY)); + fmdn_factory_reset_schedule(FACTORY_RESET_TRIGGER_KEY_STATE_MISMATCH, K_NO_WAIT); return; } - /* Triggered on the unprovisioning operation. */ - if (factory_reset_executed) { - LOG_INF("The device has been reset to factory settings"); - LOG_INF("Please press a button to put the device in the Fast Pair discoverable " - "advertising mode"); - - factory_reset_executed = false; - return; - } - - app_fp_adv_request(&fp_adv_trigger_clock_sync, clock_sync_required); - app_fp_adv_request(&fp_adv_trigger_fmdn_provisioning, false); + app_fp_adv_request(&fp_adv_trigger_clock_sync, provisioned); fp_adv_ui_request = !provisioned; app_fp_adv_request(&fp_adv_trigger_ui, fp_adv_ui_request); } -static struct bt_fast_pair_fmdn_info_cb fmdn_info_cb = { - .clock_synced = fmdn_clock_synced, - .conn_authenticated = fmdn_conn_authenticated, - .provisioning_state_changed = fmdn_provisioning_state_changed, -}; - static void fp_adv_state_changed(bool enabled) { app_ui_state_change_indicate(APP_UI_STATE_FP_ADV, enabled); @@ -686,6 +704,8 @@ static void init_work_handle(struct k_work *w) return; } + fmdn_provisioning_state_init(); + k_sem_give(&init_work_sem); } diff --git a/subsys/bluetooth/services/fast_pair/fmdn/beacon_actions.c b/subsys/bluetooth/services/fast_pair/fmdn/beacon_actions.c index af3289083c67..b3799831fcb7 100644 --- a/subsys/bluetooth/services/fast_pair/fmdn/beacon_actions.c +++ b/subsys/bluetooth/services/fast_pair/fmdn/beacon_actions.c @@ -229,7 +229,7 @@ static ssize_t provisioning_state_read_handle(struct bt_conn *conn, struct fp_account_key account_key; uint8_t eid[PROVISIONING_STATE_RSP_EID_LEN]; uint8_t provisioning_state_flags; - const bool provisioned = fp_fmdn_state_is_provisioned(); + const bool provisioned = bt_fast_pair_fmdn_is_provisioned(); static const uint8_t req_data_len = PROVISIONING_STATE_REQ_PAYLOAD_LEN; uint8_t rsp_data_len; enum provisioning_state_bit_flag { @@ -348,7 +348,7 @@ static ssize_t ephemeral_identity_key_set_handle(struct bt_conn *conn, struct fp_account_key account_key; uint8_t *encrypted_eik; uint8_t new_eik[EPHEMERAL_IDENTITY_KEY_SET_REQ_EIK_LEN]; - const bool provisioned = fp_fmdn_state_is_provisioned(); + const bool provisioned = bt_fast_pair_fmdn_is_provisioned(); const uint8_t req_data_len = provisioned ? EPHEMERAL_IDENTITY_KEY_SET_REQ_PROVISIONED_PAYLOAD_LEN : EPHEMERAL_IDENTITY_KEY_SET_REQ_UNPROVISIONED_PAYLOAD_LEN; @@ -483,7 +483,7 @@ static ssize_t ephemeral_identity_key_clear_handle(struct bt_conn *conn, struct fp_account_key account_key; uint8_t *current_eik_hash; uint8_t *random_nonce; - const bool provisioned = fp_fmdn_state_is_provisioned(); + const bool provisioned = bt_fast_pair_fmdn_is_provisioned(); static const uint8_t req_data_len = EPHEMERAL_IDENTITY_KEY_CLEAR_REQ_PAYLOAD_LEN; static const uint8_t rsp_data_len = EPHEMERAL_IDENTITY_KEY_CLEAR_RSP_PAYLOAD_LEN; @@ -933,7 +933,7 @@ static ssize_t activate_utp_mode_handle(struct bt_conn *conn, return BT_GATT_ERR(BEACON_ACTIONS_ATT_ERR_INVALID_VALUE); } - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { LOG_ERR("Beacon Actions: Activate Unwanted Tracking Protection mode request:" " Device is not provisioned"); @@ -1029,7 +1029,7 @@ static ssize_t deactivate_utp_mode_handle(struct bt_conn *conn, return BT_GATT_ERR(BEACON_ACTIONS_ATT_ERR_INVALID_VALUE); } - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { LOG_ERR("Beacon Actions: Deactivate Unwanted Tracking Protection mode request:" " Device is not provisioned"); @@ -1139,7 +1139,7 @@ int bt_fast_pair_fmdn_ring_state_update( } /* Check if connected peers should be notified about the ring state change. */ - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return 0; } diff --git a/subsys/bluetooth/services/fast_pair/fmdn/include_priv/fp_fmdn_state.h b/subsys/bluetooth/services/fast_pair/fmdn/include_priv/fp_fmdn_state.h index 228d019fe11e..c5bef2a40e80 100644 --- a/subsys/bluetooth/services/fast_pair/fmdn/include_priv/fp_fmdn_state.h +++ b/subsys/bluetooth/services/fast_pair/fmdn/include_priv/fp_fmdn_state.h @@ -67,12 +67,6 @@ uint8_t fp_fmdn_state_ecc_type_encode(void); */ int8_t fp_fmdn_state_tx_power_encode(void); -/** Check if the beacon is provisioned with the Ephemeral Identity Key (EIK). - * - * @return True if the beacon is provisioned with the EIK, False Otherwise. - */ -bool fp_fmdn_state_is_provisioned(void); - /** Provision or unprovision the beacon with the Ephemeral Identity Key (EIK). * * @param[in] eik Ephemeral Identity Key (EIK). diff --git a/subsys/bluetooth/services/fast_pair/fmdn/read_mode.c b/subsys/bluetooth/services/fast_pair/fmdn/read_mode.c index a7bf38df24fb..5cf4af47ca71 100644 --- a/subsys/bluetooth/services/fast_pair/fmdn/read_mode.c +++ b/subsys/bluetooth/services/fast_pair/fmdn/read_mode.c @@ -165,7 +165,7 @@ int bt_fast_pair_fmdn_read_mode_enter(enum bt_fast_pair_fmdn_read_mode mode) return -EINVAL; } - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return -EACCES; } @@ -185,7 +185,7 @@ int fp_fmdn_read_mode_recovery_mode_request(bool *accepted) { __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return -EACCES; } diff --git a/subsys/bluetooth/services/fast_pair/fmdn/state.c b/subsys/bluetooth/services/fast_pair/fmdn/state.c index df0b57f24f2c..ec9756e3af0b 100644 --- a/subsys/bluetooth/services/fast_pair/fmdn/state.c +++ b/subsys/bluetooth/services/fast_pair/fmdn/state.c @@ -452,7 +452,7 @@ static bool fmdn_adv_rpa_expired(struct bt_le_ext_adv *adv) __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { /* Keep the RPA in the valid state to ensure that the RPA expired callback will be * received on a forced RPA rotation during the FMDN provisioning operation (and * just before the start of the FMDN advertising). The RPA expired callback will @@ -508,7 +508,7 @@ static void fmdn_adv_connected(struct bt_le_ext_adv *adv, fmdn_conns[bt_conn_index(info->conn)] = true; fmdn_conn_cnt++; - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return; } @@ -745,7 +745,7 @@ static void fmdn_disconnected(struct bt_conn *conn, uint8_t reason) fmdn_conns[bt_conn_index(conn)] = false; fmdn_conn_cnt--; - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { /* FMDN is unprovisioned. */ return; } @@ -787,7 +787,7 @@ static int fmdn_utp_mode_state_set(bool activated, uint8_t *control_flags) __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return -EINVAL; } @@ -857,7 +857,7 @@ bool fp_fmdn_state_utp_mode_ring_auth_skip(void) { __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return false; } @@ -872,7 +872,7 @@ int fp_fmdn_state_eid_read(uint8_t *eid) { __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return -EINVAL; } @@ -887,7 +887,7 @@ int fp_fmdn_state_eik_read(uint8_t *eik) __ASSERT_NO_MSG(bt_fast_pair_is_ready()); - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { return -EINVAL; } @@ -942,10 +942,15 @@ int8_t fp_fmdn_state_tx_power_encode(void) return calibrated_tx_power; } -bool fp_fmdn_state_is_provisioned(void) +bool bt_fast_pair_fmdn_is_provisioned(void) { int ret; + if (!bt_fast_pair_is_ready()) { + LOG_WRN("FMDN State: checking provisioning state with disabled Fast Pair"); + return false; + } + ret = fp_storage_eik_is_provisioned(); __ASSERT_NO_MSG(ret >= 0); @@ -1005,7 +1010,7 @@ static int fmdn_unprovision(void) { int err; - if (!fp_fmdn_state_is_provisioned()) { + if (!bt_fast_pair_fmdn_is_provisioned()) { /* Ignore the request and stay in the unprovisioned state. */ return 0; } @@ -1100,7 +1105,7 @@ static int fmdn_new_provision(void) static int fmdn_provision(const uint8_t *eik) { int err; - bool was_provisioned = fp_fmdn_state_is_provisioned(); + bool was_provisioned = bt_fast_pair_fmdn_is_provisioned(); __ASSERT_NO_MSG(eik); @@ -1164,7 +1169,7 @@ int bt_fast_pair_fmdn_adv_param_set( new_param_valid = false; } - if ((fmdn_conn_cnt < FMDN_MAX_CONN) && fp_fmdn_state_is_provisioned()) { + if ((fmdn_conn_cnt < FMDN_MAX_CONN) && bt_fast_pair_fmdn_is_provisioned()) { int adv_start_err; adv_start_err = fmdn_adv_start(); @@ -1216,11 +1221,8 @@ static void fmdn_post_init_work_handle(struct k_work *work) { bool is_provisioned; - /* Check provisioning state. */ - is_provisioned = fp_fmdn_state_is_provisioned(); - - /* Notify the user about the initial provisioning state. */ - fp_fmdn_callbacks_provisioning_state_changed_notify(is_provisioned); + /* Check the provisioning state. */ + is_provisioned = bt_fast_pair_fmdn_is_provisioned(); if (is_provisioned) { int err; diff --git a/west.yml b/west.yml index aec5eacb9941..afe99c99a04d 100644 --- a/west.yml +++ b/west.yml @@ -197,7 +197,7 @@ manifest: compare-by-default: false - name: find-my repo-path: sdk-find-my - revision: 0f91f3c24984bddcd7938a3bb840c0f81f18a35c + revision: 5ee887e759229327f7f92df8073831de61a74cad groups: - find-my - name: azure-sdk-for-c