Skip to content

Commit

Permalink
doc: samples: locator_tag: Add motion detector testing steps
Browse files Browse the repository at this point in the history
Jira: NCSDK-28984

Signed-off-by: Aleksander Strzebonski <[email protected]>
  • Loading branch information
alstrzebonski committed Oct 25, 2024
1 parent a13d078 commit f1a7682
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/nrf/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,7 @@
.. _`Fast Pair Unwanted Tracking Prevention Guidelines`: https://developers.google.com/nearby/fast-pair/specifications/extensions/fmdn#unwanted-tracking-prevention
.. _`Fast Pair Device Feature Requirements`: https://developers.google.com/nearby/fast-pair/specifications/devicefeaturerequirement
.. _`Fast Pair Device Feature Requirements for Locator Tags`: https://developers.google.com/nearby/fast-pair/specifications/devicefeaturerequirement/devicefeaturerequirement_locatortags
.. _`Fast Pair Find My Device Network Certification Guidelines Unwanted Tracking Prevention (early access)`: https://developers.google.com/nearby/fast-pair/early-access/fmdn-certification-guideline?hl=en&authuser=1#manual-test-unwanted-tracking

.. _`Protocol Buffers`: https://developers.google.com/protocol-buffers

Expand Down
110 changes: 110 additions & 0 deletions samples/bluetooth/fast_pair/locator_tag/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,11 @@ See :ref:`ug_bt_fast_pair_provisioning` for details.
You cannot use the sample without the Fast Pair provisioning data.
Programming the device with the sample firmware without providing the proper Fast Pair provisioning data results in assertion failure during boot.

If you want to make testing the motion detector easier, enable the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_TEST_MODE` Kconfig option to shorten the period between the device entering the Unwanted Tracking Protection mode and the activation of the motion detector.
With this option enabled, 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 that are responsible for this period are shortened to 3 minutes.
Otherwise, the period would be a random value between 8 and 24 hours.
The :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_TEST_MODE` Kconfig option also shortens the motion detector backoff period (:kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD`) from 6 hours to 2 minutes.

Release build
=============

Expand Down Expand Up @@ -761,6 +766,111 @@ To test this feature, complete the following steps:
#. Start the ringing action on your device by tapping the :guilabel:`Play sound` button.
#. Observe that **LED 1** is lit to confirm that the Android device is able to connect to your development kit after a clock synchronization.

Motion detector
---------------

To test this feature, complete the following steps:

.. tabs::

.. group-tab:: nRF52 and nRF53 DKs

1. Remember to enable the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_TEST_MODE` Kconfig option to shorten the motion detector activation periods.
#. Go to the :ref:`fast_pair_locator_tag_testing` section and follow the instructions on performing the FMDN provisioning operation.
#. Observe that **LED 3** is lit, which indicates that the device is provisioned as an FMDN beacon.
#. Double-click **Button 2** to simulate the motion event.
#. Observe that **LED 2** blinks fast twice, which indicates that the motion detected event appears.
#. Observe that the ringing action does not start, because the motion detector is inactive.
#. Put the device into the Unwanted Tracking Protection mode.
You can do it in two ways.
If you have early access to the Fast Pair Find My Device Network documentation you can:
* Complete the steps 1-5 from the `Fast Pair Find My Device Network Certification Guidelines Unwanted Tracking Prevention (early access)` document.
Otherwise, you can:
* Turn off your Android device.
* Wait for minimum 30 minutes for other Android device to put the device into the Unwanted Tracking Protection mode.

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.
#. Observe that **LED 2** blinks at a 0.25 second interval which indicates that the motion detector is active.
#. Double-click **Button 2** to simulate the motion event.
#. Observe that **LED 2** 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 2** being lit.
#. Observe that **LED 2** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active.
#. Double-click **Button 2** to simulate the motion event.
#. Observe that **LED 2** blinks fast twice, which indicates that the motion detected event appears.
#. Observe that after up to 0.5 second, the ringing action starts for 1 second which is indicated by **LED 2** being lit.
#. Observe that **LED 2** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active.
#. Double-click **Button 2** to simulate the motion event.
#. Observe that **LED 2** 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 2** being lit.
#. Double-click **Button 2** to simulate the motion event while the **LED 2** is still lit (ringing action is still in progress).
#. Observe that **LED 2** 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 2** being lit.
#. Observe that **LED 2** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active.
#. Observe that after 20 seconds from the first motion event or after 10 ringing actions completes, the **LED 2** is off, which indicates that the motion detector is inactive.
#. Double-click **Button 2** to simulate the motion event.
#. Observe that **LED 2** blinks fast twice, which indicates that the motion detected event appears.
#. Observe that the ringing action does not start, because the motion detector is inactive.
#. Wait for 2 minutes (the backoff period defined by the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` Kconfig option) for the motion detector to be activated again.
#. Observe that **LED 2** blinks at a 0.25 second interval which indicates that the motion detector is active.
#. Double-click **Button 2** to simulate the motion event and observe the ringing action just as before.
#. Wait for 20 seconds for the **LED 2** to go off, which indicates that the motion detector is inactive.
#. Wait for 2 minutes for the motion detector to be activated again.
#. Observe that **LED 2** blinks at a 0.25 second interval which indicates that the motion detector is active.
#. Turn on your Android device.
#. Observe that after up to few hours the **LED 2** goes off which means that the motion detector has been deactivated, because the device is no longer in the Unwanted Tracking Protection mode.

.. group-tab:: nRF54 DKs

1. Remember to enable the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_TEST_MODE` Kconfig option to shorten the motion detector activation periods.
#. Go to the :ref:`fast_pair_locator_tag_testing` section and follow the instructions on performing the FMDN provisioning operation.
#. Observe that **LED 2** is lit, which indicates that the device is provisioned as an FMDN beacon.
#. 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 the ringing action does not start, because the motion detector is inactive.
#. Put the device into the Unwanted Tracking Protection mode.
You can do it in two ways.
If you have early access to the Fast Pair Find My Device Network documentation you can:
* Complete the steps 1-5 from the `Fast Pair Find My Device Network Certification Guidelines Unwanted Tracking Prevention (early access)` document.
Otherwise, you can:
* Turn off your Android device.
* Wait for minimum 30 minutes for other Android device to put the device into the Unwanted Tracking Protection mode.

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.
#. Observe that **LED 1** blinks 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 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.
#. 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 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.
#. 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.
#. 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.
#. Observe that **LED 1** goes back to blinking at a 0.25 second interval which indicates that the motion detector is active.
#. Observe that after 20 seconds from the first motion event or after 10 ringing actions completes, the **LED 1** is off, which indicates that the motion detector is inactive.
#. 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 the ringing action does not start, because the motion detector is inactive.
#. Wait for 2 minutes (the backoff period defined by the :kconfig:option:`CONFIG_DULT_MOTION_DETECTOR_SEPARATED_UT_BACKOFF_PERIOD` Kconfig option) for the motion detector to be activated again.
#. Observe that **LED 1** blinks at a 0.25 second interval which indicates that the motion detector is active.
#. Double-click **Button 1** to simulate the motion event and observe the ringing action just as before.
#. Wait for 20 seconds for the **LED 1** to go off, which indicates that the motion detector is inactive.
#. Wait for 2 minutes for the motion detector to be activated again.
#. Observe that **LED 1** blinks at a 0.25 second interval which indicates that the motion detector is active.
#. Turn on your Android device.
#. Observe that after up to few hours the **LED 1** goes off which means that the motion detector has been deactivated, because the device is no longer in the Unwanted Tracking Protection mode.

Performing the DFU procedure
----------------------------

Expand Down

0 comments on commit f1a7682

Please sign in to comment.