-
Notifications
You must be signed in to change notification settings - Fork 1.6k
bluetooth: Add support for Channel Classification #30825
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -175,6 +175,7 @@ Bluetooth® LE | |
|
|
||
| * Added the :kconfig:option:`CONFIG_BT_HCI_SUPPORT_DEPRECATED_COMMANDS` Kconfig option to support deprecated HCI commands. | ||
| The option is disabled by default, and enabling it may cause deprecation warnings or errors during compilation. | ||
| * Added support for LE Channel Classification in the SoftDevice Controller through the :kconfig:option:`CONFIG_BT_CTLR_CHANNEL_CLASSIFICATION` Kconfig option. | ||
|
|
||
| Bluetooth Mesh | ||
| -------------- | ||
|
|
@@ -334,6 +335,8 @@ Bluetooth samples | |
| * Updated the minimum supported connection interval from 875 µs to 750 µs in the HID SCI configuration. | ||
| * Enabled the Frame Space Update feature in the single peripheral HID SCI configuration. | ||
|
|
||
| * Added the :ref:`ble_channel_classification` sample that demonstrates peripheral-initiated channel map updates and central reception of channel classification reports. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move this entry to line 319 as the first entry under Bluetooth samples. |
||
|
|
||
| Bluetooth Mesh samples | ||
| ---------------------- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # | ||
| # Copyright (c) 2026 Nordic Semiconductor | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
|
|
||
| cmake_minimum_required(VERSION 3.20.0) | ||
|
|
||
| find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
| project(bluetooth_channel_classification) | ||
|
|
||
| target_sources(app PRIVATE src/main.c) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # | ||
| # Copyright (c) 2026 Nordic Semiconductor | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
|
|
||
| config NRF_DEFAULT_IPC_RADIO | ||
| default y | ||
|
|
||
| config NETCORE_IPC_RADIO_BT_HCI_IPC | ||
| default y | ||
|
|
||
| source "share/sysbuild/Kconfig" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,127 @@ | ||||||
| .. _ble_channel_classification: | ||||||
|
|
||||||
| .. ncs-sample:: | ||||||
| :title: Bluetooth: Channel Classification | ||||||
|
|
||||||
| This sample demonstrates LE Channel Classification reporting between a central and a peripheral. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Requirements | ||||||
| ************ | ||||||
|
|
||||||
| The sample supports the following development kits: | ||||||
|
|
||||||
| .. table-from-sample-yaml:: | ||||||
|
|
||||||
| You can use any combination of the development kits mentioned above in your testing setup. | ||||||
|
|
||||||
| Additionally, the sample requires a connection to a computer with a serial terminal for each of the development kits. | ||||||
|
|
||||||
| Overview | ||||||
| ******** | ||||||
|
|
||||||
| When connected, the peripheral cycles through predefined host channel maps, changing every five seconds. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The central enables channel classification reporting using :c:func:`hci_vs_sdc_channel_reporting_enable` and handles the received reports in a local HCI VS event callback. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Building and running | ||||||
| ******************** | ||||||
|
|
||||||
| .. |sample path| replace:: :file:`samples/bluetooth/channel_classification` | ||||||
|
|
||||||
| .. include:: /includes/build_and_run.txt | ||||||
|
|
||||||
| .. |sample_or_app| replace:: sample | ||||||
| .. |ipc_radio_dir| replace:: :file:`sysbuild/ipc_radio` | ||||||
|
|
||||||
| .. include:: /includes/ipc_radio_conf.txt | ||||||
|
|
||||||
| Testing | ||||||
| ======= | ||||||
|
|
||||||
| After programming the sample to both development kits, test it by performing the following steps: | ||||||
|
|
||||||
| 1. Connect to both kits with a terminal emulator (for example, the `Serial Terminal app`_). | ||||||
| See :ref:`test_and_optimize` for the required settings and steps. | ||||||
| #. Reset both kits. | ||||||
| #. In one of the terminal emulators, type ``c`` to start the application on the connected board in the central role. | ||||||
| #. In the other terminal emulator, type ``p`` to start the application in the peripheral role. | ||||||
| #. Observe that the kits establish a connection. | ||||||
| #. On the peripheral, observe a new channel map printed every five seconds. | ||||||
| #. On the central, observe matching channel maps applied from the received classification reports. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Sample output | ||||||
| ============= | ||||||
|
|
||||||
| * Example peripheral output:: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use .. code-block:: c directive. |
||||||
| *** Booting nRF Connect SDK v3.4.99-b15b0977d5d7 *** | ||||||
| *** Using Zephyr OS v4.4.99-bf52a9edec7e *** | ||||||
| I: Starting Bluetooth Channel Classification sample | ||||||
| I: SoftDevice Controller build revision: | ||||||
| I: 2e 0b 04 cf 06 5e 2e 8f |.....^.. | ||||||
| I: a8 14 89 4d b6 1b 7a 8c |...M..z. | ||||||
| I: d4 e4 bb 1f |.... | ||||||
| I: HW Platform: Nordic Semiconductor (0x0002) | ||||||
| I: HW Variant: nRF54Lx (0x0005) | ||||||
| I: Firmware: Standard Bluetooth controller (0x00) Version 46.1035 Build 777914063 | ||||||
| I: HCI transport: SDC | ||||||
| I: Identity: E9:A2:74:BE:64:BA (random) | ||||||
| I: HCI: version 6.3 (0x11) revision 0x306a, manufacturer 0x0059 | ||||||
| I: LMP: version 6.3 (0x11) subver 0x306a | ||||||
| I: Bluetooth initialized | ||||||
| I: Choose device role - type c (central) or p (peripheral): | ||||||
| I: | ||||||
| I: Selected Peripheral | ||||||
| I: Advertising successfully started | ||||||
| I: Connected as peripheral | ||||||
| I: Using channel map 0 | ||||||
| I: Peripheral channel map ff ff ff ff 1f | ||||||
| I: Using channel map 1 | ||||||
| I: Peripheral channel map ff fb ef bf 1f | ||||||
| I: Using channel map 2 | ||||||
| I: Peripheral channel map df 7f ff fd 1f | ||||||
|
|
||||||
| * Example central output:: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| *** Booting nRF Connect SDK v3.4.99-b15b0977d5d7 *** | ||||||
| *** Using Zephyr OS v4.4.99-bf52a9edec7e *** | ||||||
| I: Starting Bluetooth Channel Classification sample | ||||||
| I: SoftDevice Controller build revision: | ||||||
| I: 2e 0b 04 cf 06 5e 2e 8f |.....^.. | ||||||
| I: a8 14 89 4d b6 1b 7a 8c |...M..z. | ||||||
| I: d4 e4 bb 1f |.... | ||||||
| I: HW Platform: Nordic Semiconductor (0x0002) | ||||||
| I: HW Variant: nRF54Lx (0x0005) | ||||||
| I: Firmware: Standard Bluetooth controller (0x00) Version 46.1035 Build 777914063 | ||||||
| I: HCI transport: SDC | ||||||
| I: Identity: F1:6C:D4:5E:80:EA (random) | ||||||
| I: HCI: version 6.3 (0x11) revision 0x306a, manufacturer 0x0059 | ||||||
| I: LMP: version 6.3 (0x11) subver 0x306a | ||||||
| I: Bluetooth initialized | ||||||
| I: Choose device role - type c (central) or p (peripheral): | ||||||
| I: | ||||||
| I: Selected Central | ||||||
| I: Scanning successfully started | ||||||
| I: Filters matched. Address: E9:A2:74:BE:64:BA (random) connectable: 1 | ||||||
| I: Connected as central | ||||||
| I: Channel classification reporting enabled | ||||||
| I: Central channel map from report ff ff ff ff 1f | ||||||
| I: Central applied peripheral channel classification | ||||||
| I: Central channel map from report ff fb ef bf 1f | ||||||
| I: Central applied peripheral channel classification | ||||||
| I: Central channel map from report df 7f ff fd 1f | ||||||
|
|
||||||
| Dependencies | ||||||
| ************ | ||||||
|
|
||||||
| This sample uses the following |NCS| library: | ||||||
|
|
||||||
| * :file:`include/bluetooth/hci_vs_sdc.h` | ||||||
|
|
||||||
| This sample uses the following `sdk-nrfxlib`_ libraries: | ||||||
|
|
||||||
| * :ref:`nrfxlib:softdevice_controller` | ||||||
|
|
||||||
| In addition, it uses the following Zephyr libraries: | ||||||
|
|
||||||
| * :ref:`zephyr:bluetooth_api` | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # | ||
| # Copyright (c) 2026 Nordic Semiconductor | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
| CONFIG_NCS_SAMPLES_DEFAULTS=y | ||
|
|
||
| CONFIG_CONSOLE=y | ||
| CONFIG_CONSOLE_SUBSYS=y | ||
| CONFIG_CONSOLE_HANDLER=y | ||
| CONFIG_CONSOLE_GETCHAR=y | ||
|
|
||
| CONFIG_BT_DEVICE_NAME="Nordic_Channel_Class" | ||
| CONFIG_BT=y | ||
| CONFIG_BT_PERIPHERAL=y | ||
| CONFIG_BT_CENTRAL=y | ||
| CONFIG_BT_MAX_CONN=1 | ||
|
|
||
| CONFIG_BT_CTLR_CHANNEL_CLASSIFICATION=y | ||
| CONFIG_BT_HCI_VS_EVT_USER=y | ||
|
|
||
| CONFIG_BT_SCAN=y | ||
| CONFIG_BT_SCAN_FILTER_ENABLE=y | ||
| CONFIG_BT_SCAN_NAME_CNT=1 |
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.