zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.86k stars 6.62k forks source link

Bluetooth: Controller: Unable to maintain both a BIS and ACL connection at the same time. #68353

Closed fredrikdanebjer closed 9 months ago

fredrikdanebjer commented 9 months ago

Describe the bug Unable to maintain both a BIS and ACL connection at the same time.

When using a broadcast assistant, together with a broadcast source and broadcast sink, the broadcast sink will timeout the ACL connection to the broadcast assistant as soon as it starts receiving broadcast audio from the bis.

This problem was noted using the sample applications for Broadcast Sink, Broadcast Source, and the test shell application acting as a broadcast assistant. For all three devices the nrf5340 audio devkit was used. Changing the Broadcast Sink to instead use Samsung Earbuds we can see no issue. On the Broadcast Sink we have tried using both the Zephyr Controller, as well as various PacketCraft Controllers. Analyzing the connection parameters used we could see that the Samsung Earbuds used another connection interval and supervision timeout than the Zephyr sample did, but changing the Zephyr sample to use the same parameters did not remedy the situation.

To Reproduce Steps to reproduce the behavior:

  1. build and flash to three different boards the following applications: zephyr/tests/bluetooth/shell/ zephyr/samples/bluetooth/broadcast_audio_sink zephyr/samples/bluetooth/broadcast_audio_source Building the controller using this application: samples/bluetooth/hci_ipc

We also used the following Kconfig: CONFIG_TINYCRYPT_ECC=y

  1. Make sure the Broadcast Source is transmitting

  2. On the shell issue commands in the following order: i.bt init ii. bap init iii. bt clear all iv. bt connect-name <BT_DEVICE_NAME of scan delegator / sink> v. bap_broadcast_assistant discover vi. bt scan-filter-set pa_interval 10 vii. bt scan on viii. Note down the broadcast ID if the sink ix. bt scan off x. bap_broadcast_assistant add_broadcast_id 1 0x06

Expected behavior Broadcast Sink receives audio data, no disconnect on sink/assistant

Impact Very important

BIS_ACL_disconnect.zip

Environment (please complete the following information):

Additional context The working connection interval of Samsung Earbuds are 30ms The working supervision timeout of Samsung Earbuds is 5s

@Thalley @cvinayak

cvinayak commented 9 months ago

I am able to reproduce the issue on nRF5340_audio_dk using the hci_ipc on the netcore. I get the same sniffer logs as you receive, the ACL skips alternatively some connection intervals and then later supervision timeout.

@fredrikdanebjer or @larsgk Is the issue reproducible when using only nRF52840 or nRF52833 SoC boards for source, sink and assistant? (i do not see the issue on nRF52x or in nrf52_bsim testing).

fredrikdanebjer commented 9 months ago

AFAIK it has been tested only when the nrf52840 is the source, but not as any other role. In this case we got the same results.