| bcababe6 |
audio/player: Update track duration if previously set to 0
Sometimes some stacks may set the track duration to 0 in GetItemAttributes
before updating it in GetPlayStatus.
Currently the track duration is updated only if it has never been set
before. To fix the issue this also checks that the current value is
not 0.
> ACL Data RX: Handle 11 flags 0x02 dlen 102
Channel: 71 len 98 ctrl 0x0202 [PSM 27 mode Enhanced Retransmission (0x03)] {chan 7}
I-frame: Unsegmented TxSeq 1 ReqSeq 2
AVCTP Browsing: Response: type 0x00 label 1 PID 0x110e
AVRCP: GetItemAttributes: len 0x0058
...
AttributeID: 0x00000007 (Track duration)
CharsetID: 0x006a (UTF-8)
AttributeLength: 0x0001 (1)
AttributeValue: 0
...
> ACL Data RX: Handle 11 flags 0x02 dlen 26
Channel: 68 len 22 [PSM 23 mode Basic (0x00)] {chan 4}
AVCTP Control: Response: type 0x00 label 9 PID 0x110e
AV/C: Stable: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetPlayStatus pt Single len 0x0009
SongLength: 0x000255a8 (153000 miliseconds)
SongPosition: 0x00009256 (37462 miliseconds)
PlayStatus: 0x02 (PAUSED) |
Frédéric Danis |
7 months ago |
1 file, +2, -2 |
| bea5cc4d |
audio/avrcp: fix crash when NowPlaying changes while list_items is in progress
The media_item objects are owned by the player and while we keep
temporary pointers to them in pending_list_items, clearing the player's
playlist destroys them and we will end up crashing in the next call to
avrcp_list_items_rsp(). The crash is racy and can only be observed
when skipping tracks very quickly in an Apple Music station (where the
playlist changes on every next song) |
George Kiagiadakis |
7 months ago |
1 file, +9, -0 |
| c888c682 |
bluetoothctl-scan: Add documentation for auto-connect command
This adds documentation for auto-connect command. |
Luiz Augusto von Dentz |
7 months ago |
1 file, +10, -0 |
| aba81b55 |
client: Add scan.auto-connect command
[bluetoothctl]> scan.auto-connect --help
Set/Get auto-connect filter
Usage:
auto-connect [on/off] |
Luiz Augusto von Dentz |
7 months ago |
1 file, +39, -1 |
| af7d5dc6 |
adapter: Implement SetFilterPolicy AutoConnect filter
This implements AutoConnect filter option in SetFilterPolicy method
according to its documentation. |
Luiz Augusto von Dentz |
7 months ago |
2 files, +107, -59 |
| 3a8d778b |
org.bluez.Adapter: Add AutoConnect to SetDiscoveryFilter
This adds AutoConnect filter option to SetDiscoveryFilter which can be
used by application to automatically connect devices found matching a
pattern. |
Luiz Augusto von Dentz |
7 months ago |
1 file, +24, -18 |
| 1fe5a858 |
client: Display disconnection reason
The new org.bluez.Device1.Disconnected signal propagates the
disconnection reason. |
Frédéric Danis |
7 months ago |
1 file, +18, -0 |
| 53db7800 |
src/device: Add Disconnected signal to propagate disconnection reason
Currently a client application is informed of the disconnection by the
update of the Connected property to false.
This sends a Disconnected signal with the disconnection reason before
the property is updated.
This helps client application to know the reason for the disconnection
and to take appropriate action. |
Frédéric Danis |
7 months ago |
3 files, +64, -8 |
| 8b08f903 |
org.bluez.Device: Add Disconnected signal
This adds Disconnected signal which can be used by clients to discover
the reason of a disconnection. |
Frédéric Danis |
7 months ago |
1 file, +52, -0 |
| 593f8b06 |
lib/mgmt: Add MGMT_DEV_DISCONN_AUTH_FAILURE define |
Frédéric Danis |
7 months ago |
1 file, +1, -0 |
| 0402c067 |
doc: Convert mgmt-api.txt to mgmt.rst
This converts from pure text mgmt-api.txt to restructured markup
language and then use rst2man to generate a proper manpage (mgmt.7). |
Luiz Augusto von Dentz |
7 months ago |
2 files, +5380, -3 |
| f39b3ec1 |
device: Implement PreferredBearer=last-used
This implementas PreferredBearer=last-use which enables Device.Connect
to use last used bearer first.
Fixes: https://github.com/bluez/bluez/issues/986 |
Luiz Augusto von Dentz |
7 months ago |
1 file, +132, -30 |
| 940717e9 |
org.bluez.Device: Add last-used option to PreferredBearer
This adds last-used option to PreferredBearer which when set would
make Connect to use the last used bearer first. |
Luiz Augusto von Dentz |
7 months ago |
2 files, +7, -3 |
| 6a8fb8a0 |
client: Fix crashing command info
If command info is called without any parameters, and without connecting
any device, it will call find_set which doesn't check argc and argv are
actually valid.
Fixes: https://github.com/bluez/bluez/issues/1251 |
Luiz Augusto von Dentz |
7 months ago |
1 file, +3, -0 |
| cdcdfb48 |
a2dp: Fix not destroying streams when unregistering
When a2dp_unregister_sep it must destroy the stream queue before freeing
the a2dp_sep otherwise it will cause memory leaks. |
Luiz Augusto von Dentz |
8 months ago |
1 file, +4, -1 |
| 05f8bd48 |
a2dp: Fix a2dp_sep mapping to a single stream
This removes the assumption that only 1 stream can be configured per
local sep which prevents multipoint setups where different devices can
be using the same local endpoint.
Fixes: https://github.com/bluez/bluez/issues/1037
Fixes: https://github.com/bluez/bluez/issues/1064
Fixes: https://github.com/bluez/bluez/issues/597 |
Luiz Augusto von Dentz |
8 months ago |
4 files, +244, -95 |
| 665f3518 |
avdtp: Fix setting in_use flag for local seps
This removes the assumption that only 1 stream can be configured per
local sep which prevents multipoint setups where different devices can
be using the same local endpoint. |
Luiz Augusto von Dentz |
8 months ago |
3 files, +149, -125 |
| 00969bdb |
device: Reply br-connection-key-missing on connection bonding error
Currently when connection is removed while the client is waiting for
Connect() the failed message is br-connection-canceled, even if this
is due to bonding error.
Implement to reply with br-connection-key-missing, when the connection
request fails due to a bonding authentication error, allowing the client
to differentiate connection failure reasons.
This has been tested by:
- pair a device
- disconnect
- edit pairing info to change last character of Key entry of [LinkKey] in
/var/lib/bluetooth/<adapter_address>/<device_address>?info
- restart bluetoothd
- in bluetoothctl, connect <device_address> |
Frédéric Danis |
8 months ago |
1 file, +14, -2 |
| 08017452 |
monitor: Add decoding for FSU command and event
This adds decoding for FSU command and event as defined in the Bluetooth
Core 6.0 specification:
$ tools/hcitool cmd 0x08 0x009d 0xff 0xff 0x00 0x00 0x00 0x00 0x01 0x03
< HCI Command: LE Frame Space Update (0x08|0x009d) plen 8
Handle: 65535 Address: 00:00:00:00:00:00 (OUI 00-00-00)
Frame Space min: 0 us (0x0000)
Frame Space max: 0 us (0x0000)
PHYs: LE 1M (0x01)
types: 0x03
T_IFS_ACL_CP
T_IFS_ACL_PC |
Luiz Augusto von Dentz |
8 months ago |
1 file, +94, -13 |
| f02ca9dc |
monitor: Add definitions for FSU command and event
This adds FSU command and event as defined in the Core 6.0
specification. |
Luiz Augusto von Dentz |
8 months ago |
1 file, +20, -0 |
| 8154ddbd |
client: Port "assistant" menu to pre_run |
Bastien Nocera |
8 months ago |
3 files, +4, -4 |
| 2d2bc715 |
client: Port "mgmt" menu to pre_run |
Bastien Nocera |
8 months ago |
4 files, +5, -11 |
| 9bc5142f |
client: Port "player" menu to pre_run |
Bastien Nocera |
8 months ago |
3 files, +3, -3 |
| 78f062a2 |
client: Port "admin" menu to pre_run |
Bastien Nocera |
8 months ago |
3 files, +4, -3 |
| 102b9f3d |
shared/shell: Add pre_run menu callback
This callback will be called every time the menu is called, and can be
used to make sure that, for example, a D-Bus connection, is setup for
the menu to use.
This means that it is now possible to install a menu without setting up
a D-Bus connexion, but still have access to that connexion when the menu
is activated. |
Bastien Nocera |
8 months ago |
2 files, +11, -0 |
| 773cce6b |
client: Fix --help hanging if bluetoothd is not running
Exit after printing all the main and submenu commands. |
Bastien Nocera |
8 months ago |
1 file, +2, -0 |
| 80c810ec |
shared/shell: Add function to handle early help calls
Add a function that would allow tools to exit after handling --help, so
as to avoid the daemon waiting to communicate with a D-Bus service that
might not be running. |
Bastien Nocera |
8 months ago |
2 files, +12, -0 |
| c0ed04ab |
client: Install submenus before contacting bluez daemon
So that the submenus are installed even if bluez isn't available. |
Bastien Nocera |
8 months ago |
1 file, +5, -5 |
| b36c3910 |
client: Split installing submenu and doing I/O
Split off installing the command's submenu and contacting the management
socket or the bluez daemon. |
Bastien Nocera |
8 months ago |
10 files, +27, -6 |
| 2ebf7ed2 |
transport: Fix the use of callback in transport_asha_suspend
Some devices do not send a response to the stop command, so
audio status notification might not be received after stop.
Instead, as with the Android implementation, we just immediately
acknowledge the client's stop request after sending it to the device. |
Sanchayan Maity |
8 months ago |
1 file, +8, -1 |
| 9948168c |
shared/asha: Don't wait for status notification on stop
Not all devices respond with the status update, so let's just send it
out and assume it worked. |
Arun Raghavan |
8 months ago |
5 files, +18, -29 |
| 5a112d14 |
shared/asha: Fix bad parens in a comparison
The last parameter to the memcmp was incorrectly the result of the
comparison rather than the sizeof()'s value. |
Arun Raghavan |
8 months ago |
1 file, +1, -1 |
| 5e248deb |
gatt: Don't attempt to listen on BR/EDR if disabled
If BR/EDR is disabled don't attempt to listen on ATT PSM. |
Luiz Augusto von Dentz |
8 months ago |
1 file, +8, -6 |
| f6f82b39 |
mesh: Fix possible null pointer deference
This fixes possible null pointer deference for label reported by
cppcheck.
Fixes: https://github.com/bluez/bluez/security/code-scanning/1771 |
Luiz Augusto von Dentz |
8 months ago |
1 file, +1, -1 |
| ab6ce0c8 |
input/device: Fix not sending virtual cable unplug
When using udev HIDP_CTRL_VIRTUAL_CABLE_UNPLUG must be sent directly
since it is not handled internally like when utilizing kernel hidp
module.
Fixes: https://github.com/bluez/bluez/issues/1173 |
Luiz Augusto von Dentz |
8 months ago |
1 file, +6, -1 |
| 72dddc80 |
btio: Fix not being able to set security level 4
This adds support for BT_IO_SEC_FIPS which shall represent the security
level 4. |
Luiz Augusto von Dentz |
8 months ago |
1 file, +1, -1 |
| 62f0b9b5 |
shared/bap: bap_abort_stream_req() should cancel also current req
After bap_abort_stream_req() no req callbacks for stream shall be
called, so it has to fail also the currently in-flight request. |
Pauli Virtanen |
8 months ago |
1 file, +7, -0 |
| 8d0f1789 |
org.bluez.MediaEndpoint: add client role Reconfigure
Add a simple way for the sound server to reconfigure a BAP unicast
endpoint, by calling org.bluez.MediaEndpoint.Reconfigure().
This shall destroy all streams of the endpoint, and restart the
SelectProperties() configuration flow from the beginning.
Since it may be necessary to reconfigure multiple endpoints at once to
correctly make bidirectional CIS, add Defer argument to just mark eps
for configuration.
In future, org.bluez.MediaEndpoint.SetConfiguration() could be changed
to handle unicast in the same way as broadcast: only create streams.
This allows sound server to have full control over stream configuration
itself, and not rely on bt_bap_select(). |
Pauli Virtanen |
8 months ago |
1 file, +22, -0 |
| 63b07d1c |
org.bluez.MediaEndpoint: removing BAP streams with ClearConfiguration
Allow user to remove specific streams by calling
ClearConfiguration(transport_path) on the endpoint. If the path is the
endpoint path instead, clear all streams associated with the endpoint. |
Pauli Virtanen |
8 months ago |
1 file, +6, -0 |
| 313de9af |
main.conf: Fix documentation of TemporaryTimeout=0
Setting TemporaryTimeout to 0 never enables temporary_timer which means
device_disappeared will never be called and the device will remain
temporary forever (until the service is restarted).
Fixes: https://github.com/bluez/bluez/issues/1100 |
Luiz Augusto von Dentz |
8 months ago |
1 file, +1, -1 |
| 9ea27141 |
media: implement SupportedFeatures property
Add org.bluez.Media.SupportedFeatures. Add feature tx-timestamping. |
Pauli Virtanen |
8 months ago |
1 file, +83, -0 |
| 30d2de12 |
org.bluez.Media: add SupportedFeatures
Add SupportedFeatures property for feature information that applications
cannot find otherwise.
Add feature tx-timestamping. Applications cannot enable it on old BlueZ
versions without that feature, as it requires special handling on BlueZ
side. |
Pauli Virtanen |
8 months ago |
1 file, +14, -1 |
| f9c8327e |
tools/mesh-cfgclient: constify |
Christian Eggers |
8 months ago |
1 file, +1, -1 |
| 24d053c0 |
monitor: remove redundant hexdumps in Mesh Provisioning
Paket data is already dumped in the statement above.
Fixes: ad0cdbc1e943 ("monitor: Add basic decoding for Mesh Provisioning") |
Christian Eggers |
8 months ago |
1 file, +0, -2 |
| 7ca23892 |
mesh: agent: add hash calculation of URI
Mesh profile spec, 3.9.2 Unprovisioned Device beacon:
Along with the Unprovisioned Device beacon, the device may also
advertise a separate non-connectable advertising packet with a Uniform
Resource Identifier (URI) data type ...
The remaining implementation of this feature does already exist. |
Christian Eggers |
8 months ago |
1 file, +12, -1 |
| 269f04cd |
mesh: acceptor: fix endianess issues
Members of 'struct mesh_net_prov_caps' are in Over-the-Air order and
must be converted to host order first.
Fixes: 838ddc931263 ("mesh: provisionee: Check prov start parameters") |
Christian Eggers |
8 months ago |
1 file, +6, -4 |
| 57df14b8 |
mainloop: Only connect to NOTIFY_SOCKET if STATUS=Starting up
This makes the handling of NOYIFY_SOCKET conditional to only when
application attempts to set STATUS=Starting up which means it is
intentionally requiring it.
Fixes: https://github.com/bluez/bluez/issues/996 |
Luiz Augusto von Dentz |
8 months ago |
3 files, +9, -5 |
| 4bbfd971 |
shared/bap: Fix handling of ASCS_Codec_Config
The codec under bt_ascs_config is in little endian which may differ
from the native endianness when it comes to vendor specific field that
are multibyte causing the following error:
BAP/USR/SCC/BV-033-C [USR SNK Config Codec, VS] - setup complete
BAP/USR/SCC/BV-033-C [USR SNK Config Codec, VS] - run
...
bt_gatt_server:src/shared/gatt-server.c:write_cb() Write Cmd - handle: 0x0022
bt_bap:src/shared/bap.c:ascs_ase_cp_write() Codec Config
bt_bap:src/shared/bap.c:ascs_config() codec 0xff phy 0x02 latency 2
bt_bap:src/shared/bap.c:ep_config() ep 0x21d6600 id 0x01 dir 0x01
handle 0x0022 len 5
test-bap: > 1b 22 00 01 01 01 09 01 ."......
test-bap: ! 1b 22 00 01 01 01 00 00 ."...... |
Luiz Augusto von Dentz |
8 months ago |
1 file, +8, -1 |
| 6b9dff8f |
shared/vcp: use iov_pull in input parsing
Check input is right size by using iov_pull* when parsing.
Also replace custom iov_pull_mem by equivalent util_iov_pull_mem, and
add iov_pull_string.
Fixes handling of zero-length string-valued descriptors, !value is not
error.
Fixes crashes like:
ERROR: AddressSanitizer: stack-buffer-overflow
WRITE of size 3 at 0x7b878bb77161 thread T0
#0 0x7f878eee4821 in memcpy
#1 0x0000009544d4 in read_aics_aud_ip_type src/shared/vcp.c:2713
#2 0x000000950cec in vcp_pending_complete src/shared/vcp.c:2394
#3 0x00000088b2ce in read_cb src/shared/gatt-client.c:2717 |
Pauli Virtanen |
8 months ago |
1 file, +128, -110 |
| 0831bd39 |
doc/rfcomm: Remove BT_POWER
BT_POWER socket option is only supported by L2CAP sockets. |
Luiz Augusto von Dentz |
8 months ago |
1 file, +0, -13 |