bluez5: bap: Use a string instead of int array to set Broadcast code

Currently, the user sets the Broadcast Code via an array of integers
in the config file. However, the Bluetooth Core Specification indicates
that it should be set via a 16 byte string. This commit replaces the old
implementation with the one required by the spec.

Tested the commit with the example provided in the Core Spec:
Broadcast Code: Børne House
Result from btsnoop log:
< HCI Command: LE Create Broadcast Isochronous Group (0x08|0x0068) plen 31
...
Broadcast Code[16]: 000000006573756f4820656e72b8c342

The result matches the example given in the spec.
This commit is contained in:
Vlad Pruteanu 2024-06-10 15:41:57 +03:00
parent b7af52e3fb
commit 1466d0ae78
2 changed files with 18 additions and 8 deletions

View file

@ -429,7 +429,7 @@ Example:
```
bluez5.bcast_source.config = [
{
"broadcast_code": [ 1, 2, 104, 5, 83, 241, 65, 90, 162, 101, 187, 175, 198, 234, 3, 184 ],
"broadcast_code": "Børne House",
"encryption: false,
"bis": [
{ # BIS configuration