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.07k stars 6.19k forks source link

Bluetooth: samples: bap_broadcast_sink sample resets on broadcast code received #75469

Closed jthm-ot closed 8 hours ago

jthm-ot commented 4 days ago

Describe the bug When a broadcast assistant connected to the bap_broadcast_sink sample adds an encrypted source, then bap_broadcast_sink sample unexpected does a reset, when the requested broadcast code is proved by the assistant.

To Reproduce Steps to reproduce the behavior:

  1. Disable scan self In the bap_broadcast_sink sample (CONFIG_SCAN_SELF=n)
  2. Build and flash bap_broadcast_sink sample (e.g. nRF5340 Audio DK board)
  3. Add an encrypted source from the broadcast assistant
  4. Provide broadcast code from the broadcast assistant when requested

Expected behavior The bap_broadcast_sink sample should be waiting for BIS sync request after broadcast code received

Impact The bap_broadcast_sink sample will not be able to recieve the stream

Logs and console output

Terminal log when error occurs:

Broadcast Sink created, waiting for BASE Receive state updated, pa sync state: 2 subgroup 0 bis_sync: 0x00000000 Received BASE with 1 subgroups from broadcast sink 0x2000729c bis_index_bitfield = 0x00000002 Receive state updated, pa sync state: 2 subgroup 0 bis_sync: 0x00000000 Broadcast sink (0x2000729c) is syncable, BIG encrypted BASE received, waiting for syncable Waiting for broadcast code Broadcast code received for 0x20007438 sem_broadcast_code_received timed out, resetting Reset

Expected terminal log:

Broadcast source PA synced, creating Broadcast Sink Broadcast Sink created, waiting for BASE Receive state updated, pa sync state: 2 subgroup 0 bis_sync: 0x00000000 Received BASE with 1 subgroups from broadcast sink 0x2000729c bis_index_bitfield = 0x00000002 Receive state updated, pa sync state: 2 subgroup 0 bis_sync: 0x00000000 Broadcast sink (0x2000729c) is syncable, BIG encrypted BASE received, waiting for syncable Waiting for broadcast code Broadcast code received for 0x20007438 Waiting for BIS sync request

Zephyr SHA used: 2457f730f43079d8d0626f6dee6f51765a29605d

github-actions[bot] commented 4 days ago

Hi @jthm-ot! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙