samples: bluetooth: peripheral_hids_mouse: Use low duty direct adv#27650
Conversation
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: f967b833248ed495562d61b4e5fad45e45335f57 more detailssdk-nrf:
Github labels
List of changed files detected by CI (3)Outputs:ToolchainVersion: 911f4c5c26 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
a6aca48 to
0efee95
Compare
|
Documentation will be added later in this PR. |
0efee95 to
ced1c86
Compare
|
Added documentation. |
| This feature changes the way advertising works in comparison to the other Bluetooth Low Energy samples. | ||
| When the device wants to advertise, it starts with high duty cycle directed advertising provided that it has bonding information. | ||
| When the device wants to advertise, it starts with low duty cycle directed advertising provided that it has bonding information. | ||
| Each directed advertising attempt has a 2-second timeout. |
There was a problem hiding this comment.
| Each directed advertising attempt has a 2-second timeout. | |
| Each directed advertising attempt has a timeout of two seconds. |
| * Privacy (:kconfig:option:`CONFIG_BT_PRIVACY`) - The `Bluetooth Low Energy app`_ does not fully support the Bluetooth Privacy feature by disallowing distribution of the Identity Resolving Key (IRK) during the pairing procedure. | ||
| * High-duty directed advertising (:kconfig:option:`CONFIG_BT_DIRECTED_ADVERTISING`) - High-duty directed advertising with 3.75 ms advertising interval and 1.28 s duration prevents the subsequent undirected advertising from being reported in the scanning list of `Bluetooth Low Energy app`_ . | ||
| As a result, it is only possible to connect to the target DK during the very short interval of high-duty directed advertising. | ||
| * Low-duty directed advertising (:kconfig:option:`CONFIG_BT_DIRECTED_ADVERTISING`) - Low-duty directed advertising with 2 s duration prevents the subsequent undirected advertising from being reported in the scanning list of `Bluetooth Low Energy app`_ . |
There was a problem hiding this comment.
| * Low-duty directed advertising (:kconfig:option:`CONFIG_BT_DIRECTED_ADVERTISING`) - Low-duty directed advertising with 2 s duration prevents the subsequent undirected advertising from being reported in the scanning list of `Bluetooth Low Energy app`_ . | |
| * Low-duty directed advertising (:option:`CONFIG_BT_DIRECTED_ADVERTISING`) - Low-duty directed advertising with duration of two seconds prevents the subsequent undirected advertising from being reported in the scanning list of `Bluetooth Low Energy app`_ . |
| The feature depends on Bluetooth LE security support (:option:`CONFIG_BT_HIDS_SECURITY_ENABLED`). | ||
| This feature changes the way advertising works in comparison to the other Bluetooth Low Energy samples. | ||
| When the device wants to advertise, it starts with high duty cycle directed advertising provided that it has bonding information. | ||
| When the device wants to advertise, it starts with low duty cycle directed advertising provided that it has bonding information. |
There was a problem hiding this comment.
| When the device wants to advertise, it starts with low duty cycle directed advertising provided that it has bonding information. | |
| When the device wants to advertise, it starts with low-duty cycle directed advertising provided that it has bonding information. |
| * The directed advertising from high duty cycle to low duty cycle to prevent disconnecting already connected peers. | ||
| A 2-second timeout is used for each low duty cycle directed advertising attempt. |
There was a problem hiding this comment.
| * The directed advertising from high duty cycle to low duty cycle to prevent disconnecting already connected peers. | |
| A 2-second timeout is used for each low duty cycle directed advertising attempt. | |
| * The directed advertising from high-duty to low-duty cycle to prevent disconnecting peers that are already connected. | |
| A timeout of two seconds is used for each low-duty cycle directed advertising attempt. |
|
You can find the documentation preview for this PR here. Preview links for modified nRF Connect SDK documents: https://ncsbmdoc.z6.web.core.windows.net/ncs/PR-27650/nrf/releases_and_maturity/releases/release-notes-changelog.html |
ced1c86 to
1fe2e2b
Compare
9573b49 to
5a1b908
Compare
| When the device wants to advertise, it starts with directed advertising provided that it has bonding information. | ||
| When there is at least one connected peer, low-duty cycle directed advertising is used. | ||
| Otherwise, high-duty cycle directed advertising is used. | ||
| The low-duty cycle directed advertising is used because scheduling high-duty directed advertising may cause problems with reacting to Bluetooth LE connection events from connected peers which can lead to disconnections. |
There was a problem hiding this comment.
| The low-duty cycle directed advertising is used because scheduling high-duty directed advertising may cause problems with reacting to Bluetooth LE connection events from connected peers which can lead to disconnections. | |
| The low-duty cycle directed advertising is used because scheduling high-duty directed advertising might cause problems with reacting to Bluetooth LE connection events from connected peers, which can result in disconnections. |
|
|
||
| .. rst-class:: v3-2-4 v3-2-3 v3-2-2 v3-2-1 v3-2-0 | ||
|
|
||
| NCSDK-37899: High-duty cycle directed advertising in the :ref:`peripheral_hids_mouse` sample may lead to disconnecting connected peers |
There was a problem hiding this comment.
Consider also mentioning what would happen for older NCS releases (before SoftDevice scheduler update). The behavior is different there (but device still would not work properly)
5a1b908 to
3ba11a3
Compare
| printk("Direct advertising to %s started\n", addr_buf); | ||
|
|
||
| /* High-duty directed advertising expires automatically after timeout defined in | ||
| * the Bluetooth specification. The Blutooth stack will call connected() callback |
There was a problem hiding this comment.
| * the Bluetooth specification. The Blutooth stack will call connected() callback | |
| * the Bluetooth specification. The Bluetooth stack will call connected() callback |
3ba11a3 to
dbb8636
Compare
Uses low duty directed advertising to prevent disconnecting connected peers which could happen when using high duty advertising. Introduces directed advertising timeout as low duty advertising has no automatic timeout. Jira: NCSDK-37899 Signed-off-by: Aleksander Strzebonski <aleksander.strzebonski@nordicsemi.no>
dbb8636 to
f967b83
Compare
|
Rebased on main. |
|
@MarekPieta Please revisit |
Uses low duty directed advertising to prevent disconnecting connected peers which could happen when using high duty advertising. Introduces directed advertising timeout as low duty advertising has no automatic timeout.
Jira: NCSDK-37899