Skip to content
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

BLE Notifications limited to 1 per connection event on Zephyr v2.4.0 Central #29957

Closed
ejohnso49 opened this issue Nov 11, 2020 · 0 comments · Fixed by #29959
Closed

BLE Notifications limited to 1 per connection event on Zephyr v2.4.0 Central #29957

ejohnso49 opened this issue Nov 11, 2020 · 0 comments · Fixed by #29959
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore

Comments

@ejohnso49
Copy link

ejohnso49 commented Nov 11, 2020

Describe the bug
I am in the process of upgrading my application from v2.3.0 to v2.4.0. While doing testing I observed a decrease in throughput over the application BLE link. After taking a capture between my peripheral (custom) and central (Zephyr v2.4.0) devices I observed that only a single notification is being received per connection event. This is despite the notification payload setting the More Data flag which should cause the Central to ACK and receive the next notification as there is plenty of time before the next connection event.

To rule out complications due to my application I was able to reproduce this via the Zephyr BLE HRS samples (central_hr and peripheral_hr).

To Reproduce
Steps to reproduce the behavior on Zephyr v2.4.0:

On the central board

  1. west build -b nrf52dk_nrf52832 zephyr/samples/bluetooth/central_hr && west flash

On the peripheral board

  1. Modify samples/bluetooth/peripheral_hr/src/main.c with the following snippet:
@@ -130,7 +130,7 @@ void main(void)
         * of starting delayed work so we do it here
         */
        while (1) {
-               k_sleep(K_SECONDS(1));
+               k_sleep(K_USEC(100));
 
                /* Heartrate measurements simulation */
                hrs_notify();
  1. west build -b nrf52dk_nrf52832 zephyr/samples/bluetooth/peripheral_hr && west flash
  2. Observe reduced notification throughput via BLE sniff

Expected behavior
The peripheral should be able to send multiple notifications per connection event.

Impact
This issue greatly reduces possible throughput of a BLE application via notifications.

Logs and console output
I have attached a capture from Wireshark

Environment (please complete the following information):

  • OS: MacOS
  • Toolchain: gcc-arm-none-eabi-9-2020-q2-update
  • Commit SHA or Version used: v2.4.0

zephyr_v2.4.0_notification_capture.pcapng.zip

@ejohnso49 ejohnso49 added the bug The issue is a bug, or the PR is fixing a bug label Nov 11, 2020
@cvinayak cvinayak self-assigned this Nov 11, 2020
cvinayak added a commit to cvinayak/zephyr that referenced this issue Nov 12, 2020
Fix regression in connection radio event close in central
role introduced in commit 222dca5

Fixes zephyrproject-rtos#29957.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
@carlescufi carlescufi added the Regression Something, which was working, does not anymore label Nov 12, 2020
carlescufi pushed a commit that referenced this issue Nov 17, 2020
Fix regression in connection radio event close in central
role introduced in commit 222dca5

Fixes #29957.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
github-actions bot pushed a commit that referenced this issue Nov 17, 2020
Fix regression in connection radio event close in central
role introduced in commit 222dca5

Fixes #29957.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
nashif pushed a commit that referenced this issue Nov 17, 2020
Fix regression in connection radio event close in central
role introduced in commit 222dca5

Fixes #29957.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants