Commits

Commit Message Author Age Changes
b22859e3 client/print: Add decoding for UUID properties This adds proper decoding for UUID properties with usage of bt_uuidstr_to_str so it can print the 'friendly' name as bellow: bluetoothctl# transport.show /org/bluez/hci0/dev_94_DB_56_F7_F2_88/sep4/fd0 Transport /org/bluez/hci0/dev_94_DB_56_F7_F2_88/sep4/fd0 UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) ... Luiz Augusto von Dentz 1 year ago 3 files, +37, -30
0ea4e4d5 doc: Remove Pygments dependency from manpage This patch removes the Pygments dependency from l2cap/rfcomm.rst file. When the code-block type is specified, the rst2man throws a warning asking for Pygments package. Fixes: https://github.com/bluez/bluez/issues/950 Luiz Augusto von Dentz 1 year ago 2 files, +10, -10
7aa24597 doc: Add description of org.bluez.obex.Image This new interface allows to get the image referenced in the audio metadata ImgHandle available in org.bluez.MediaPlayer track properties. The image handle is only available in track info if an OBEX session is connected to the ObexPort port provided in org.bluez.MediaPlayer properties. Frédéric Danis 1 year ago 2 files, +124, -3
140903fb avrcp: Update controller SDP record with cover art support Frédéric Danis 1 year ago 1 file, +6, -4
088594d5 obexd: Add Get to org.bluez.obex.Image Retrieves the image corresponding to the handle and the description, as one of the descriptions retrieved by Properties, and store it in a local file. If the "transform" property description exists it should be set to one of the value listed by Properties for this description. Frédéric Danis 1 year ago 3 files, +193, -1
3ecf9b33 obexd: Add Properties to org.bluez.obex.Image This allows to get the different version of the image provided by the remote device to chose the one to use with Get. This bip-common.[ch] files are based on previous work done by Jakub Adamek for GSoC 2011, see [1] and [2]. [1] https://www.bluez.org/gsoc-basic-image-profilebip/ [2] https://github.com/enkait/Basic-Imaging-Profile-in-obexd/blob/gsoc_final/plugins/bip_util.c Frédéric Danis 1 year ago 4 files, +902, -0
1a681aa0 obexd: Add BIP client for AVRCP cover art download The cover art image handle is available in the metadata of the track when the OBEX BIP session is connected to the PSM port provided in AVRCP SDP record and available as org.bluez.MediaPlayer property. This service allows to get the thumbnail. Frédéric Danis 1 year ago 5 files, +187, -0
ae6dab10 client: Respect --timeout when bluetoothd isn't running Exit after <timeout> seconds if bluetoothd isn't available. This functionality is useful for non-interactive uses of bluetoothctl. Bastien Nocera 1 year ago 1 file, +20, -2
1428d846 shared/shell: Add bt_shell_get_timeout() Make it possible to get the value of the general --timeout option. Bastien Nocera 1 year ago 2 files, +7, -0
2908491c monitor: fix buffer overflow when terminal width > 255 In current code, we create line buffer with size 256, which can contains 255 ASCII characters. But in modern system, terminal can have larger width. It may cause buffer overflow in snprintf() text. limits.h provides constant LINE_MAX. {LINE_MAX} Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing <newline>. Minimum Acceptable Value: {_POSIX2_LINE_MAX} Celeste Liu 1 year ago 1 file, +2, -1
f9f98c0b test-uhid: Add call to bt_uhid_unregister_all This adds a call to bt_uhid_unregister_all so it tests if notification callback end up calling that. Luiz Augusto von Dentz 1 year ago 1 file, +1, -0
9a6a84a8 shared/uhid: Fix crash after bt_uhid_unregister_all This fixes the following crash which happens when bt_uhid_unregister_all is called from a notification callback: Invalid read of size 8 at 0x1D9EFF: queue_foreach (queue.c:206) by 0x1DEE58: uhid_read_handler (uhid.c:164) Address 0x51286d8 is 8 bytes inside a block of size 16 free'd at 0x48478EF: free (vg_replace_malloc.c:989) by 0x1DA08D: queue_remove_if (queue.c:292) by 0x1DA12F: queue_remove_all (queue.c:321) by 0x1DE592: bt_uhid_unregister_all (uhid.c:300) Fixes: https://github.com/bluez/bluez/issues/952 Luiz Augusto von Dentz 1 year ago 1 file, +44, -3
8562d0e3 obexd: Add support for specific headers in obex transfer The BIP is using the Image Handle Tag header to set the file handle to transfer. Frédéric Danis 1 year ago 2 files, +21, -0
5cd301e8 player: Add image handle support property This is part of the metadata when the AVRCP target supports covert art download and a OBEX BIP session is connected. The image handle references the cover art associated to the track, and is valid only during OBEX BIP session. Frédéric Danis 1 year ago 5 files, +19, -2
4c05a0ff player: Add OBEX PSM port for cover art support This parse the AVRCP Target SDP record for the L2CAP PSM to use with the OBEX session to get the cover art. Frédéric Danis 1 year ago 4 files, +83, -5
5d7d3ac2 obexd: Add PSM support to session create An OBEX session can be connected to a RFCOMM channel or a L2CAP PSM. Frédéric Danis 1 year ago 5 files, +44, -7
41f94363 client: Print a warning when setting discoverable without a timeout This makes command discoverable to print a warning if discoverable-timeout is not set(0): [bluetooth]# discoverable-timeout 0 [bluetooth]# Changing discoverable-timeout 0 succeeded [bluetooth]# [CHG] Controller 4C:49:6C:44:F5:E7 DiscoverableTimeout: 0x00000000 (0) [bluetooth]# discoverable on Warning: setting discoverable while discoverable-timeout not set(0) is not recommended Luiz Augusto von Dentz 1 year ago 1 file, +13, -0
d8a4b126 build: Fix distcheck This fixes the following errors like the following: ../../mesh/mesh-config-json.c:31:10: fatal error: mesh/missing.h: No such file or directory 31 | #include "mesh/missing.h" | ^~~~~~~~~~~~~~~~ Luiz Augusto von Dentz 1 year ago 2 files, +2, -2
615fc359 gobex: Replace g_convert by utf16_to_utf8 The glibc's iconv implementation is based around plug in modules for specific translations which may not been built on the platform and prevent to use g_convert(). This commit replaces it by a function similar to the existing utf8_to_utf16() function. Frédéric Danis 1 year ago 1 file, +35, -6
690eccbe mesh: Provide GNU basename compatible implementation Call to basename() relies on a GNU extension to take a const char * vs a char *. Let's define a trivial helper function to ensure compatibility with musl. Fixes: https://github.com/bluez/bluez/issues/843 Khem Raj 1 year ago 6 files, +57, -2
54866cee transport: Fix broadcast sink check In transport_update_playing a check is performed to guard the path which contains the TRANSPORT_STATE_BROADCASTING state. This branch should be taken only when the device on which the code runs is a broadcast sink. Thus, the UUID check is wrong, and this patch updates it appropriately. Vlad Pruteanu 1 year ago 1 file, +1, -1
daa86e06 tools/mpris-proxy: Add systemd user unit That way it will be started automatically which is convenient on phones. Distributions can then decide part of which install the unit should be. Signed-off-by: Guido Günther <agx@sigxcpu.org> Guido Günther 1 year ago 5 files, +29, -2
f30cbaa4 bluetoothctl-assistant.1: Update push command example This updates the push command example to enter the Broadcast Code, since it should be entered as a string instead of a byte array. Iulia Tanasescu 1 year ago 1 file, +10, -6
2ec77993 client/assistant: Enter Broadcast Code as string Currently, the user sets the Broadcast Code as an array of bytes when prompted from the assistant submenu. However, the Bluetooth Core Specification requires that, on the UI level, the Broadcast Code shall be represented as a string (Vol 3, Part C, 3.2.6). This commit makes the Broadcast Code be parsed as a string from the assistant prompt. The bluetoothctl log below shows a Broadcast Assistant pushing an encrypted stream to a peer: client/bluetoothctl [bluetooth]# [CHG] Controller 00:60:37:31:7E:3F Pairable: yes [bluetooth]# AdvertisementMonitor path registered [bluetooth]# scan on [bluetooth]# [NEW] Device 00:60:37:31:7E:3F 00-60-37-31-7E-3F [bluetooth]# connect 00:60:37:31:7E:3F Attempting to connect to 00:60:37:31:7E:3F [CHG] Device 00:60:37:31:7E:3F Connected: yes [00-60-37-31-7E-3F]# Connection successful [00-60-37-31-7E-3F]# [NEW] Device 19:9A:7A:71:E5:8B 19-9A-7A-71-E5-8B [00-60-37-31-7E-3F]# [NEW] Assistant /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 [00-60-37-31-7E-3F]# assistant.push /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 [Assistant] Enter Metadata (auto/value): a [Assistant] Enter Broadcast Code (auto/value): Borne House [00-60-37-31-7E-3F]# [CHG] Assistant /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 State: pending [00-60-37-31-7E-3F]# Assistant /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 pushed [00-60-37-31-7E-3F]# [CHG] Assistant /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 State: requesting [00-60-37-31-7E-3F]# [CHG] Assistant /org/bluez/hci0/src_19_9A_7A_71_E5_8B/dev_00_60_37_31_7E_3F/bis1 State: active The btmon log below shows the way the Broadcast Code string is converted into a byte array and sent to the peer via GATT: bluetoothd[6013]: < ACL Data TX: Handle 0 flags 0x00 dlen 28 ATT: Write Command (0x52) len 23 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[21]: 02018be5717a9a1900db5e3a02ffff010100000000 Opcode: Add Source (0x02) Source_Address_Type: 1 Source_Address: 19:9A:7A:71:E5:8B Source_Adv_SID: 0 Broadcast_ID: 0x3a5edb PA_Sync_State: Synchronize to PA - PAST not available PA_Interval: 0xffff Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 > ACL Data RX: Handle 0 flags 0x01 dlen 2 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 01018be5717a9a1900db5e3a0201010000000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 19:9A:7A:71:E5:8B Source_Adv_SID: 0 Broadcast_ID: 0x3a5edb PA_Sync_State: Synchronized to PA BIG_Encryption: Broadcast_Code required Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 bluetoothd[6013]: < ACL Data TX: Handle 0 flags 0x00 dlen 25 ATT: Write Command (0x52) len 20 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[18]: 040142c3b8726e6520486f75736500000000 Opcode: Set Broadcast_Code (0x04) Source_ID: 1 Broadcast_Code[16]: 426f726e6520486f7573650000000000 > ACL Data RX: Handle 0 flags 0x01 dlen 2 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 01018be5717a9a1900db5e3a0202010100000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 19:9A:7A:71:E5:8B Source_Adv_SID: 0 Broadcast_ID: 0x3a5edb PA_Sync_State: Synchronized to PA BIG_Encryption: Decrypting Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 Iulia Tanasescu 1 year ago 1 file, +14, -10
dfcbc2d3 bap: Create streams for required BISes If a BAP Broadcast Sink is acting as a Scan Delegator and it has performed long-lived PA sync with a Broadcaster added by a Broadcast Assistant, the BASE should be parsed and streams need to be created only for BISes requested by the Assistant. This adds a BASS check inside parse_base, to filter out BISes that do not require streams. The bluetoothctl log below shows a Scan Delegator registering a Broadcast Sink PAC and connecting to a Broadcast Assistant: client/bluetoothctl [bluetooth]# endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] Max Transports (auto/value): a [/local/endpoint/ep0] Locations: 3 [/local/endpoint/ep0] Supported Context (value): 1 [bluetooth]# Endpoint /local/endpoint/ep0 registered [bluetooth]# advertise on [bluetooth]# [NEW] Device 00:60:37:31:7E:3F 00-60-37-31-7E-3F The btmon log shows the Scan Delegator receiving the Add Source command from a Broadcast Assistant, requesting to sync to BIS index 2 of the provided Broadcaster. After PA sync, the BASE shows that the Broadcaster is streaming 2 BISes, both matching the audio capabilities supported by the Scan Delegator: > ACL Data RX: Handle 0 flags 0x01 dlen 1 ATT: Write Command (0x52) len 23 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[21]: 02014605638ad50e004dda9b02ffff010200000000 Opcode: Add Source (0x02) Source_Address_Type: 1 Source_Address: 0E:D5:8A:63:05:46 Source_Adv_SID: 0 Broadcast_ID: 0x9bda4d PA_Sync_State: Synchronize to PA - PAST not available PA_Interval: 0xffff Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000002 > HCI Event: LE Meta Event (0x3e) plen 50 LE Periodic Advertising Report (0x0f) Sync handle: 0 TX power: 127 dbm (0x7f) RSSI: -60 dBm (0xc4) CTE Type: No Constant Tone Extension (0xff) Data status: Complete Data length: 0x2a Service Data: Basic Audio Announcement (0x1851) Presetation Delay: 40000 Number of Subgroups: 1 Subgroup #0: Number of BIS(s): 2 Codec: LC3 (0x06) Codec Specific Configuration: #0: len 0x02 type 0x01 Codec Specific Configuration: Sampling Frequency: 16 Khz (0x03) Codec Specific Configuration: #1: len 0x02 type 0x02 Codec Specific Configuration: Frame Duration: 10 ms (0x01) Codec Specific Configuration: #2: len 0x03 type 0x04 Codec Specific Configuration: Frame Length: 40 (0x0028) Codec Specific Configuration: #3: len 0x05 type 0x03 Codec Specific Configuration: Location: 0x00000001 Codec Specific Configuration: Location: Front Left (0x00000001) BIS #0: Index: 1 BIS #1: Index: 2 Codec Specific Configuration: #0: len 0x05 type 0x03 Codec Specific Configuration: Location: 0x00000002 Codec Specific Configuration: Location: Front Right (0x00000002) Only one transport will be created, for BIS index 2, since it was the only one requested in the Add Source command: [00-60-37-31-7E-3F]# [NEW] Device 0E:D5:8A:63:05:46 0E-D5-8A-63-05-46 [00-60-37-31-7E-3F]# [NEW] Transport /org/bluez/hci0/dev_0E_D5_8A_63_05_46/bis2/fd0 Iulia Tanasescu 1 year ago 1 file, +9, -0
df4e11fa bass: Add API to check BIS required for sync This adds a wrapper over bt_bass_check_bis, which receives a Broadcaster device and a BIS index and checks is the Delegator has been instructed to sync with the specific BIS transmitted by the Source. Iulia Tanasescu 1 year ago 2 files, +16, -0
7c3821f8 shared/bass: Add API to check BIS required for sync This adds a shared/bass API to check if a BIS index of a Broadcast Source has been requested by the Broadcast Assistant to be synced with. This will be used by BAP after parsing the BASE, to filter out the streams that don't need to be created. Iulia Tanasescu 1 year ago 2 files, +15, -0
a032a570 bass: Register BAP state changed cb This registers a BAP stream state changed callback inside BASS, to monitor the state of BAP streams created by the Scan Delegator and to notify the peer Broadcast Assistants about updates. The bluetoothctl log below shows a Scan Delegator creating a media transport for a BIS added by a Broadcast Assistant through the Add Source operation. The transport is then acquired and then released: client/bluetoothctl [bluetooth]# endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] Max Transports (auto/value): a [/local/endpoint/ep0] Locations: 1 [/local/endpoint/ep0] Supported Context (value): 1 [bluetooth]# Endpoint /local/endpoint/ep0 registered [bluetooth]# advertise on [bluetooth]# [NEW] Device 00:60:37:31:7E:3F 00-60-37-31-7E-3F [00-60-37-31-7E-3F]# [NEW] Device 03:E2:C0:11:57:DA 03-E2-C0-11-57-DA [00-60-37-31-7E-3F]# [NEW] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# Endpoint: SetConfiguration [00-60-37-31-7E-3F]# Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# Properties.Device: /org/bluez/hci1/dev_03_E2_C0_11_57_DA [00-60-37-31-7E-3F]# Auto Accepting... [00-60-37-31-7E-3F]# transport.select /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# [CHG] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 State: broadcasting [00-60-37-31-7E-3F]# transport.acquire /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 auto acquiring... Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 acquiring [00-60-37-31-7E-3F]# Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 acquiring complete [00-60-37-31-7E-3F]# Acquire successful: fd 8 MTU 40:0 [00-60-37-31-7E-3F]# [CHG] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 State: active [00-60-37-31-7E-3F]# transport.release /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# Transport fd disconnected [00-60-37-31-7E-3F]# [CHG] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 State: idle [00-60-37-31-7E-3F]# Release successful The btmon log below shows the Scan Delegator notifying the peer each time the state of the stream changes: > ACL Data RX: Handle 0 flags 0x01 dlen 1 ATT: Write Command (0x52) len 23 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[21]: 0201da5711c0e203001a2d5602ffff010100000000 Opcode: Add Source (0x02) Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronize to PA - PAST not available PA_Interval: 0xffff Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x00 Adv address type: Random (0x01) Adv address: 03:E2:C0:11:57:DA (Non-Resolvable) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) Status: Success (0x00) Sync handle: 0 Advertising SID: 0x00 Advertiser address type: Random (0x01) Advertiser address: 03:E2:C0:11:57:DA (Non-Resolvable) Advertiser PHY: LE 2M (0x02) Periodic advertising interval: 10.00 msec (0x0008) Advertiser clock accuracy: 0x07 > HCI Event: LE Meta Event (0x3e) plen 42 LE Periodic Advertising Report (0x0f) Sync handle: 0 TX power: 127 dbm (0x7f) RSSI: -64 dBm (0xc0) CTE Type: No Constant Tone Extension (0xff) Data status: Complete Data length: 0x22 Service Data: Basic Audio Announcement (0x1851) Presetation Delay: 40000 Number of Subgroups: 1 Subgroup #0: Number of BIS(s): 1 Codec: LC3 (0x06) Codec Specific Configuration: #0: len 0x02 type 0x01 Codec Specific Configuration: Sampling Frequency: 16 Khz Codec Specific Configuration: #1: len 0x02 type 0x02 Codec Specific Configuration: Frame Duration: 10 ms (0x01) Codec Specific Configuration: #2: len 0x03 type 0x04 Codec Specific Configuration: Frame Length: 40 (0x0028) Codec Specific Configuration: #3: len 0x05 type 0x03 Codec Specific Configuration: Location: 0x00000001 Codec Specific Configuration: Location: Front Left BIS #0: Index: 1 > HCI Event: LE Meta Event (0x3e) plen 20 LE Broadcast Isochronous Group Info Advertising Report (0x22) Sync Handle: 0x0000 Number BIS: 1 NSE: 3 ISO Interval: 10.00 msec (0x0008) BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 SDU Interval: 10000 us (0x002710) Maximum SDU: 40 PHY: LE 2M (0x02) Framing: Unframed (0x00) Encryption: 0x00 bluetoothd[4636]: < ACL Data TX: Handle 0 flags 0x00 dlen 29 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 0101da5711c0e203001a2d560200010000000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronized to PA BIG_Encryption: Not encrypted Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 < HCI Command: LE Broadcast Isochronous Group Create Sync (0x08|0x006b) BIG Handle: 0x00 BIG Sync Handle: 0x0000 Encryption: Unencrypted (0x00) Broadcast Code[16]: 00000000000000000000000000000000 Maximum Number Subevents: 0x00 Timeout: 20000 ms (0x07d0) Number of BIS: 1 BIS ID: 0x01 > HCI Event: Command Status (0x0f) plen 4 LE Broadcast Isochronous Group Create Sync (0x08|0x006b) ncmd 1 Status: Success (0x00 > HCI Event: LE Meta Event (0x3e) plen 17 LE Broadcast Isochronous Group Sync Estabilished (0x1d) Status: Success (0x00) BIG Handle: 0x00 Transport Latency: 912 us (0x000390) NSE: 3 BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 ISO Interval: 10.00 msec (0x0008) Connection Handle #0: 10 < HCI Command: LE Setup Isochronous Data Path (0x08|0x006e) plen 13 Handle: 10 Data Path Direction: Output (Controller to Host) (0x01) Data Path: HCI (0x00) Coding Format: Transparent (0x03) Company Codec ID: Ericsson Technology Licensing (0) Vendor Codec ID: 0 Controller Delay: 0 us (0x000000) Codec Configuration Length: 0 Codec Configuration[0]: > HCI Event: Command Complete (0x0e) plen 6 LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 Status: Success (0x00) Handle: 10 bluetoothd[4636]: < ACL Data TX: Handle 0 flags 0x00 dlen 29 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 0101da5711c0e203001a2d560200010100000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronized to PA BIG_Encryption: Not encrypted Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 bluetoothd[4636]: < ACL Data TX: Handle 0 flags 0x00 dlen 29 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 0101da5711c0e203001a2d560200010000000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronized to PA BIG_Encryption: Not encrypted Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 < HCI Command: LE Broadcast Isochronous Group Terminate Sync (0x08|0x006c) BIG Handle: 0x00 > HCI Event: Command Complete (0x0e) plen 5 LE Broadcast Isochronous Group Terminate Sync (0x08|0x006c) ncmd 1 Status: Success (0x00) Iulia Tanasescu 1 year ago 1 file, +58, -0
c6278d24 shared/bass: Add APIs to set/clear BIS sync bits This adds shared/bass APIs to set/clear bits inside the BIS sync bitmask of Broadcast Receive State characteristics. Notifications are sent to the peers each time the characteristic is updated. Iulia Tanasescu 1 year ago 2 files, +54, -0
ea7b6910 bap: Probe Broadcasters with BASS After long-lived PA sync, this adds a call to probe the bap session with the Broadcaster with BASS. This also adds a call to notify BASS about a session with a Broadcaster being removed, in bap_bcast_remove. The bluetoothctl log below shows a Scan Delegator creating a media transport for a BIS added by a Broadcast Assistant through the Add Source command, and then disconnecting from the Broadcaster: client/bluetoothctl [bluetooth]# endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] Max Transports (auto/value): a [/local/endpoint/ep0] Locations: 1 [/local/endpoint/ep0] Supported Context (value): 1 [bluetooth]# Endpoint /local/endpoint/ep0 registered [bluetooth]# advertise on [bluetooth]# [NEW] Device 00:60:37:31:7E:3F 00-60-37-31-7E-3F [00-60-37-31-7E-3F]# [NEW] Device 03:E2:C0:11:57:DA 03-E2-C0-11-57-DA [00-60-37-31-7E-3F]# [NEW] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# disconnect 03:E2:C0:11:57:DA Attempting to disconnect from 03:E2:C0:11:57:DA [00-60-37-31-7E-3F]# [DEL] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 [00-60-37-31-7E-3F]# [DEL] Device 03:E2:C0:11:57:DA 03-E2-C0-11-57-DA The btmon log below shows that after PA sync is established inside the BAP plugin, the Scan Delegator sends a GATT notification to inform the Broadcast Assistant that PA sync has been established. Once the Broadcaster device is deleted, PA sync is terminated and the Scan Delegator once again notifies the peer about the update: > ACL Data RX: Handle 0 flags 0x01 dlen 1 ATT: Write Command (0x52) len 23 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[21]: 0201da5711c0e203001a2d5602ffff010100000000 Opcode: Add Source (0x02) Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronize to PA - PAST not available PA_Interval: 0xffff Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x00 Adv address type: Random (0x01) Adv address: 03:E2:C0:11:57:DA (Non-Resolvable) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) Status: Success (0x00) Sync handle: 0 Advertising SID: 0x00 Advertiser address type: Random (0x01) Advertiser address: 03:E2:C0:11:57:DA (Non-Resolvable) Advertiser PHY: LE 2M (0x02) Periodic advertising interval: 10.00 msec (0x0008) Advertiser clock accuracy: 0x07 > HCI Event: LE Meta Event (0x3e) plen 42 LE Periodic Advertising Report (0x0f) Sync handle: 0 TX power: 127 dbm (0x7f) RSSI: -64 dBm (0xc0) CTE Type: No Constant Tone Extension (0xff) Data status: Complete Data length: 0x22 Service Data: Basic Audio Announcement (0x1851) Presetation Delay: 40000 Number of Subgroups: 1 Subgroup #0: Number of BIS(s): 1 Codec: LC3 (0x06) Codec Specific Configuration: #0: len 0x02 type 0x01 Codec Specific Configuration: Sampling Frequency: 16 Khz Codec Specific Configuration: #1: len 0x02 type 0x02 Codec Specific Configuration: Frame Duration: 10 ms (0x01) Codec Specific Configuration: #2: len 0x03 type 0x04 Codec Specific Configuration: Frame Length: 40 (0x0028) Codec Specific Configuration: #3: len 0x05 type 0x03 Codec Specific Configuration: Location: 0x00000001 Codec Specific Configuration: Location: Front Left BIS #0: Index: 1 > HCI Event: LE Meta Event (0x3e) plen 20 LE Broadcast Isochronous Group Info Advertising Report (0x22) Sync Handle: 0x0000 Number BIS: 1 NSE: 3 ISO Interval: 10.00 msec (0x0008) BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 SDU Interval: 10000 us (0x002710) Maximum SDU: 40 PHY: LE 2M (0x02) Framing: Unframed (0x00) Encryption: 0x00 bluetoothd[4636]: < ACL Data TX: Handle 0 flags 0x00 dlen 29 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 0101da5711c0e203001a2d560200010000000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronized to PA BIG_Encryption: Not encrypted Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 bluetoothd[70621]: < ACL Data TX: Handle 0 flags 0x00 dlen 29 ATT: Handle Multiple Value Notification (0x23) len 24 Length: 0x0014 Handle: 0x003a Type: Broadcast Receive State (0x2bc8) Data[20]: 0101dd7c8046f72a00f863f00000010000000000 Source_ID: 1 Source_Address_Type: 1 Source_Address: 2A:F7:46:80:7C:DD Source_Adv_SID: 0 Broadcast_ID: 0xf063f8 PA_Sync_State: Not synchronized to PA BIG_Encryption: Not encrypted Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 < HCI Command: LE Periodic Advertising Terminate Sync (0x08|0x0046) plen 2 Sync handle: 0x0000 > HCI Event: Command Complete (0x0e) plen 4 LE Periodic Advertising Terminate Sync (0x08|0x0046) ncmd 1 Status: Success (0x00 Iulia Tanasescu 1 year ago 1 file, +6, -0
f3a43bd0 bass: Add APIs to probe/remove Broadcasters This adds BASS APIs to probe/remove Broadcasters probed by BAP. The BAP plugin might probe Broadcasters that were either scanned autonomously, or that were added by a Broadcast Assistant through BASS. After performing long-lived PA sync with a Broadcaster added by a Broadcast Assistant, the BAP plugin will call the BASS probe API, to inform BASS that PA has been established with the Broadcast Source and to provide a reference to the created bt_bap session. Once a Broadcaster has been probed, BASS will update the PA sync state inside the corresponding Broadcast Receive State characteristic and the peer Broadcast Assistant will be notified about the update. Once the BAP session with a Broadcaster is deleted, the BASS remove API will be called, to inform BASS that the Source is no longer active. The BASS plugin will update the PA sync field of the corresponding Broadcast Receive State characteristic and it will notify the peer Broadcast Assistant that PA sync is no longer established with the Source. Iulia Tanasescu 1 year ago 2 files, +54, -0
06d20a80 shared/bass: Add API to set PA sync state This adds a shared/bass API to set the PA sync state field inside a Broadcast Receive State characteristic. Notifications are then sent, to inform all peers about the update. Iulia Tanasescu 1 year ago 2 files, +35, -0
4191ff1c bass: Register cp handler for Add Source cmd This registers a control point handler with shared/bass, for each eastablished BASS session. For now, only the Add Source opcode is handled. Using the parameters provided from shared/bass, a device is created for the Broadcaster address. The device is then probed with BAP, where long-lived PA sync will be established. After parsing the BASE, transports are created for each BIS, as if the Broadcast Sink scanned the Broadacaster autonomously. Below is a bluetoothctl log which shows a Scan Delegator starting to advertise, connecting to a Broadcast Assistant, receiving the Add Source command for a Broadcaster streaming one BIS, creating a device for the Broadcaster and then creating a transport for the BIS: client/bluetoothctl [bluetooth]# endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] Max Transports (auto/value): a [/local/endpoint/ep0] Locations: 1 [/local/endpoint/ep0] Supported Context (value): 1 [bluetooth]# Endpoint /local/endpoint/ep0 registered [bluetooth]# advertise on [bluetooth]# [NEW] Device 00:60:37:31:7E:3F 00-60-37-31-7E-3F [00-60-37-31-7E-3F]# [NEW] Device 03:E2:C0:11:57:DA 03-E2-C0-11-57-DA [00-60-37-31-7E-3F]# [NEW] Transport /org/bluez/hci1/dev_03_E2_C0_11_57_DA/bis1/fd0 The btmon log below shows the GATT write command with the Add Source opcode, which was received from the Broadcast Assistant. It also shows the long-lived PA sync performed by BAP: > ACL Data RX: Handle 0 flags 0x01 dlen 1 ATT: Write Command (0x52) len 23 Handle: 0x0040 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[21]: 0201da5711c0e203001a2d5602ffff010100000000 Opcode: Add Source (0x02) Source_Address_Type: 1 Source_Address: 03:E2:C0:11:57:DA Source_Adv_SID: 0 Broadcast_ID: 0x562d1a PA_Sync_State: Synchronize to PA - PAST not available PA_Interval: 0xffff Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000001 < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) Options: 0x0000 Use advertising SID, Advertiser Address Type and address Reporting initially enabled SID: 0x00 Adv address type: Random (0x01) Adv address: 03:E2:C0:11:57:DA (Non-Resolvable) Skip: 0x0000 Sync timeout: 20000 msec (0x07d0) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 16 LE Periodic Advertising Sync Established (0x0e) Status: Success (0x00) Sync handle: 0 Advertising SID: 0x00 Advertiser address type: Random (0x01) Advertiser address: 03:E2:C0:11:57:DA (Non-Resolvable) Advertiser PHY: LE 2M (0x02) Periodic advertising interval: 10.00 msec (0x0008) Advertiser clock accuracy: 0x07 > HCI Event: LE Meta Event (0x3e) plen 42 LE Periodic Advertising Report (0x0f) Sync handle: 0 TX power: 127 dbm (0x7f) RSSI: -64 dBm (0xc0) CTE Type: No Constant Tone Extension (0xff) Data status: Complete Data length: 0x22 Service Data: Basic Audio Announcement (0x1851) Presetation Delay: 40000 Number of Subgroups: 1 Subgroup #0: Number of BIS(s): 1 Codec: LC3 (0x06) Codec Specific Configuration: #0: len 0x02 type 0x01 Codec Specific Configuration: Sampling Frequency: 16 Khz Codec Specific Configuration: #1: len 0x02 type 0x02 Codec Specific Configuration: Frame Duration: 10 ms (0x01) Codec Specific Configuration: #2: len 0x03 type 0x04 Codec Specific Configuration: Frame Length: 40 (0x0028) Codec Specific Configuration: #3: len 0x05 type 0x03 Codec Specific Configuration: Location: 0x00000001 Codec Specific Configuration: Location: Front Left BIS #0: Index: 1 > HCI Event: LE Meta Event (0x3e) plen 20 LE Broadcast Isochronous Group Info Advertising Report (0x22) Sync Handle: 0x0000 Number BIS: 1 NSE: 3 ISO Interval: 10.00 msec (0x0008) BN: 1 PTO: 1 IRC: 3 Maximum PDU: 40 SDU Interval: 10000 us (0x002710) Maximum SDU: 40 PHY: LE 2M (0x02) Framing: Unframed (0x00) Encryption: 0x00 Iulia Tanasescu 1 year ago 1 file, +79, -0
b8530f0d bap: Add API for Scan Delegator probe Since a BAP Broadcast Sink might probe Broadcasters autonomously or with the help of a Broadcast Assistant, BAP needs to support 2 types of Broadcaster probing: short-lived and long-lived. This adds a BAP API for Scan Delegators probe Broadcaster devices long-lived. Iulia Tanasescu 1 year ago 2 files, +39, -7
b65767c5 bap: Add support for long-lived PA sync This adds BAP support for long-lived PA sync. A BAP Broadcast Sink might probe Broadcasters autonomoulsy (by performing short-lived PA sync to parse the BASE and discover streams), or it might act as a Scan Delegator, probing Broadcasters added by a Broadcast Assistant. If the Assistant requested the Delegator to establish PA sync with a Broadcaster, the PA sync should be long-lived (it should remain active until requested otherwise by the Assistant). Iulia Tanasescu 1 year ago 1 file, +48, -16
0446d1ee shared/bass: Call cp handler for the Add Source cmd This updates the Add Source control point handler inside shared/bass to call the handlers queued inside bt_bass, so the required sync operations will be properly handled by the plugins that registered callbacks. Iulia Tanasescu 1 year ago 1 file, +28, -11
30c19008 shared/bass: Add support to register cp handlers The BASS Broadcast Audio Scan Control Point characteristic defines a number of commands that require the BASS Server to sync to Broadcasters. This should be handled inside the BASS plugin. This commit adds shared/bass APIs to register control point handlers with bt_bass. The BASS plugin will use these APIs to register a control point callback to handle each operation based on opcode and parameters. Iulia Tanasescu 1 year ago 2 files, +77, -0
8abcfd70 shared/bass: Remove io handling Socket connect/listen procedures should not be handled inside src/shared. The BASS plugin should be the one to handle these socket operations. This removes IO handling from shared/bass. Iulia Tanasescu 1 year ago 1 file, +2, -313
25119b6a shared/bass: Make bt_bcast_src private The bt_bcast_src structure holds information for the BASS Broadcast Audio Receive State characteristic. This commit makes this structure private for shared/bass, since this is the only place where GATT characteristics should be handled. Iulia Tanasescu 1 year ago 2 files, +30, -29
38b7dc7d shared/bass: Register ATT disconnect cb This registers an ATT disconnect callback with bass, to properly clean uo the session if the ATT connection is removed. Iulia Tanasescu 1 year ago 1 file, +45, -1
4ecfdef3 bap: Refresh qos stored in setup before doing BIG sync When syncing to an encrypted stream, after setting the broadcast code, the qos values stored in the setup must be refreshed so that they reflect this change. Vlad Pruteanu 1 year ago 1 file, +2, -0
35f2bb95 client/player: Prompt the user to enter the bcode This adds support for entering the broadcast code on sink side. When the user selects a transport, if the transport is encrypted, the user will be prompted to enter the broadcast code before the process of transport selection can continue. Vlad Pruteanu 1 year ago 1 file, +59, -0
8d43c209 shared/bap: Enable set qos method for BT_BAP_BCAST_SINK stream This enables the set qos method, bap_bcast_qos, for the bcast sink streams as well. Vlad Pruteanu 1 year ago 1 file, +1, -1
c922cc4a transport: Add set_bcast_qos method This adds a set method for the QoS property of bcast transports. This is needed so that applications like bluetoothctl are able to modify the QoS (for example, for setting the broadcast code). Vlad Pruteanu 1 year ago 1 file, +35, -2
b48d3664 doc/media: Make QoS property readwrite Update the QoS property to allow for write, so that fields such as BCode can be updated. Vlad Pruteanu 1 year ago 1 file, +2, -2
a1bde349 gdbus: Add g_dbus_proxy_set_property_dict This adds a new gdbus function to allow for the setting of a dictionary-type property (a{sv}). It receives the name of the property, the name of the first entry to be set from the dictionary, it's type and value, followed by the second pair of entry_name, type, value, and so on, marking the end of the entries with NULL. Additionally, if the type is an array, the type of the array and it's length must also be proviedd. These values are passed as a dict entry, to the set method associated with the property. There, it must be parsed and the appropriate entry updated. Example of usage: g_dbus_proxy_set_property_dict(proxy, "dict_property_name", cb, user_data, NULL, "entry_1", DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, value_1_len, value_1, "entry_2", DBUS_TYPE_BYTE, value_2, NULL) Vlad Pruteanu 1 year ago 2 files, +121, -0
f72fd826 transport: Make get_bcast_qos return the encryption flag This adds the encryption flag to the response returned by the get_bcast_qos method. Vlad Pruteanu 1 year ago 1 file, +2, -0
5c9431fc doc/media: Add Encryption and BCode fields to QoS property This adds the missing QoS fields, Encryption and BCode. Vlad Pruteanu 1 year ago 1 file, +8, -0
e8575b61 Release 5.78 Marcel Holtmann 1 year ago 2 files, +11, -1
60257ab8 build: Update library version Marcel Holtmann 1 year ago 1 file, +1, -1
Previous Next