-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
doc: Document DULT motion detector feature #18138
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 9218c3d474cfd69a3938375a58951d8298dfae0e more detailssdk-nrf:
Github labels
List of changed files detected by CI (6)
Outputs:ToolchainVersion: Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
|
||
* The motion detector start request is indicated by the :c:member:`bt_fast_pair_fmdn_motion_detector_cb.start` callback. | ||
After this callback is called, the motion detector events are polled periodically with the :c:member:`bt_fast_pair_fmdn_motion_detector_cb.period_expired` callback. | ||
Typical action after the motion detector start request is to power up the accelerometer and start collecting motion data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typical action after the motion detector start request is to power up the accelerometer and start collecting motion data. | |
A typical action after the motion detector start request is to power up the accelerometer and start collecting motion data. |
This callback is called at the end of each motion detector period. | ||
The :c:member:`bt_fast_pair_fmdn_motion_detector_cb.start` callback indicates the beginning of the first motion detector period. | ||
The next period is started as soon as the previous period expires. | ||
The user should notify the DULT module if motion was detected in the previous period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is something that requires user action (not something that happens in the sw), use active voice like:
"You need to notify the DULT module, if..."
The next period is started as soon as the previous period expires. | ||
The user should notify the DULT module if motion was detected in the previous period. | ||
The return value of this callback is used to pass this information. | ||
The motion must be considered as detected if it fulfills the requirements defined in the `DULT Motion detector`_ section of the DULT documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be or is considered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the "must" requirement in the spec.
The motion must be considered as detected if it fulfills the requirements defined in the `DULT Motion detector`_ section of the DULT documentation. | ||
* The motion detector stop request is indicated by the :c:member:`bt_fast_pair_fmdn_motion_detector_cb.stop` callback. | ||
It concludes the motion detector activity that was started by the :c:member:`bt_fast_pair_fmdn_motion_detector_cb.start` callback. | ||
Typical action after the motion detector stop request is to power down the accelerometer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typical action after the motion detector stop request is to power down the accelerometer. | |
A typical action after the motion detector stop request is to power down the accelerometer. |
It concludes the motion detector activity that was started by the :c:member:`bt_fast_pair_fmdn_motion_detector_cb.start` callback. | ||
Typical action after the motion detector stop request is to power down the accelerometer. | ||
|
||
The motion detector is started by the DULT subsystem when the accessory is in the separated state for a sufficient amount of time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be more specific? What would be a sufficient time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a random value. The ranges are defined in the kconfigs. By default they are set to 8 hours (min) and 24 hours (max). It is described in the doc/nrf/libraries/others/dult.rst
.
Maybe:
"The motion detector is started by the DULT subsystem when the accessory is in the separated state for an amount of time controlled by the :kconfig:option:CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN
and :kconfig:option:CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX
Kconfig options.". What do you think?
It is done to inform the non-owner that is moving the accessory, that the device might have been used to track the non-owner. | ||
On DKs the simulated motion can be generated by button action. | ||
On Thingy:53 the built-in accelerometer is used to detect the motion. | ||
The motion detector is deactivated for :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` after the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_MAX_SOUND_COUNT` number of sounds has been played or after the motion has been detected and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_ACTIVE_POLL_DURATION` amount of time has passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The motion detector is deactivated for :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` after the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_MAX_SOUND_COUNT` number of sounds has been played or after the motion has been detected and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_ACTIVE_POLL_DURATION` amount of time has passed. | |
The motion detector is deactivated for the period set in the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` Kconfig option after the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_MAX_SOUND_COUNT` number of sounds has been played or after the motion has been detected and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_ACTIVE_POLL_DURATION` amount of time has passed. |
@@ -220,11 +232,13 @@ The user interface of the sample depends on the hardware platform you are using. | |||
* Blinks at a 0.25 second interval if the DFU mode is enabled. | |||
|
|||
LED 2: | |||
Indicates that the ringing action is in progress. | |||
Depending on the ringing state: | |||
Indicates that the ringing action is in progress, informs that the simulated motion has been detected, and informs that the motion detector is active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicates that the ringing action is in progress, informs that the simulated motion has been detected, and informs that the motion detector is active. | |
Indicates that the ringing action is in progress, informing that the simulated motion has been detected and the motion detector is active. |
* Lit if the device is ringing. | ||
* Off if the device is not ringing. | ||
* Blinks fast twice if the motion detected event appears. | ||
* Lit if the device is ringing and motion detected event is not being signalized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"signalized" sounds a bit odd, but cannot figure out what would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe:
* Lit if the device is ringing and motion detected event is not being signalized. | |
* Lit if the device is ringing and no motion detection event is being indicated. |
? We could also stick to "signal", but then I think it should be "signaled", instead of "signalized"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicated sounds better. Thanks!
Stops the ongoing ringing action on single press. | ||
Generates simulated motion event on double press. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stops the ongoing ringing action on single press. | |
Generates simulated motion event on double press. | |
Stops the ongoing ringing action on a single press. | |
Generates simulated motion event on a double press. |
@@ -303,11 +318,13 @@ The user interface of the sample depends on the hardware platform you are using. | |||
* Blinks at a 0.25 second interval if the DFU mode is enabled. | |||
|
|||
LED 1: | |||
Indicates that the ringing action is in progress. | |||
Depending on the ringing state: | |||
Indicates that the ringing action is in progress, informs that the simulated motion has been detected, and informs that the motion detector is active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same suggestions as above.
|
||
The motion detector is started by the DULT subsystem when the accessory is in the separated state for a sufficient amount of time. | ||
When the motion is detected during the motion detector active period, the :c:member:`bt_fast_pair_fmdn_ring_cb.start_request` callback is called to request the ringing action. | ||
It is done to inform the non-owner that is moving the accessory, that the device might have been used to track the non-owner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "non-owner" in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the person that is not owning the accessory. It describes a case where the accessory owner could e.g. throw the accessory into other person's (non-owner) backpack to track him.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thanks! :) If it's the person then we should indicate it with "who". I'd suggest the following change to simplify the meaning, let me know if it affects it:
It is done to inform the non-owner that is moving the accessory, that the device might have been used to track the non-owner. | |
It is done to inform the non-owner who is moving the accessory that a device might be tracking their movements. |
There are also other occurrences of this sentence
|
||
The motion detector is an optional feature of the DULT subsystem that can be integrated into the FMDN extension. | ||
For more details about the feature, see the `DULT Motion detector`_ section of the DULT specification. | ||
You can enable the :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_DULT_MOTION_DETECTOR` Kconfig option to support the DULT motion detector functionality in the FMDN extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can enable the :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_DULT_MOTION_DETECTOR` Kconfig option to support the DULT motion detector functionality in the FMDN extension. | |
To activate the DULT motion detector functionality in the FMDN extension, enable the :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_DULT_MOTION_DETECTOR` Kconfig option. |
It passes callbacks from the DULT motion detector module to the user application. | ||
|
||
To register the motion detector callbacks, use the :c:func:`bt_fast_pair_fmdn_motion_detector_cb_register` function. | ||
All motion detector callbacks defined in the :c:struct:`bt_fast_pair_fmdn_motion_detector_cb` structure are mandatory to register: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All motion detector callbacks defined in the :c:struct:`bt_fast_pair_fmdn_motion_detector_cb` structure are mandatory to register: | |
You must register all motion detector callbacks defined in the :c:struct:`bt_fast_pair_fmdn_motion_detector_cb` structure: |
If it's the user doing this (same for line 265). If not, plz disregard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right
doc/nrf/external_comp/dult.rst
Outdated
The minimum duration for the DULT sound action is defined by the :c:macro:`DULT_SOUND_DURATION_MIN_MS`. | ||
The upper layer determines the sound duration, and the duration must be greater than the value set in the :c:macro:`DULT_SOUND_DURATION_MIN_MS` macro. | ||
The minimum duration for the DULT sound action originating from the Bluetooth ANOS is defined by the :c:macro:`DULT_SOUND_DURATION_BT_GATT_MIN_MS`. | ||
The upper layer determines the sound duration, and, in case of the sound action originating from the Bluetooth ANOS, the duration must be greater than the value set in the :c:macro:`DULT_SOUND_DURATION_BT_GATT_MIN_MS` macro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upper layer determines the sound duration, and, in case of the sound action originating from the Bluetooth ANOS, the duration must be greater than the value set in the :c:macro:`DULT_SOUND_DURATION_BT_GATT_MIN_MS` macro. | |
The upper layer determines the sound duration, and for sound action originating from the Bluetooth ANOS, the duration must exceed the value set in the :c:macro:`DULT_SOUND_DURATION_BT_GATT_MIN_MS` macro. |
to simplify a bit
* Lit if the device is ringing. | ||
* Off if the device is not ringing. | ||
* Blinks fast twice if the motion detected event appears. | ||
* Lit if the device is ringing and motion detected event is not being signalized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe:
* Lit if the device is ringing and motion detected event is not being signalized. | |
* Lit if the device is ringing and no motion detection event is being indicated. |
? We could also stick to "signal", but then I think it should be "signaled", instead of "signalized"
Added testing steps for the motion detector feature in the separate commit. |
60029c0
to
88782b8
Compare
Fixed doc build issue. |
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
88782b8
to
f1a7682
Compare
Addressed review comments. Please rereview. |
In this state, if motion is detected, the accessory starts the ringing action. | ||
Played sounds help a non-owner identify an accessory that is moving with them, as the device might have been used to track the non-owner location by its owner. | ||
On DKs, the simulated motion can be generated by button action. | ||
On the Thingy0:53, the built-in accelerometer is used to detect the motion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thingy:53
Please fix the documentation build so that we can view the updated documentation in the HTML-rendered form. |
f1a7682
to
72aff79
Compare
Addressed review comments. |
These values are defined in the DULT specification and should not be changed in the production code. | ||
This option is disabled by default. | ||
|
||
* :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` - This option allows to configure the period in minutes to disable the motion detector if the accessory is in the separated state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take these three bullets back two steps. I guess they can be on the same level as the one above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They have prompt only if the CONFIG_DULT_MOTION_DETECTOR_TEST_MODE
is enabled so I wanted to group them under this kconfig description.
@@ -455,6 +455,9 @@ Bluetooth Fast Pair samples | |||
* An application versioning using the :file:`VERSION` file. | |||
* The DFU support which can be enabled using the ``SB_CONFIG_APP_DFU`` sysbuild Kconfig option. | |||
DFU is available for all supported targets except the ``debug`` configurations of :ref:`zephyr:nrf52dk_nrf52832` and :ref:`zephyr:nrf52833dk_nrf52833` due to size constraints. | |||
* An application module for the DULT motion detector feature and the new UI for supported board targets to interact with this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the changelog from this PR and consult @divipillai . She will add the entries to her PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I just wanted to get approves here and later move it to Divya's PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove DNM label when it's done, it could've been merged by accident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Motion detector mode | ||
-------------------- | ||
|
||
In the provisioned state, the accessory can activate the motion detector mode from the DULT specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds a bit strange, "activate the motion detector mode from the ... spec."
Should we rephrase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "... mode defined in the DULT specification"?
-------------------- | ||
|
||
In the provisioned state, the accessory can activate the motion detector mode from the DULT specification. | ||
It happens when the accessory is separated from the owner for a sufficient amount of time (see :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN` and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX` Kconfig options). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens exactly? The motion detector mode is activated?
It happens when the accessory is separated from the owner for a sufficient amount of time (see :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN` and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX` Kconfig options). | ||
In this state, if motion is detected, the accessory starts the ringing action. | ||
Emitted sounds help to alert the non-owner that they are carrying an accessory that does not belong to them and might be used by the original owner to track their location. | ||
On DKs, the simulated motion can be generated by button action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On DKs, the simulated motion can be generated by button action. | |
On DKs, you can generate the simulated motion by button action. |
1. Open the Find My Device app. | ||
#. Tap on your accessory in the list. | ||
The accessory should have "Nearby" written under its name. | ||
#. Tap on the gear icon next to the device name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Tap on the gear icon next to the device name | |
#. Tap the gear icon next to the device name |
The other Android device can belong to anyone around you. | ||
It is recommended to be in a crowded area. | ||
|
||
#. Wait for 3 minutes (random value between the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN` and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX` Kconfig options) for the motion detector to be activated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Wait for 3 minutes (random value between the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN` and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX` Kconfig options) for the motion detector to be activated. | |
#. Wait for three minutes (random value between the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MIN` and :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_TIMEOUT_PERIOD_MAX` Kconfig options) for the motion detector to be activated. |
#. Double-click **Button 1** to simulate the motion event. | ||
#. Observe that **LED 1** blinks fast twice, which indicates that the motion detected event appears. | ||
#. Observe that after up to 10 seconds, the ringing action starts for 1 second which is indicated by **LED 1** being lit. | ||
#. Observe that **LED 1** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Observe that **LED 1** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active. | |
#. Observe that **LED 1** goes back to blinking at a 0.25 second interval, which indicates that the motion detector is active. |
#. Observe that **LED 1** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active. | ||
#. Double-click **Button 1** to simulate the motion event. | ||
#. Observe that **LED 1** blinks fast twice, which indicates that the motion detected event appears. | ||
#. Observe that after up to 0.5 second, the ringing action starts which is indicated by **LED 1** being lit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Observe that after up to 0.5 second, the ringing action starts which is indicated by **LED 1** being lit. | |
#. Observe that after up to 0.5 second, the ringing action starts, which is indicated by **LED 1** being lit. |
#. Observe that after up to 0.5 second, the ringing action starts which is indicated by **LED 1** being lit. | ||
#. Double-click **Button 1** to simulate the motion event while the **LED 1** is still lit (ringing action is still in progress). | ||
#. Observe that **LED 1** blinks fast twice, which indicates that the motion detected event appears. | ||
#. Observe that after 0.5 second, of not ringing, the ringing action starts again for 1 second which is indicated by **LED 1** being lit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Observe that after 0.5 second, of not ringing, the ringing action starts again for 1 second which is indicated by **LED 1** being lit. | |
#. Observe that after 0.5 second, of not ringing, the ringing action starts again for one second, which is indicated by **LED 1** being lit. |
72aff79
to
7c29580
Compare
Addressed review comments. Please rereview. |
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
Jira: NCSDK-28984 Signed-off-by: Aleksander Strzebonski <[email protected]>
Jira: NCSDK-28984 Signed-off-by: Aleksander Strzebonski <[email protected]>
7c29580
to
9218c3d
Compare
Removed changelog entry and added it here: #18192 |
Jira: NCSDK-28984