Commits

Commit Message Author Age Changes
dc8db360 client: Add prompt to enter metadata for custom presets When adding a custom preset prompt the user to enter metadata for it e.g.: [bluetoothctl]> endpoint.presets 00002bcb-0000-1000-8000-00805f9b34fb 0x06 custom [Codec] Enter frequency (Khz): ** [Codec] Enter frame duration (ms): * [Codec] Enter channel allocation: * [Codec] Enter frame length: ** [Metadata] Enter Metadata (value/no): <len> <type> <value...> Luiz Augusto von Dentz 6 months ago 2 files, +24, -3
5018c40e shared/bap: Fix not using metadata set on stream->meta bt_bap_stream_metadata maybe used before enabling state in which case it will be store in the stream->meta so when processing bt_bap_stream_enable if there is no metadata set use the existing one set in stream->meta. Luiz Augusto von Dentz 6 months ago 2 files, +45, -14
be36a9c9 shared/gatt-client: Make bt_gatt_client_read use bt_gatt_client_read_long This makes bt_gatt_client_read use bt_gatt_client_read_long since the later does use BT_ATT_OP_READ_REQ for reading the first chunk, so they are actually equivalent in this respect, but bt_gatt_client_read_long detects when the data returned maybe truncated due to MTU and then proceed to use BT_ATT_OP_READ_BLOB_REQ to read the remaining chunks which is a disarable behavior since there is no property indicating when an attribute would require long read procedure. Luiz Augusto von Dentz 6 months ago 1 file, +2, -66
3c20aa6c iso-tester: Fix crashing while attemping to access isodata Some tests may not set any isodata causing the following crash: Invalid read of size 1 at 0x40067A8: setup_powered_callback (iso-tester.c:1691) by 0x40232D5: request_complete (mgmt.c:306) by 0x40242B3: can_read_data (mgmt.c:394) by 0x4028529: watch_callback (io-glib.c:173) by 0x493D87F: ??? (in /usr/lib64/libglib-2.0.so.0.8400.2) by 0x49467A7: ??? (in /usr/lib64/libglib-2.0.so.0.8400.2) by 0x4946A4E: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.8400.2) by 0x402ABFD: mainloop_run (mainloop-glib.c:65) by 0x402B1D4: mainloop_run_with_signal (mainloop-notify.c:196) by 0x402A3F5: tester_run (tester.c:1076) by 0x40050FE: main (iso-tester.c:4010) Address 0xa8 is not stack'd, malloc'd or (recently) free'd Luiz Augusto von Dentz 6 months ago 1 file, +7, -3
6bc584b1 bass: support for encrypted broadcast source If the BIS is encrypted as indicated in the BIG Info Report, the broadcast code needs to be requested from the Assistant. step 1: Broadcast_Code required > HCI Event: LE Meta Event (0x3e) plen 20 #631 [hci0] 27.176606 LE Broadcast Isochronous Group Info Advertising Report (0x22) Sync Handle: 0x0000 Number BIS: 2 NSE: 8 ISO Interval: 20.00 msec (0x0010) BN: 2 PTO: 2 IRC: 2 Maximum PDU: 60 SDU Interval: 10000 us (0x002710) Maximum SDU: 60 PHY: LE 2M (0x02) Framing: Unframed (0x00) Encryption: 0x01 < ACL Data TX: Handle 16 flags 0x00 dlen 44 #633 [hci0] 27.184478 ATT: Handle Value Notification (0x1b) len 39 Handle: 0x005f Type: Broadcast Receive State (0x2bc8) Data[37]: 01016698a411bb13019f103b02010100000000110d03506978656c20395f32303938020502 Source_ID: 1 Source_Address_Type: 1 Source_Address: 13:BB:11:A4:98:66 Source_Adv_SID: 1 Broadcast_ID: 0x3b109f PA_Sync_State: Synchronized to PA BIG_Encryption: Broadcast_Code required Num_Subgroups: 1 Subgroup #0: BIS_Sync State: 0x00000000 Metadata: #0: len 0x0d type 0x03 Metadata: 50 69 78 65 6c 20 39 5f 32 30 39 38 Pixel 9_2098 Metadata: #1: len 0x02 type 0x05 Metadata: 02 > ACL Data RX: Handle 16 flags 0x02 dlen 25 #636 [hci0] 27.455744 ATT: Write Command (0x52) len 20 Handle: 0x0065 Type: Broadcast Audio Scan Control Point (0x2bc7) Data[18]: 04013a4931614b3a2b7c4b7431722b666724 Opcode: Set Broadcast_Code (0x04) Source_ID: 1 Broadcast_Code[16]: 3a4931614b3a2b7c4b7431722b666724 step 2: Set Broadcast Code when BIG Create Sync < HCI Command: LE Broadcast Isoc.. (0x08|0x006b) plen 26 #641 [hci0] 27.669211 BIG Handle: 0x00 BIG Sync Handle: 0x0000 Encryption: Encrypted (0x01) Broadcast Code[16]: 3a4931614b3a2b7c4b7431722b666724 Maximum Number Subevents: 0x00 Timeout: 20000 ms (0x07d0) Number of BIS: 2 BIS ID: 0x01 BIS ID: 0x02 Fixes: https://github.com/bluez/bluez/issues/1306 Yang Li 7 months ago 1 file, +32, -0
39d96518 shared/bass: Move cb->handle earlier in the flow This change ensures cb->handle is executed even if the function returns early in the attribute_notify section. It also allows the stream status to be updated before notifying the client, improving efficiency. Yang Li 7 months ago 1 file, +14, -15
aea0f46f Revert "obexd: Support creating private system/session bus connections" This reverts commit 237d818ef294e22be87fba69b3cdd79c75c201e7, which encouraged the use of private DBus connections. Doing so caused a bug, so it's better to remove the temptation for now and re-add it if a legitimate use case is ever found. Andrew Sayers 7 months ago 2 files, +0, -10
df0036d9 pbap: use the public DBus connection PBAP must not use its own private DBus connection, as it needs to receive messages sent to the bus name of the public connection. PBAP must not unregister itself when the program is exiting, as it might cause a long delay. Unregistering at exit is redundant anyway, as the service will be implicitly unregistered when the connection is closed. But PBAP must unregister itself when the user becomes inactive mid-session, so systems with multiple users logged in at once can share bluetooth. Use the public DBus connection instead of a private one, and explicitly unregister the profile if appropriate. Thanks Pauli Virtanen for pointing out the exit issue: https://lore.kernel.org/linux-bluetooth/ae15a9fa4bf0bd509dd3d44f1f364e241e50956c.camel@iki.fi/ Reported-by: Frédéric Danis <frederic.danis@collabora.com> Closes: https://lore.kernel.org/linux-bluetooth/333ad76e-0aba-4f93-b141-8e69fb47535f@collabora.com/ Suggested-by: Pauli Virtanen <pav@iki.fi> Andrew Sayers 7 months ago 1 file, +21, -3
883c1c11 obexd: Pass at_(un)register value to logind callbacks Logind (un)registers callbacks that it calls when the user's state changes. Callbacks may also be called during (un)registration. Clients may need to handle those initial/final calls specially. Pass an argument indicating whether this is being called during (un)registration, and modify existing callbacks to ignore that argument. Andrew Sayers 7 months ago 4 files, +19, -15
b7dfccf0 doc: sco.rst: BT_PHY is read-only The kernel is missing BT_PHY setsockopt support, as of 6.16-rc1. ValdikSS 7 months ago 1 file, +1, -1
95b72bbf bap: Fix not responding to SetConfiguration For broadcast the SetConfiguration would call setup_config which were not calling the callback so no reply was generated which brakes the likes of client/script/broadcast-source.bt as endpoint.config would not complete without a reply. Luiz Augusto von Dentz 7 months ago 1 file, +2, -2
1e9dae57 iso-tester: Add more tests for getpeername This tests setting SID for broadcast source in adition to existing test that was testing broadcast sink only, so this adds/updates the following test: ISO Broadcaster SID auto - Success ISO Broadcaster SID 0x01 - Success ISO Broadcaster Receiver SID auto - Success ISO Broadcaster Receiver SID 0x01 - Success Luiz Augusto von Dentz 7 months ago 5 files, +72, -13
4bae3908 btdev: Fix not setting sid on BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED The event BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED shall set the SID accourding to the value set in the periodic advertisement it is synchronized since the kernel will use that to complete the connection and notify the socket. Luiz Augusto von Dentz 7 months ago 1 file, +1, -0
dd83c2d6 emulator: server: handle ISO, use BR/EDR+LE 5.2 by default Allow passing of ISO packets via the socket by parsing their header. Set version to 5.2 to expose ISO/CIS and other LE Audio related features when using server mode. Dmitrii Sharshakov 7 months ago 2 files, +17, -2
bb614960 emulator: add option to listen on TCP Dmitrii Sharshakov 7 months ago 3 files, +25, -7
0f5f6cad btdev: fix LE Remove ISO Data Path command Fix errors in BAP server Dmitrii Sharshakov 7 months ago 1 file, +16, -12
964585e3 btdev: implement extended advertising Increase maximum advertising data length and implement LE Read Maximum Advertising Data Length command. As expected by Zephyr BAP Server Dmitrii Sharshakov 7 months ago 1 file, +18, -7
7feff47a bap: delay QoS & IO creation if CIG is busy or setups configuring Unicast Client IO creation / activation should be done synchronously for whole adapter, as active CIG has to be removed before it can be reconfigured (Core v6.0 Sec 4.5.14.3). Some adapters support only one active CIG. Move related logic to bap_update_cig*() which does QoS and IO creation as needed by current state. If CIG is active or setups are being configured or closed, delay transitions to QoS and IO recreation until that completes. Also delay activating CIG (= enabling CIS) until setups have finished readying or closing. Operations are delayed within the same CIG, with the exception that streams with unassigned CIG delay every CIG. This is because such streams are likely meant to go to some existing CIG, so we must wait them to be configurable before asking kernel to assign IDs. Fixes race conditions: * setup starts readying while CIG is active * CIG is activated while a setup is readying * new stream creates IO before old stream IO is recreated These result to kernel assigning new streams to a different CIG (problematic on controllers that can do only one) or CIS ID conflicts. Pauli Virtanen 7 months ago 1 file, +261, -85
1d390756 bap: don't show error when releasing stream When stream is released, just set transport to not playing and don't show error about missing io. Pauli Virtanen 7 months ago 1 file, +2, -1
128b0695 bap: implement Reconfigure() Add Reconfigure() on a BAP unicast endpoint, which triggers its reconfiguration or marks it for reconfiguration. First, all associated streams are closed. After that, endpoints marked for reconfiguration are reconfigured using the same flow as in the initial configuration. Pauli Virtanen 7 months ago 1 file, +146, -5
bb63339e bap: add callback at the end of ucast client select/config Restructure pac_select() and add a callback that is called when all setups reach QoS. Pauli Virtanen 7 months ago 1 file, +133, -39
9e0dc968 bap: support removing streams with ClearConfiguration() Implement removing streams via ClearConfiguration(). Pauli Virtanen 7 months ago 3 files, +185, -17
ebed99ca bap: add ready callback for setup configuration Operations like SetConfiguration need to wait until setup configuration finishes. Abstract this to a setup_config() callback emitted on QoS completion or failure, instead of hardcoding DBus reply. Pauli Virtanen 7 months ago 1 file, +112, -67
40b91712 bap: lock streams when used Indicate to lower layer when we are using the streams. When setup is freed, make sure the corresponding stream is released after unlocking. Pauli Virtanen 7 months ago 1 file, +20, -1
d1eb496c shared/bap: add client ASE reuse and upper level stream locking Change ucast client stream design so that: * upper level locks streams to indicate which ones it is using * unused streams are reused when upper level wants a new stream * only locked streams are used for bidi CIS linking * streams (still) correspond 1-to-1 to non-idle ASEs This fixes some issues: * bap_ucast_stream_new() could pick a stream upper level is already using if lpac & rpac match (can occur with multi-stream AC 6(ii) etc) * Avoids assuming ASE enters idle state at end of stream life cycle. This is False for some devices like Sony headsets, which always cache codec config so RELEASING -> CONFIG always, never RELEASING -> IDLE, so ASE never go IDLE again. * Allows reconfiguring an ASE with different codec in this case. * Allows upper level to only QoS some of the streams. Reconfiguring ASE in QOS/CONFIG state with different codec here results to need_reconfig=true state, where ASE and stream configs do not match, and upper level needs to do bt_bap_stream_config() to sync them. Pauli Virtanen 7 months ago 2 files, +89, -47
2f853e4d shared/bap: detach ucast io on RELEASING and unlink streams When RELEASING, ucast stream QoS becomes invalid and client stream transport can no longer be acquired. Client shall close the CIS when ASE is RELEASING (BAP v1.0.2 §5.6.6). As client, detach IO when RELEASING. Clear the stream links, as the QoS is no longer valid. Even if caching config the ASE may be reused for different purpose, and stream will anyway be reconfigured & re-linked as needed. Also clear the stream transport, as it's not in acquirable state, and its configuration may change after this. This makes BAP Client to have existing transports only for streams that are >= QOS. (BAP Server is not changed here.) Pauli Virtanen 7 months ago 1 file, +33, -2
7d8eaa56 bap: do not try QoS before links are updated & io created In setup config, QoS must be done after corresponding bap_state callback, because stream links are updated only at that point. If the ASE was in CONFIG state before reconfiguration, this gets done in wrong order. Track explicitly that bap_state() is done after bt_bap_stream_config(), before proceeding to QoS. Pauli Virtanen 7 months ago 1 file, +49, -33
b39c37d2 monitor: Add support for decoding Channel Sounding Add initial support for decoding commands and events of Channel Sounding, a new feature introduced in Bluetooth Core Specification Version 6.0 | Vol 1, Part A, Section 9 "Channel Sounding Using Bluetooth Low Energy". Testing: To test the feature you need a hardware that supports Channel Sounding. Channel Sounding can be tested using Nordic Semiconductor's sample applications for the Initiator and Reflector roles, which are available as part of the nRF Connect SDK and require an nRF54L15 development kit. See tutorials: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/channel_sounding_ras_initiator/README.html https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/channel_sounding_ras_reflector/README.html Example output from btmon: > HCI Event: LE Meta Event (0x3e) plen 250 #102 7.954000 LE CS Subevent Result (0x31) Connection handle: 0 Config ID: 0 Start ACL Conn Event Counter: 53 Procedure Counter: 0 Frequency Compensation: 49152 Reference Power Level: 237 Procedure Done Status: Partial results with more to follow for the CS procedure (0x01) Subevent Done Status: Partial results with more to follow for the CS subevent (0x01) Abort reason: 0x00 Procedure: Report with no abort (0x00) Subevent: Report with no abort (0x00) Num Antenna Paths: 1 Num Steps Reported: 22 Steps data: [234]: 00e801024709000702f4000aa2f420022e0900d05df900d0edf820021009007251e400e27f001201100600ffe8f8ff01022d0900c5fd0200c7fd0220023c090029b11d0015911e2002030900bc002200e8effe1201030600ffe7f6ff01022b0900646f220041bf2120022c0900a75f23000820fe1202210900d93ee1001d80001202230900e00ee10000dfdf2001230600ffe71c0001023d090029d2fa00e24f0012021f0900c04d0100c18d022002050900674023005780232001050600ffe80f0001020e090077b0dc005c60dc20022209001f3eec00fcff01120000000000000f0003000005082800 Step 0 Mode: 0 Channel: 3 Step data len: 3 Raw step data: [3]: 00e801 Packet Quality: 0x00 CS Access Address check is successful, and all bits match the expected sequence Bit errors: 0 Packet RSSI: -24 Packet Antenna: 1 ... Step 3 Mode: 2 Channel: 71 Step data len: 9 Raw step data: [9]: 000702f4000aa2f420 Antenna Permutation Index: 0 Path 0 PCT: 0xf40207 I: 0x207 Q: 0xf40 Tone quality indicator: 0x00 Tone quality is high (0x00) Not tone extension slot (0x00) Path 1 PCT: 0xf4a20a I: 0x20a Q: 0xf4a Tone quality indicator: 0x20 Tone quality is high (0x00) Tone extension slot; tone expected to be present (0x02) ... Step 6 Mode: 1 Channel: 16 Step data len: 6 Raw step data: [6]: 00ffe8f8ff01 Packet Quality: 0x00 CS Access Address check is successful, and all bits match the expected sequence Bit errors: 0 Packet NADM: Unknown NADM (0xff) Packet RSSI: -24 ToA_ToD: 0xfffffff8 Packet Antenna: 1 Magdalena Kasenberg 7 months ago 2 files, +1521, -0
45734349 shared/bap: check lpac type in bap_bcast_stream_new() bap_bcast_stream_new() shall refuse to create streams if lpac is not of broadcast type. Pauli Virtanen 7 months ago 1 file, +2, -0
bbd10bb9 client: Add script to PBP This adds a client script for testing Public Broadcast Profile. Luiz Augusto von Dentz 7 months ago 1 file, +19, -0
5499681b client: Use -EINPROGRESS with scan and advertise command This uses -EINPROGRESS with commands scan and advertise since they need to keep running in the background so they don't exit but shouldn't block other command from executing in case they are invoked from a script. Luiz Augusto von Dentz 7 months ago 2 files, +4, -8
7d59391b shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit This enables commands to call bt_shell_noninteractive_quit with status set to -EINPROGRESS to indicate their execution is in progress and shall not exit in case of MODE_NONINTERACTIVE but it can proceed to the next command for MODE_INTERACTIVE. Luiz Augusto von Dentz 7 months ago 1 file, +6, -0
f09f3319 client: Add assistant.show This adds assistant.show command: assistant.show --help Assistant information Usage: show [assistant] Luiz Augusto von Dentz 7 months ago 2 files, +67, -3
04c32f3d client: Add assistant.list This adds assistant.list command: assistant.list --help List available assistants Usage: list Luiz Augusto von Dentz 7 months ago 2 files, +21, -0
4a7ee309 adapter: Fix exposing coordinate sets if LE Audio is disabled This fixes exposing non-discoverable coordinate set members if LE Audio is disabled since it may lead system device setting showing them to user that may attempt to pair them and end up not working. Fixes: https://github.com/bluez/bluez/issues/523 Luiz Augusto von Dentz 7 months ago 1 file, +5, -4
8ad12fe7 monitor: Fix bit for HCI_LE_Read_ISO_Link_QUALITY Fix the bit ID of the HCI_LE_Read_ISO_Link_QUALITY command to match the assigned value defined in Supported_Commands table in the Bluetooth Core Specification. Magdalena Kasenberg 7 months ago 1 file, +1, -1
99861c24 Do not start mpris-proxy for system users A default installation of bluez results in the systemd user unit mpris-proxy.service being started for all users---including root. This unnecessarily exposes system users to any security vulnerabilities in mpris-proxy. Inhibit this default behavior by using ConditionUser=!@system. Reviewed-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-by: Andrew Sayers <kernel.org@pileofstuff.org> Antonio Russo 7 months ago 1 file, +1, -0
52fb0d4d doc: Remove extra identation This remove the extra identation which doesn't really matter for manpages. Luiz Augusto von Dentz 7 months ago 44 files, +2414, -2420
d97d1951 Release 5.83 Marcel Holtmann 7 months ago 2 files, +10, -1
aed4948c MediaAssistant: Refactor object path This includes the SID as part of the object path, also rework the order of order of the terms to first show the device object path and later the broadcast source address so device_get_path can be used instead of doing another conversion. Luiz Augusto von Dentz 7 months ago 2 files, +4, -5
a805bae3 bass: Fix not setting SID for assistant objects The assistant objects shall contain the SID so it can properly be sent with MediaAssistant.Push/BT_BASS_ADD_SRC. Luiz Augusto von Dentz 7 months ago 1 file, +7, -4
5ad6ec15 bass: Fix not using SID from BT_BASS_ADD_SRC BT_BASS_ADD_SRC command does actually have the SID of the broadcast source which must be set otherwise the kernel would assume it to be 0x00 which may not always be the case. Fixes: https://github.com/bluez/bluez/issues/1282 Luiz Augusto von Dentz 7 months ago 1 file, +4, -0
760c6c2e build: Fix make dist This fixes the make dist cuasing the following error: make[2]: *** No rule to make target 'doc/mgmt-api.txt', needed by 'distdir-am'. Stop. Luiz Augusto von Dentz 7 months ago 1 file, +1, -2
a5f3e243 audio/mcp: Fix passing callbacks as reference Callbacks are already a function pointer. Luiz Augusto von Dentz 7 months ago 1 file, +11, -28
f2cc3705 audio/player: Fix not being able to register players of different types When registering players both AVRCP and MCP were using the same object path making them clash, so this fix it by adding a type to the object path so each profile can register their player in their own domain. Fixes: https://github.com/bluez/bluez/issues/1290 Luiz Augusto von Dentz 7 months ago 4 files, +8, -5
2a552b93 policy: Fix service retry counters reset Control and Target retries counter were reset when service state goes from CONNECTED to DISCONNECTED, but usually an extra DISCONNECTING state is reached before going to DISCONNECTED. This causes retry counter to not being reset in this case, leading to service not being able to initialize on next connection. Source, sink and HS retry counter were only reset when limit was reached, moreover HS timer was not removed on CONNECTED state. Reset all service retry counter as soon as CONNECTED state is reached to avoid that. Also remove hs timer to match other services. Remi Pommarel 7 months ago 1 file, +9, -4
088de118 shared/bap: Fix not handling read offset Some attributes may need to handle offset other than 0 in case read long procedure is used, so this properly handles that for PAC_SINK_CHRC_UUID and PAC_SOURCE_CHRC_UUID. In addition to PAC record this also uses gatt_db_attribute_set_fixed_length for attributes that are considered of fixed size so gatt_db can handle offset directly. Fixes: https://github.com/bluez/bluez/issues/1294 Luiz Augusto von Dentz 7 months ago 1 file, +24, -4
b14bfe90 mgmt-api: Remove text only documentation This removes mgmt-api.txt since all its information is covered in mgmt.rst. Luiz Augusto von Dentz 7 months ago 1 file, +0, -5201
05967f56 mgmt: Add revision information for fields This adds revision information for fields that were added/updated causing them to be different then the revision of the command itself. Luiz Augusto von Dentz 7 months ago 1 file, +36, -22
f8c66931 obexd/transfer: Send Transferred property on transfer completion Currently the Transferred property is sent each second and not on transfer completion, this leads to get no transferred size info or without the last packet size(s). Frédéric Danis 7 months ago 1 file, +3, -0
Previous Next