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

Controller: ACL packets NACKed after Data Length Update #52393

Closed
ahmedmoheb-nordic opened this issue Nov 20, 2022 · 4 comments · Fixed by #52012
Closed

Controller: ACL packets NACKed after Data Length Update #52393

ahmedmoheb-nordic opened this issue Nov 20, 2022 · 4 comments · Fixed by #52012
Assignees
Labels
area: Bluetooth Controller area: Bluetooth LLCP area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@ahmedmoheb-nordic
Copy link
Contributor

ahmedmoheb-nordic commented Nov 20, 2022

Describe the bug
When central is connected to multiple peripherals and the MTU LL data length is increased to 247 bytes, central gets notifications only from the last connected peripheral

To Reproduce
Steps to reproduce the behavior:

  1. Central connects to more than one peripheral
  2. For each connection, set the connection interval to be 25 ms
  3. For each connection, increase the MTU above 190 bytes
  4. Send notifications from connected peripherals other than the last connected one

Expected behavior

  1. Central receives notifications from the last connected peripheral
  2. Notifications from peripherals other than the last connected one are missed
  3. Peripherals that aren't communicating disconnect with time out disconnection reason

Additional context
Issue doesn't occur if the connection interval is increased or the notification data size is below 160 bytes

Environment

@ahmedmoheb-nordic ahmedmoheb-nordic added the bug The issue is a bug, or the PR is fixing a bug label Nov 20, 2022
@jori-nordic
Copy link
Contributor

I think it's a controller issue, the test works fine (there were some logic errors) when peripherals are compiled with CONFIG_BT_AUTO_DATA_LEN_UPDATE=n.

It seems the central controller has issues ACK-ing one of the peripheral after switching to the max LL packet length. When the LL data length stays at 27, there are no issues whatsoever.

@kruithofa and @cvinayak To reproduce:

@ahmedmoheb-nordic
Copy link
Contributor Author

ahmedmoheb-nordic commented Nov 25, 2022

I've tested the same scenario using the desktop application "nrf connect for desktop Bluetooth Low Energy" in place of the central device while keeping the same peripherals and following the same behavior of the central application and there were no issues found.

So, I support @jori-nordic assumption that the central controller has an issue

ahmedmoheb-nordic added a commit to ahmedmoheb-nordic/zephyr that referenced this issue Dec 5, 2022
A test script to be used as a regression test for the issue
zephyrproject-rtos#52393

It covers the disconnect issue when Central connects to more than one
peripheral with the following setup:

Central connects to 4 peripherals
- Enable encryption
- MTU is set to 247
- Connection interval is set 25 ms
- Notify (~200 bytes) from both sides in a loop
- Notifications are sent in both directions between the central and the
  connected peripherals with 243 data size

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
@jori-nordic jori-nordic changed the title Central misses notifications from connected peripherals after increasing MTU Controller: ACL packets NACKed after Data Length Update Dec 14, 2022
@kruithofa
Copy link
Collaborator

might be fixed by PR #52012 and #53095, I will reproduce the issue first, and see if these PRs fix it

@kruithofa
Copy link
Collaborator

@ahmedmoheb-nordic @jori-nordic PR #52012 fixes this issue, but requires that the event-length update feature is enabled by adding following 2 lines to the prj.conf files:
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_EVENT_LEN_UPDATE=y
@ahmedmoheb-nordic can you confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Controller area: Bluetooth LLCP area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants