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

Bluetooth: Controller: ISO BIS payload counter rollover #44244

Closed
carlst opened this issue Mar 26, 2022 · 2 comments
Closed

Bluetooth: Controller: ISO BIS payload counter rollover #44244

carlst opened this issue Mar 26, 2022 · 2 comments
Assignees
Labels
area: Bluetooth Controller area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@carlst
Copy link

carlst commented Mar 26, 2022

Describe the bug
The ISO bisPayloadCounter (value of tx->payload_count as set in subsys/bluetooth/controller/hci/hci.c, hci_iso_handle()) can rollover (e.g. after transmitting ISO data for ~10-11 minutes at 10ms rate, or 64K packets).

In subsys/bluetooth/controller/ll_sw/lll_adv.h, struct lll_adv_iso_stream
changing the line:
uint16_t pkt_seq_num
to:
uint64_t pkt_seq_num:39
seems to resolve the issue.

To Reproduce

  1. Use nRF52840DK
  2. Remove k_sleep(K_SECONDS(1)) in samples/bluetooth/iso_broadcast and log the various payload_count values near the memq_dequeue() calls in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_iso.c
  3. AFter 64K packets and tx->payload_count rollover, 2 packets with same bisPayloadCounter occur.

Impact
Low priority

@carlst carlst added the bug The issue is a bug, or the PR is fixing a bug label Mar 26, 2022
@carlescufi
Copy link
Member

@carlst thanks for reporting! Why don’t you open a Pull Request with the suggested fix?

@carlst
Copy link
Author

carlst commented Mar 27, 2022

@carlescufi OK. Done. #44245

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

No branches or pull requests

3 participants