Skip to content

Commit 30f67fc

Browse files
ivaniushkovnordicjm
authored andcommitted
Bluetooth: CS Reflector: add overlay for Android
Added kconfig file with the settings required to run CS procedure with Android smartphone, also added corresponding changes to main.c to support bonding. The changes required to support CS procedure with Android: - Enable bonding (includes settings, NVS etc) - Enable 2 antenna paths support to allow CS procedures where initiator (a phone) has 2 antennas It was tested manually with Google Pixel 10 Android 16 QPR2 Beta with the Ranging test application: https://cs.android.com/android/platform/superproject/ main/+/main:packages/modules/Uwb/ranging/test_app/ Signed-off-by: Ivan Iushkov <[email protected]>
1 parent 0b95cfd commit 30f67fc

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

samples/bluetooth/channel_sounding_ras_reflector/README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ After programming the sample to your development kit, you can test it by connect
5353
I: CS security enabled.
5454
I: CS procedures enabled.
5555

56+
Building for testing with Android 16 ranging module
57+
===================================================
58+
59+
In order to enable Bluetooth configurations required to test Channel sounding with Android 16 phones with Channel sounding support,
60+
the android_ranging.conf fragment can be applied. For example, using the following command:
61+
62+
.. parsed-literal::
63+
:class: highlight
64+
65+
west build -bnrf54l15dk/nrf54l15/cpuapp -- -DEXTRA_CONF_FILE="android_ranging.conf"
66+
5667
Dependencies
5768
************
5869

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# KConfig fragment file with the settings
8+
# required to run CS Ranging with Android 16
9+
# phones
10+
11+
# Required for bonding
12+
CONFIG_BT_BONDABLE=y
13+
CONFIG_BT_SETTINGS=y
14+
CONFIG_SETTINGS=y
15+
CONFIG_FLASH=y
16+
CONFIG_FLASH_PAGE_LAYOUT=y
17+
CONFIG_FLASH_MAP=y
18+
CONFIG_NVS=y
19+
20+
# Enable support of 2 antenna paths for the case
21+
# when Initiator has 2 antennas
22+
CONFIG_BT_RAS_MAX_ANTENNA_PATHS=2
23+
CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=2

samples/bluetooth/channel_sounding_ras_reflector/src/main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <zephyr/bluetooth/uuid.h>
1818
#include <zephyr/bluetooth/cs.h>
1919
#include <bluetooth/services/ras.h>
20-
20+
#include <zephyr/settings/settings.h>
2121
#include <dk_buttons_and_leds.h>
2222

2323
#include <zephyr/logging/log.h>
@@ -208,6 +208,10 @@ int main(void)
208208
return 0;
209209
}
210210

211+
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
212+
settings_load();
213+
}
214+
211215
err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0);
212216
if (err) {
213217
LOG_ERR("Advertising failed to start (err %d)", err);

0 commit comments

Comments
 (0)