Skip to content

The bap scan delegator module's remove source operation does not return a gatt error when the sink is PA and/or BIS synchronized as it should according to the BAP spec #82921

@jilu-ot

Description

@jilu-ot

The bap scan delegator module's remove source operation does not return a gatt error when the sink is PA and/or BIS synchronized as it should according to the BAP spec

Describe the bug

The BAP specicification version 1.02 section 6.5.8. says the following:

The Broadcast Assistant shall initiate the Remove Source operation only if the Broadcast Assistant has determined that the Scan Delegator collocated with the Broadcast Sink is not synchronized to a PA and/or a BIS, as defined by the values of the PA_Sync_State field and/or the BIS_Sync_State[i] field for the Broadcast Receive State characteristic, which contains the Source_ID that the Broadcast Assistant intends to use in the Remove Source operation.

The function scan_delegator_rem_src is used to handle the remove source operation initiated by a broadcast assistant.

The current version of the bap_scan_delegator function scan_delegator_rem_src terminates periodic advertisement synchronization if it is active. But section 6.5.8 in the bap specification version 1.0.2 says that the broadcast assistant must only remove the source if the broadcast assistant has determined that the sink is neither periodic advertisement synkronized and/or bis synkronised.

The scan_delegator_rem_src function should therefore not terminate any synkronization, but return a gatt error instead.

To Reproduce

Setup:

  • 1 Broadcast source.
  • 1 Broadcast assistant.
  • 1 Broadcast sink with the BASS service.
  1. Use the assistant to add and start bis synkronization with the broadcast source.
  2. Use the assistant to remove the source.
    1. This should make the broadcast sink return a gatt error to the assistant. But it does not.

Expected behavior

That the broadcast sink returns a gatt error when the broadcast assistant attempts to remove a source that is periodical advertisement synkronized and/or BIS synkronized.

Impact

  1. The BAP specification for the remove source operation is not followed.
  2. Broadcast assistant developer are not made aware that the BAP specification is not followed for the remove operation because they do not get a gatt error.

Logs and console output

None.

Environment (please complete the following information):

  • OS: Zephyr
  • Zephyr
  • SHA:e1b43207224e2226dc692bd294afaf869e05a201

Additional context

None.

Metadata

Metadata

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions