Skip to content

LE Audio: Update BASS / Scan Delegator to v.1.0.1 #86608

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

Closed
Thalley opened this issue Mar 4, 2025 · 4 comments · Fixed by #88065
Closed

LE Audio: Update BASS / Scan Delegator to v.1.0.1 #86608

Thalley opened this issue Mar 4, 2025 · 4 comments · Fixed by #88065
Assignees
Labels
area: Bluetooth Audio area: Bluetooth Enhancement Changes/Updates/Additions to existing features

Comments

@Thalley
Copy link
Collaborator

Thalley commented Mar 4, 2025

Is your enhancement proposal related to a problem? Please describe.
The Broadcast Audio Scan Service v.1.0.1 has been released and require a few changes in Zephyr to be compliant.

Describe the solution you'd like
Specifically erratum 26529 needs to be implemented, which changes how the bad broadcast code is handled.

The change required is that instead of copying the bad broadcast code to the bad broadcast code field, the spec now requires setting the bad broadcast code field to 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (all octets set to 0xFF).

Describe alternatives you've considered
N/A

Additional context
https://www.bluetooth.com/specifications/specs/broadcast-audio-scan-service-2/

@Thalley Thalley added Enhancement Changes/Updates/Additions to existing features area: Bluetooth area: Bluetooth Audio labels Mar 4, 2025
@Thalley Thalley self-assigned this Mar 4, 2025
@gudipudiramanakumar
Copy link
Contributor

Hey can I solve this issue

@Thalley
Copy link
Collaborator Author

Thalley commented Mar 31, 2025

Hey can I solve this issue

Sounds great! Let me know if you need any help in preparing a PR or understanding the current implementation. Make sure to check out https://docs.zephyrproject.org/latest/contribute/index.html if you are unfamiliar with the Zephyr contribution process

@gudipudiramanakumar
Copy link
Contributor

Hi @Thalley, I'm unable to access 26529 can you guide me through how to.
And regarding the issue, I see that the below code needs to be changed, can you verify if this is the right approach

broadcast_code = net_buf_simple_pull_mem(&buf, BT_ISO_BROADCAST_CODE_SIZE);
(void)memcpy(recv_state->bad_code, broadcast_code,
sizeof(recv_state->bad_code));

to

	broadcast_code = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
	(void)memcpy(recv_state->bad_code, broadcast_code,
		     sizeof(recv_state->bad_code));

and

broadcast_code = net_buf_simple_pull_mem(buf, sizeof(internal_state->broadcast_code));
(void)memcpy(internal_state->broadcast_code, broadcast_code,
sizeof(internal_state->broadcast_code));

to

	broadcast_code = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

	(void)memcpy(internal_state->broadcast_code, broadcast_code,
		     sizeof(internal_state->broadcast_code));

@Thalley
Copy link
Collaborator Author

Thalley commented Apr 2, 2025

Hi @Thalley, I'm unable to access 26529 can you guide me through how to. And regarding the issue, I see that the below code needs to be changed, can you verify if this is the right approach

zephyr/subsys/bluetooth/audio/bap_broadcast_assistant.c

Lines 283 to 285 in 43acb93
broadcast_code = net_buf_simple_pull_mem(&buf, BT_ISO_BROADCAST_CODE_SIZE);
(void)memcpy(recv_state->bad_code, broadcast_code,
sizeof(recv_state->bad_code));

to

	broadcast_code = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
	(void)memcpy(recv_state->bad_code, broadcast_code,
		     sizeof(recv_state->bad_code));

and

zephyr/subsys/bluetooth/audio/bap_scan_delegator.c

Lines 952 to 955 in 43acb93
broadcast_code = net_buf_simple_pull_mem(buf, sizeof(internal_state->broadcast_code));

(void)memcpy(internal_state->broadcast_code, broadcast_code,
sizeof(internal_state->broadcast_code));

to

	broadcast_code = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

	(void)memcpy(internal_state->broadcast_code, broadcast_code,
		     sizeof(internal_state->broadcast_code));

Yeah, something like that. Easier to provide review when there's a PR, but yeah, any place that we currently set the bad_code to a non-0 value, we need to set it to all-0xFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Audio area: Bluetooth Enhancement Changes/Updates/Additions to existing features
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants