Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth: fast_pair: fmdn: add API for checking the provisioning state #20970

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

kapi-no
Copy link
Contributor

@kapi-no kapi-no commented Mar 17, 2025

Added the new FMDN API - bt_fast_pair_fmdn_is_provisioneda. The API can be used to check the device provisioning in the synchronous manner.

Changed the bt_fast_pair_fmdn_info_cb.provisioning_state_changed callback behaviour. The callback no longer reports the initil 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

@kapi-no kapi-no requested a review from a team as a code owner March 17, 2025 12:46
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Mar 17, 2025
@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from 39bfd02 to f9988f5 Compare March 17, 2025 12:48
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 17, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 9

Inputs:

Sources:

sdk-nrf: PR head: 033d40c7732f2d9d775aac3f32c5ca3589c55bcd
find-my: PR head: 5ee887e759229327f7f92df8073831de61a74cad

more details

sdk-nrf:

PR head: 033d40c7732f2d9d775aac3f32c5ca3589c55bcd
merge base: 0f6ada8879cd8e18de339056ef6d3502e46247e5
target head (main): 762492f3d6d86efb602182ce86ce21a3be588260
Diff

find-my:

PR head: 5ee887e759229327f7f92df8073831de61a74cad
merge base: 0f91f3c24984bddcd7938a3bb840c0f81f18a35c
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (8)
include
│  ├── bluetooth
│  │  ├── services
│  │  │  ├── fast_pair
│  │  │  │  │ fmdn.h
samples
│  ├── bluetooth
│  │  ├── fast_pair
│  │  │  ├── locator_tag
│  │  │  │  ├── src
│  │  │  │  │  ├── fp_adv.c
│  │  │  │  │  │ main.c
subsys
│  ├── bluetooth
│  │  ├── services
│  │  │  ├── fast_pair
│  │  │  │  ├── fmdn
│  │  │  │  │  ├── beacon_actions.c
│  │  │  │  │  ├── include_priv
│  │  │  │  │  │  │ fp_fmdn_state.h
│  │  │  │  │  ├── read_mode.c
│  │  │  │  │  │ state.c
west.yml

File list hidden for private repositories.
If you have access you can see the diff via the github link.
find-my Diff

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests
    • ◻️ desktop52_verification
    • ◻️ test-fw-nrfconnect-ble_samples
    • ◻️ test-sdk-find-my
    • ⚠️ test_ble_nrf_config
Disabled integration tests
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

Copy link

You can find the documentation preview for this PR here.

@@ -538,17 +538,18 @@ struct bt_fast_pair_fmdn_info_cb {
/** @brief Indicate provisioning state changes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit msg had 2 typos:

Added the new FMDN API - bt_fast_pair_fmdn_is_provisioned. The API can
be used to check the device provisioning in the synchronous manner.

Changed the bt_fast_pair_fmdn_info_cb.provisioning_state_changed
callback behaviour. 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.

Comment on lines 124 to 125
fmdn_provisioning_state_set(false);
fp_account_key_present = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that false is expected here for both functions (as factory reset removes both), but I wonder if it wouldn't be better to synch it to:
bt_fast_pair_has_account_key() and bt_fast_pair_fmdn_is_provisioned() like in other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should add asserts for the expected value as well. I will align it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add assert inside fmdn_provisioning_state_set function.

Comment on lines 124 to 125
fmdn_provisioning_state_set(false);
fp_account_key_present = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add assert inside fmdn_provisioning_state_set function.

@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from f9988f5 to 16c67ec Compare March 21, 2025 08:18
@kapi-no
Copy link
Contributor Author

kapi-no commented Mar 21, 2025

I did the last force-push to address comments.

@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from 16c67ec to 0389e04 Compare March 21, 2025 08:20
@kapi-no
Copy link
Contributor Author

kapi-no commented Mar 21, 2025

Pure rebase. No file diff has changed

@kapi-no kapi-no requested a review from alstrzebonski March 21, 2025 08:27
@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from 0389e04 to 768061c Compare March 21, 2025 10:58
@kapi-no kapi-no requested review from a team as code owners March 21, 2025 10:58
@kapi-no
Copy link
Contributor Author

kapi-no commented Mar 21, 2025

Force-push to plug the Find My alignment into this top-level PR

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Mar 21, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
find-my https://github.com/nrfconnect/sdk-find-my/commit/0f91f3c24984bddcd7938a3bb840c0f81f18a35c https://github.com/nrfconnect/sdk-find-my/commit/5ee887e759229327f7f92df8073831de61a74cad (main) nrfconnect/sdk-find-my@0f91f3c2..5ee887e7

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from b2e283c to 93bb89d Compare March 21, 2025 14:34
@kapi-no
Copy link
Contributor Author

kapi-no commented Mar 21, 2025

small logging adjustment, as the build run failed anyway due to docker failures

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 <Kamil.Piszczek@nordicsemi.no>
@kapi-no kapi-no force-pushed the fast_pair_fmdn_is_provisioned_api branch from 93bb89d to 033d40c Compare March 21, 2025 16:13
@kapi-no
Copy link
Contributor Author

kapi-no commented Mar 21, 2025

manifest bump

@NordicBuilder NordicBuilder removed the DNM label Mar 21, 2025
@kapi-no kapi-no merged commit b820eaf into nrfconnect:main Mar 21, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-find-my
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants