Skip to content

Commit fc936d6

Browse files
committed
samples: bluetooth: fast_pair: locator_tag: add fw version read log
Added a firmware log to the Fast Pair Locator Tag sample to indicate that the firmware version is being read. Improved the testing procedure for Android update notifications by leveraging the new log information. Ref: NCSDK-33211 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 8ef1993 commit fc936d6

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ Bluetooth Fast Pair samples
277277

278278
* Added possibility to build and run the sample without the motion detector support (with the :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_DULT_MOTION_DETECTOR` Kconfig option disabled).
279279

280+
* Updated the :ref:`fast_pair_locator_tag_testing_fw_update_notifications` section to improve the test procedure.
281+
The application provides now an additional log message to indicate that the firmware version is being read.
282+
280283
Cellular samples
281284
----------------
282285

samples/bluetooth/fast_pair/locator_tag/README.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,8 @@ Testing steps for the firmware update notification feature require the `nRF Conn
11061106
* `Google Play Services`_ - ``v25.12.33``
11071107
* `nRF Connect Device Manager`_ - ``v2.5.0``
11081108

1109+
Also, ensure that Android notifications are enabled for the `nRF Connect Device Manager`_ application.
1110+
11091111
.. note::
11101112
You can execute these testing steps in combination with the :ref:`fast_pair_locator_tag_testing_clock_sync` testing steps, as both test variants require you to wait for more than 24 hours.
11111113

@@ -1122,9 +1124,17 @@ To test this feature, complete the following steps:
11221124
#. Power on the development kit.
11231125
#. |connect_terminal_specific|
11241126
#. Power on your test Android device and unlock it after the smartphone screen is turned on.
1125-
#. Wait for the Android device to connect to the development kit, read the local firmware version, and disconnect.
1127+
#. Wait for the device to automatically connect to the development kit and read the local firmware version in the background.
1128+
#. In the terminal, verify that a message confirming that the firmware version is being read appears::
1129+
1130+
DIS Firmware Revision characteristic is being read
1131+
11261132
#. Observe that you get the Android notification about the new firmware update on your test Android device.
11271133

1134+
.. note::
1135+
Notification delivery on Android may be delayed due to system conditions or background processing.
1136+
It is recommended to wait up to five minutes before concluding that this test step has failed.
1137+
11281138
.. figure:: /images/bt_fast_pair_locator_tag_android_fw_update_notification.png
11291139
:scale: 80 %
11301140
:alt: Firmware update notification in the Android notification center
@@ -1147,7 +1157,8 @@ To test this feature, complete the following steps:
11471157
#. Power on the development kit.
11481158
#. |connect_terminal_specific|
11491159
#. Power on your test Android device and unlock it after the smartphone screen is turned on.
1150-
#. Wait for the Android device to connect to the development kit, read the local firmware version, and disconnect.
1160+
#. Wait for the device to automatically connect to the development kit and read the local firmware version in the background.
1161+
#. In the terminal, verify that a message confirming that the firmware version is being read appears.
11511162
#. Observe that you no longer get the Android notification about the new firmware update on your test Android device.
11521163

11531164
.. group-tab:: nRF54 DKs
@@ -1159,9 +1170,17 @@ To test this feature, complete the following steps:
11591170
#. Power on the development kit.
11601171
#. |connect_terminal_specific|
11611172
#. Power on your test Android device and unlock it after the smartphone screen is turned on.
1162-
#. Wait for the Android device to connect to the development kit, read the local firmware version, and disconnect.
1173+
#. Wait for the device to automatically connect to the development kit and read the local firmware version in the background.
1174+
#. In the terminal, verify that a message confirming that the firmware version is being read appears::
1175+
1176+
DIS Firmware Revision characteristic is being read
1177+
11631178
#. Observe that you get the Android notification about the new firmware update on your test Android device.
11641179

1180+
.. note::
1181+
Notification delivery on Android may be delayed due to system conditions or background processing.
1182+
It is recommended to wait up to five minutes before concluding that this test step has failed.
1183+
11651184
.. figure:: /images/bt_fast_pair_locator_tag_android_fw_update_notification.png
11661185
:scale: 80 %
11671186
:alt: Firmware update notification in the Android notification center
@@ -1184,7 +1203,8 @@ To test this feature, complete the following steps:
11841203
#. Power on the development kit.
11851204
#. |connect_terminal_specific|
11861205
#. Power on your test Android device and unlock it after the smartphone screen is turned on.
1187-
#. Wait for the Android device to connect to the development kit, read the local firmware version, and disconnect.
1206+
#. Wait for the device to automatically connect to the development kit and read the local firmware version in the background.
1207+
#. In the terminal, verify that a message confirming that the firmware version is being read appears.
11881208
#. Observe that you no longer get the Android notification about the new firmware update on your test Android device.
11891209

11901210
Disabling the locator tag

samples/bluetooth/fast_pair/locator_tag/src/main.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ static bool identifying_info_allow(struct bt_conn *conn, const struct bt_uuid *u
230230
return false;
231231
}
232232

233+
static void gatt_authorized_operation_indicate(struct bt_conn *conn,
234+
const struct bt_gatt_attr *attr)
235+
{
236+
/* This function can be used to indicate important GATT operations to the user. */
237+
if (!bt_uuid_cmp(attr->uuid, BT_UUID_DIS_FIRMWARE_REVISION)) {
238+
LOG_INF("DIS Firmware Revision characteristic is being read");
239+
}
240+
}
241+
233242
static bool gatt_authorize(struct bt_conn *conn, const struct bt_gatt_attr *attr)
234243
{
235244
bool authorized = true;
@@ -245,6 +254,10 @@ static bool gatt_authorize(struct bt_conn *conn, const struct bt_gatt_attr *attr
245254

246255
authorized = authorized && identifying_info_allow(conn, attr->uuid);
247256

257+
if (authorized) {
258+
gatt_authorized_operation_indicate(conn, attr);
259+
}
260+
248261
return authorized;
249262
}
250263

0 commit comments

Comments
 (0)