| 8e2cece6 |
device: Attempt to elevate security on Pair while connected
This would make Pair act behave the same as when the device reconnect
and bonding already exists. |
Luiz Augusto von Dentz |
9 months ago |
1 file, +4, -1 |
| bbc1c2a7 |
main: Fix handling of legacy experimental LL Privacy
Legacy experimental LL Privacy was not enabled by default but
CentralAddressResolution is which may cause problems with old
kernels were LL Privacy may not work as expected.
Fixes: https://github.com/bluez/bluez/issues/1138 |
Luiz Augusto von Dentz |
9 months ago |
1 file, +1, -10 |
| 0f003904 |
client/gatt: Fix pointer assigned with character literal
A character literl, '\0', is assigned to the pointer. The corresponding
comment doesn't make any sense, since '\0' represents zero and this
statement does the same thing as assigning value with NULL.
Initializing value with NULL (or zero) is safe and correct here: the
only case that the initial value of the pointer is passed to
write_value() is that the if branch isn't executed, where len keeps its
initial value, zero, as well. With src_len equal to zero, write_value()
will bail out and src_val won't be dereferenced.
Let's clean up the misleading comment and change right side of the
assignment to fix compiler warnings about the wrong type,
Fixes: ee750bbaf68c ("client/gatt: proxy_property_changed: check for NULL iterator")
Acked-by: Christian Eggers <ceggers@arri.de> |
Yao Zi |
9 months ago |
1 file, +1, -1 |
| f8219bcc |
obex: Add supported-features tag in MAP Client Connect Request
This change is required for below PTS testcase -
1. MAP/MCE/MFB/BV-06-C
Verify that the MCE sends its MapSupportedFeatures in the OBEX Connect
request if the MSE declares support for the feature MapSupportedFeatures
in Connect Request in its SDP record.
If Server's SDP record contains the field 'MapSupportedFeatures in Connect
Request' as supported then include the supported features
apparam in obex connect request.
Tested-by: Frédéric Danis <frederic.danis@collabora.com> |
Amisha Jain |
9 months ago |
1 file, +41, -0 |
| 1a9012fe |
obex: Add base implementation for get_mas_instance info and set notification filter
This change is required for passing below testcases-
1. MAP/MSE/MMI/BV-02-C
Verify that the MCE can return user-readable information about the
MAS-instance to the MCE
2. MAP/MSE/MMN/BV-06-C
Verify that the MSE correctly responds to a request
to filter notifications.
We are adding the raw skeleton implementaton for PTS certification.
Although the functionality can be added later as per requirement. |
Amisha Jain |
9 months ago |
1 file, +52, -0 |
| 12b3acbe |
device: Try to set the wake_allowed property only for bonded devices
When the function `device_set_wake_support()` is called, we don't have
the guarantees for the device to be already bonded.
For example, that function gets called by `hog_probe()`, that is also
triggered when bluez scans for new devices. In that instance, we don't
want to try setting the `wake_allowed` property, because those devices
are only in range of the host and are not connected, paired or bonded
yet.
This fixes the following Bluez error when we scan for new devices and a
new hog or hid is in range:
```
src/device.c:set_wake_allowed_complete() Set device flags return status:
Invalid Parameters
```
Additionally, because that initial `device_set_allowed()` call can fail,
this commit fixes the issue of hog and hid devices that, after the first
pairing, were unexpectedly showing `WakeAllowed: no`. And it required a
reboot to let that property be set to the expected `WakeAllowed: yes` by
default. |
Ludovico de Nittis |
9 months ago |
1 file, +13, -4 |
| 41cfe55e |
device: Preserve pending flags when setting the wake allowed
If there are already flags that are pending to be applied, we should
keep them to avoid overwriting them.
In device_set_wake_allowed() we only want to either add or remove the
remote wakeup flag, while keeping the existing flags as-is. |
Ludovico de Nittis |
9 months ago |
1 file, +4, -0 |
| 05ede13d |
adapter: Preserve pending flags when setting the Device Privacy Mode
If there are already flags that are pending to be applied, we should
keep them to avoid overwriting them.
At that point we only want to add the Device Privacy Mode on top of the
existing flags. |
Ludovico de Nittis |
9 months ago |
1 file, +6, -1 |
| f2120e3d |
profiles/avdtp: Fix reply for bad media transport format
Currently the avdtp_setconf_cmd() fails to check the capability length
of the Media Transport Service Category, which should be 0, because
caps_to_list() doesn't add it to the list of services as it should
be bigger than packet boundary.
This commit adds an &err parameter to caps_to_list() and set the error
to AVDTP_BAD_MEDIA_TRANSPORT_FORMAT if Media Transport capability as
invalid length.
This is required for passing AVDTP/SNK/ACP/TRA/BTR/BI-01-C PTS test
case:
To verify that the IUT (ACP) is able to issue a set configuration
reject response to the INT if the format of the media transport is
incorrect. |
Frédéric Danis |
9 months ago |
1 file, +20, -15 |
| de22ef2b |
bass: Add support for selecting multiple transports
This adds support for the BAP Scan Delegator to select multiple transports
added by a Broadcast Assistant and to acquire them one by one to receive
the streams.
Fixes: https://github.com/bluez/bluez/issues/1139 |
Iulia Tanasescu |
9 months ago |
1 file, +28, -14 |
| 912e2f54 |
monitor: Add decoding of MGMT LL Privacy setting
This adds decoding support of MGM LL Privacy setting (bit 22). |
Luiz Augusto von Dentz |
9 months ago |
1 file, +1, -0 |
| 122c9fca |
mgmt-tester: Fix missing MGMT_SETTING_LL_PRIVACY
This fixes the tests which now requires MGMT_SETTING_LL_PRIVACY (bit
22). |
Luiz Augusto von Dentz |
9 months ago |
1 file, +37, -23 |
| a0d6d3c7 |
gatt-database: Fix always registering CentralAddressResolution
CentralAddressResolution shall be conditional to LL Privacy to avoid
peripherals assuming Directed Advertising can be used which may lead
to issues like:
Fixes: https://github.com/bluez/bluez/issues/1138 |
Luiz Augusto von Dentz |
9 months ago |
3 files, +18, -8 |
| cf8b2f30 |
mgmt-api: Add LL Privacy setting
This adds LL Privacy (bit 22) to Read Controller Information so it can
be propagated to the likes of bluetoothd. |
Luiz Augusto von Dentz |
9 months ago |
1 file, +1, -0 |
| e45343a3 |
mgmt-api: Add missing Device Flag
This adds the missing Device Flag - Address Resolution = bit(2) |
Luiz Augusto von Dentz |
9 months ago |
1 file, +1, -0 |
| f77e72c3 |
profiles/avrcp: Fix PDU for SetAbsoluteVolume with top level bit set
This is required for passing PTS test case AVRCP/TG/VLH/BI-02-C
(To verify the behavior of the TG receiving a SetAbsoluteVolume
command with the top level bit set). |
Frédéric Danis |
9 months ago |
1 file, +1, -1 |
| e88f914e |
profiles/avrcp: Fix AVRCP PDU parameters length don't match
This is required for passing PTS test case AVRCP/TG/VLH/BI-01-C
(To verify the behavior of the TG receiving an invalid SetAbsoluteVolume
command). |
Frédéric Danis |
9 months ago |
1 file, +2, -1 |
| 50a01b0c |
shared/bap: fix printf format mismatch
struct iovec::iov_len is 'size_t' rather than 'long int'.
https://man7.org/linux/man-pages/man3/iovec.3type.html |
Christian Eggers |
9 months ago |
1 file, +2, -2 |
| 50fd1d0c |
client/player: fix printf format mismatch
%zd is meant for 'size_t' rather than 'off_t'. As there is no printf
length modifier for 'off_t', cast to a standard type which should be
large enough for on all platforms. |
Christian Eggers |
9 months ago |
1 file, +3, -2 |
| ba9f9fbd |
tools/btpclient: include <time.h> before <ell/ell.h>
It seems that there's no guarantee that 'struct timespec' will be
available via <sys/time.h>, so include <time.h> directly [1]
[1] https://libc-alpha.sourceware.narkive.com/yb0aXzSp/defining-timespec-in-time-h-or-sys-time-h#post3 |
Christian Eggers |
9 months ago |
1 file, +1, -0 |
| 6f26f2f8 |
mesh: include <time.h> before <ell/ell.h>
I get many of such warnings:
In file included from ../bluez-5.79/ell/ell.h:8,
from ../bluez-5.79/mesh/prov-initiator.c:15:
../bluez-5.79/ell/time-private.h:15:43: warning: 'struct timespec' declared inside parameter list will not be visible outside of this definition or declaration
15 | uint64_t _time_from_timespec(const struct timespec *ts);
| ^~~~~~~~
It seems that there's no guarantee that 'struct timespec' will be
available via <sys/time.h>, so include <time.h> directly [1]
[1] https://libc-alpha.sourceware.narkive.com/yb0aXzSp/defining-timespec-in-time-h-or-sys-time-h#post3 |
Christian Eggers |
9 months ago |
34 files, +49, -0 |
| d26a7f96 |
tools: iso-tester: add inclusion of time.h
Inclusion of <linux/errqueue.h> requires that 'struct timespec' has
already been defined:
| In file included from ../bluez-5.79/tools/iso-tester.c:21:
| /usr/include/linux/errqueue.h:57:25: error: array type has incomplete element type 'struct timespec'
| 57 | struct timespec ts[3];
| | ^~ |
Christian Eggers |
9 months ago |
1 file, +1, -0 |
| 77524358 |
l2cap-tester: ensure SO_SNDBUF is large enough for the writes
Since btdev runs from same thread and won't flush, SO_SNDBUF needs to
hold all data we are going to write. Fix spurious test failure
in "L2CAP LE Client - Write 32k Success". |
Pauli Virtanen |
9 months ago |
1 file, +11, -1 |
| f4b6a649 |
tools/tester: enable TX timestamping tests by default |
Pauli Virtanen |
9 months ago |
3 files, +1, -13 |
| fe5a5f50 |
l2cap-tester: add test for stream socket TX timestamping
Stream socket TX timestamp ids shall refer to the byte positions.
Add test:
L2CAP BR/EDR Client - Stream TX Timestamping |
Pauli Virtanen |
9 months ago |
4 files, +41, -11 |
| c89e18fa |
tools/tester: test COMPLETION timestamps
Add support for SOF_TIMESTAMPING_TX_COMPLETION also in cases where
errqueue.h is old and doesn't define it.
Support timestamps of different types arriving out of order, as multiple
SND may well arrive before COMPLETION. Also allow TX timestamp arriving
before bthost receives data, as that may well happen.
Remove tests SCHED timestamps, as those won't be generated for now.
Don't test COMPLETION for SCO, since it's not supported now either.
Add test:
SCO CVSD Send No Flowctl - TX Timestamping |
Pauli Virtanen |
9 months ago |
5 files, +80, -42 |
| 3b9a6d3f |
obex: Publish SDP record for Phonebook Access Client
This is required for passing below PTS test cases:
1. PBAP/PCE/SGSIT/ATTR/BV-01-C
Attribute GSIT - Bluetooth Profile Descriptor List, PBAP 1.2
2. PBAP/PCE/SGSIT/OFFS/BV-02-C
Attribute ID Offset String GSIT - Service Name
3. PBAP/PCE/SGSIT/SERR/BV-01-C
Service record GSIT - PBAP PCE
Currently the Phonebook Access Client SDP record is not registered,
hence above test cases are failing.
This commit adds code to register the profile (0x112e). |
Frédéric Danis |
9 months ago |
1 file, +157, -0 |
| 2eba5b6e |
obex: Fix typo |
Frédéric Danis |
9 months ago |
1 file, +1, -1 |
| 1edffc22 |
shared/shell: add check to shell_exec()
When passing a Unicode character to bluetoothctl, the application
crashes in dbus:
dbus[5324]: arguments to dbus_message_iter_append_basic() were
incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)"
failed in file .../dbus-message.c line 2765.
Check that all characters are written in utf8.
Fixes: https://github.com/bluez/bluez/issues/1137 |
Roman Smirnov |
9 months ago |
1 file, +3, -0 |
| eb1dd2bc |
client: replace validate_input() with argsisutf8()
argsisutf8() does the same thing as validate_input(), but can
be used elsewhere. |
Roman Smirnov |
9 months ago |
1 file, +2, -15 |
| 0205edbd |
shared/util: implement argsisutf8()
This implements argsisutf8() which checks that all strings in the
argv array are written in utf8. |
Roman Smirnov |
9 months ago |
2 files, +13, -0 |
| 48c33d29 |
client/player: Fix changing preset SDU
This fixes changing preset SDU when configuring multiple channels, the
SDU of the configuration is the one the needs to be adjusted not the
preset itself. |
Luiz Augusto von Dentz |
10 months ago |
1 file, +6, -2 |
| 9590cf12 |
Release 5.80 |
Marcel Holtmann |
10 months ago |
2 files, +15, -1 |
| 21d45dda |
gatt-client: Fix Handle property of descriptors
Patch cda5549f2475 ("gatt-client: Add read-only handles to dbus")
introduced support for Handle properties to GATT attributes but the
function descriptor_get_handle do access the user_pointer as it was a
service not a descriptor.
Fixes: https://github.com/bluez/bluez/issues/1133 |
Luiz Augusto von Dentz |
10 months ago |
1 file, +2, -2 |
| ee22431a |
policy: connect HSP/HFP when A2DP is connected
When A2DP is connected, also connect HSP/HFP if it is not connected.
Fixes: https://github.com/bluez/bluez/issues/1069 |
Yao Wei (魏銘廷) |
10 months ago |
1 file, +64, -1 |
| d4749cfd |
HACKING: Fix URL for submitting patches
The previous URL is out of date, and now just says
"This file has moved to process/submitting-patches.rst" |
Andrew Sayers |
10 months ago |
1 file, +2, -1 |
| 8fba2cd3 |
phonebook-ebook: Fix typo: s/registery/registry/ |
Andrew Sayers |
10 months ago |
1 file, +1, -1 |
| 8e835a68 |
mpris-proxy: Avoid spurious warnings when dbus.service stops
The systemd services generates a warning when it loses
ownership of its D-Bus name, which happens routinely
when dbus.service exits (e.g. when the user logs out). |
Andrew Sayers |
10 months ago |
1 file, +1, -1 |
| e3b27596 |
share/hci: Fix data type in bt_hci_send_data
The data type in bt_hci_send_data shall be ACL, SCO or ISO. |
michael_kong |
10 months ago |
1 file, +1, -1 |
| adcd7390 |
btdev: Fix double lookup
This fixes the existing double lookup when calling
num_completed_packets but passing the conn->handle instead of passing
the conn pointer directly since num_completed_packets would then attempt
to do another lookup by handle to resolve the conn pointer again. |
Luiz Augusto von Dentz |
10 months ago |
1 file, +9, -15 |
| df891f0f |
sco-tester: Fix closing the socket
When writting data the socket shall not be closed until all the data
could be transmitted or the test times out. |
Luiz Augusto von Dentz |
10 months ago |
1 file, +3, -0 |
| 95055def |
sco-tester: add tests for different SCO flow control modes
Change "SCO CVSD Send - Success" to send multiple packets.
Add tests
SCO CVSD Send No Flowctl - Success
SCO CVSD 1.1 Send - Success
SCO CVSD 1.1 Send No Flowctl - Success |
Pauli Virtanen |
10 months ago |
1 file, +34, -5 |
| 7da93164 |
btdev: support disabling commands
Add function to return command mask, so that it is possible to disable
some in tests if needed. |
Pauli Virtanen |
10 months ago |
4 files, +22, -0 |
| 87d4f95d |
sco-tester: check sent SCO data is received at bthost
When sending data, also check that the data is received by bthost. |
Pauli Virtanen |
10 months ago |
1 file, +45, -2 |
| ce1abc32 |
bthost: add hooks receiving SCO connections and data
Add hooks for new SCO connections and receiving SCO data. SCO
connection accept/reject flow remains unimplemented. |
Pauli Virtanen |
10 months ago |
3 files, +139, -2 |
| b7ef134e |
btdev: send SCO setup events to bthost
Send required SCO setup events to bthost conns, so data can be passed to
the linked connection. |
Pauli Virtanen |
10 months ago |
1 file, +15, -2 |
| 86d6b74f |
btdev: Add support for Sync Flow Control
This adds support for Sync Flow Control by supporting command
Write Sync Flow Control Enable:
< HCI Command: Write Sync Fl.. (0x03|0x002f) plen 1
Flow control: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4
Write Sync Flow Control Enable (0x03|0x002f) ncmd 1
Status: Success (0x00)
To act according to the spec this enabled SCO data packets to be
properly processed and generate Number of Completed Packets event:
sco-tester[40]: < SCO Data TX:.. flags 0x00 dlen 9
> HCI Event: Number of Completed P.. (0x13) plen 5
Num handles: 1
Handle: 42 Address: 00:AA:01:01:00:00 (Intel Corporation) |
Luiz Augusto von Dentz |
10 months ago |
1 file, +45, -0 |
| debc7753 |
bass: Free stream path
This frees BASS setup paths, to avoid memory leaks like below:
==5877==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 43 byte(s) in 1 object(s) allocated from:
0x7ab1adefd9c7 in malloc ../../../../src/libsanitizer/asan/
asan_malloc_linux.cpp:69
0x7ab1ad08f937 in __vasprintf_internal libio/vasprintf.c:116
0x7ab1ad135d62 in ___asprintf_chk debug/asprintf_chk.c:34
0x5c2197401338 in asprintf /usr/include/x86_64-linux-gnu/bits/
stdio2.h:137
0x5c2197401338 in setup_configure_stream profiles/audio/bass.c:420 |
Iulia Tanasescu |
10 months ago |
1 file, +4, -4 |
| 8850bad1 |
bap: Remove interface
This removes the BAP plugin interface and updates the BAP and
BASS plugins to use shared/bap APIs. |
Iulia Tanasescu |
10 months ago |
4 files, +5, -73 |
| 6a03579d |
shared/bap: Add APIs to convert iso_qos to bap_qos
This adds APIs to convert iso_qos to bap_qos and reversed. |
Iulia Tanasescu |
10 months ago |
2 files, +56, -0 |