-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the bug
In babblesim (on both nrf52 and nrf5340) we have seen cases where there are either
- BIS data incoming on a BIS that the controller has already sent a BIG Sync terminated event for
- Periodic advertising reports on a PA Sync that has been terminated (
BT_HCI_OP_LE_PER_ADV_TERMINATE_SYNC
has been sent and a command complete has been sent to the host)
This has only been seen in babblesim, and only with the BT Tester BSIM tests.
To Reproduce
Steps to reproduce the behavior for nrf5340:
- Checkout tests: Bluetooth: Tester: BAP BSIM test #87207
export BOARD=nrf5340bsim/nrf5340/cpuapp
zephyr/tests/bsim/bluetooth/tester/compile.sh
zephyr/tests/bsim/bluetooth/tester/tests_scripts/bap_broadcast.sh
See error
d_01: @00:00:01.601563 (CPU:0): [00:00:01.601,562] <dbg> bttester_bap_broadcast: stream_stopped: Stopped stream 0x846072c with reason 0x16
d_01: @00:00:01.601563 (CPU:0): [00:00:01.601,562] <dbg> bttester_bap_broadcast: recv_state_updated_cb: Receive state with ID 0 updated
d_01: @00:00:01.662078 (CPU:0): [00:00:01.662,048] <dbg> bttester_bap_broadcast: base_recv_cb: bis_index_bitfield 0x00000001
d_01: @00:00:01.662078 (CPU:0): [00:00:01.662,048] <dbg> bttester: tester_event: service 0x0e opcode 0x89
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <dbg> bttester_bap_broadcast: syncable_cb: Broadcaster PA found, encrypted 0, requested_bis_sync 0
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <err> bt_bap_broadcast_sink: broadcast_sink_iso_recv: iso 0x84c4b20 not bound with ep
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <dbg> bttester_bap_broadcast: base_recv_cb:
d_01: @00:00:01.662357 (CPU:0): [00:00:01.662,353] <dbg> bttester_bap_broadcast: base_recv_cb: Received BASE: broadcast sink 0x84cee80 subgroups 1
d_11: @00:00:01.671631 [00:00:01.671,630] <dbg> bsim_btp: is_valid_packet_len: evt
d_11: @00:00:01.671631 0e 85 00 25 00 01 3a 04 3a 41 13 de 56 34 12 40 |...%..:. :A..V4.@
d_11: @00:00:01.671631 9c 00 00 01 06 00 00 00 00 10 02 01 03 02 02 01 |........ ........
d_11: @00:00:01.671631 05 03 01 00 00 00 03 04 28 00 |........ (.
d_01: @00:00:01.742215 (CPU:0): [00:00:01.742,187] <dbg> bttester: tester_event: service 0x0e opcode 0x85
d_01: @00:00:01.742404 (CPU:0): [00:00:01.742,401] <dbg> bttester_gap: pa_sync_terminated_cb:
d_01: @00:00:01.742404 (CPU:0): [00:00:01.742,401] <dbg> bttester_gap: pa_sync_terminated_cb: PA sync lost with reason 22
d_01: @00:00:01.742404 (CPU:0): [00:00:01.742,401] <dbg> bttester: tester_event: service 0x01 opcode 0x8e
d_11: @00:00:01.751709 [00:00:01.751,708] <dbg> bsim_btp: is_valid_packet_len: evt
d_11: @00:00:01.751709 0e 89 00 1b 00 00 00 00 00 00 00 00 00 01 3a 04 |........ ......:.
d_11: @00:00:01.751709 3a 41 13 de 00 56 34 12 02 00 01 00 00 00 00 00 |:A...V4. ........
d_01: @00:00:01.852509 (CPU:0): [00:00:01.852,508] <dbg> bttester_bap_broadcast: base_recv_cb: bis_index_bitfield 0x00000001
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_scan: bt_hci_le_biginfo_adv_report: Unknown handle 0x0000 for periodic advertising report
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_scan: bt_hci_le_per_adv_report_common: Unknown handle 0x0000 for periodic advertising report
d_01: @00:00:01.852878 (CPU:0): [00:00:01.852,874] <err> bt_scan: bt_hci_le_biginfo_adv_report: Unknown handle 0x0000 for periodic advertising report
Steps to reproduce the behavior for nrf52
- Checkout tests: Bluetooth: Tester: BAP BSIM test #87207
export BOARD=nrf52_bsim/native
zephyr/tests/bsim/bluetooth/tester/compile.sh
zephyr/tests/bsim/bluetooth/tester/tests_scripts/bap_broadcast.sh
d_01: @00:00:01.742404 [00:00:01.742,401] <dbg> bttester_gap: pa_sync_terminated_cb:
d_01: @00:00:01.742404 [00:00:01.742,401] <dbg> bttester_gap: pa_sync_terminated_cb: PA sync lost with reason 22
d_01: @00:00:01.742404 [00:00:01.742,401] <dbg> bttester: tester_event: service 0x01 opcode 0x8e
d_11: @00:00:01.751709 [00:00:01.751,708] <dbg> bsim_btp: is_valid_packet_len: evt
d_11: @00:00:01.751709 0e 89 00 1b 00 00 00 00 00 00 00 00 00 01 04 3a |........ .......:
d_11: @00:00:01.751709 41 13 de fe 00 56 34 12 02 00 01 00 00 00 00 00 |A....V4. ........
d_01: @00:00:01.852509 [00:00:01.852,508] <dbg> bttester_bap_broadcast: base_recv_cb: bis_index_bitfield 0x00000001
d_01: @00:00:01.852878 [00:00:01.852,874] <err> bt_scan: bt_hci_le_biginfo_adv_report: Unknown handle 0x0000 for periodic advertising report
d_01: @00:00:01.852878 [00:00:01.852,874] <err> bt_iso: hci_iso: Unable to find conn for handle 7
Expected behavior
Expect to not receive any ISO data on a termianted BIG sync, nor any periodic advertising reports on a PA sync.
Impact
Since these are logged as errors by the host, this is a bad user/developer experience, but does not otherwise cause issues.
Logs and console output
See above
Environment (please complete the following information):
- OS: (e.g. Linux, MacOS, Windows): Arch Linux running Babblesim
- Toolchain (e.g Zephyr SDK, ...): Zephyr SDK
- Commit SHA or Version used: tests: Bluetooth: Tester: BAP BSIM test #87207 on top
6061deba555d148786ca2fd8193df7d6d6e1d0fc
of
Additional context
There as a fix attempted by #87755 which did not solve this.
Similarly the change from #88279 does also not fix this issue.