| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This adds experimental field to btd_adapter_driver so the plugin can
indicate drivers that depends on experimental to be enabled.
|
|
|
|
| |
Add function for checking adapter current settings.
|
|
|
|
|
|
| |
Instead of only replying to D-Bus requests with an error saying the
adapter is blocked, keep track of the rfkill being enabled or disabled
so we know the rfkill state of the adapter at all times.
|
|
|
|
|
| |
This adds btd_adapter_find_device_by_fd that lookup a device by a fd
socket destination address.
|
|
|
|
|
| |
This adds support for setting ISO Socket experimental UUID which
enables the use of BTPROTO_ISO on the system.
|
|
|
|
|
|
|
|
| |
If device uses RPA it shall only enable wakeup if RPA Resolution has
been enabled otherwise it cannot be programmed in the acceptlist which
can cause suspend to fail.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215768
|
|
|
|
|
|
|
| |
When Remote Name Resolve ends with failure, record this occurrence and
prevent remote name resolving for the same device for some time.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch registers callback functions to receive the Advertisement
Monitor Device Found and Device Lost events. It also disables software
based filtering whenever controller offloading support is available.
Test performed:
- Verified by logs that the MSFT Monitor Device is received from the
controller and the bluetoothd is notified whenever the controller
starts/stops monitoring a device.
Reviewed-by: Miao-chen Chou <mcchou@google.com>
|
|
|
|
|
| |
This adds support for setting Device Privacy flag when enabled in
main.conf via Privacy = device,limited-device.
|
|
|
|
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", "accept list", and "reject list".
Note that some suggestions come from
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
Also use "primary" to refer the global mgmt struct.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
| |
This implements functions in src/adapter.c and src/device.c for
plugins setting a list of allowed services.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
|
|
|
|
|
| |
This adds the following callbacks to btd_adapter_driver.
device_added: called when a device is added to the adapter
device_removed: called when a device is removed from the adapter
device_resolved: called when all services of the device have been
resolved.
|
|
|
|
|
|
|
| |
The public function is motivated by the Battery Provider API code which
needs to probe whether a device exists.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch calls the new MGMT command to get controller capabilities,
and parses the min and max LE tx power range when the manager is
initialized. This will be used to populate a client-facing dbus entry so
that the client will know the advertising capabilities of the controller
before registering an advertisement.
This patch is tested by manually verifying the data is parsed correctly
from the MGMT response.
|
|
|
|
|
|
|
|
|
|
| |
We need to know if kernel supports the new MGMT interface. To do so, we
check the return from adapter's MGMT_OP_READ_COMMANDS call for the new
commands. This will later be used to route our requests for new
advertisements.
The change is tested by manually verifying that the correct MGMT
commands are used when the feature is and is not available in kernel.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
LGPL-2.1-or-later : 62
GPL-2.0-or-later : 51
BSD-2-Clause : 2
License: LGPL-2.1-or-later
src/adv_monitor.c
src/adv_monitor.h
src/shared/mainloop-glib.c
src/shared/btp.c
src/shared/tester.c
src/shared/btsnoop.c
src/shared/gatt-helpers.h
src/shared/log.h
src/shared/util.h
src/shared/mainloop-ell.c
src/shared/hci-crypto.c
src/shared/mainloop.c
src/shared/hfp.h
src/shared/mainloop-notify.c
src/shared/io-mainloop.c
src/shared/btsnoop.h
src/shared/uhid.h
src/shared/util.c
src/shared/ringbuf.c
src/shared/btp.h
src/shared/shell.h
src/shared/io-glib.c
src/shared/queue.h
src/shared/gatt-server.h
src/shared/crypto.c
src/shared/crypto.h
src/shared/io-ell.c
src/shared/timeout-glib.c
src/shared/mgmt.c
src/shared/gatt-db.c
src/shared/mainloop-notify.h
src/shared/hfp.c
src/shared/timeout-ell.c
src/shared/shell.c
src/shared/hci.c
src/shared/log.c
src/shared/ringbuf.h
src/shared/gatt-helpers.c
src/shared/queue.c
src/shared/tty.h
src/shared/timeout-mainloop.c
src/shared/tester.h
src/shared/gap.h
src/shared/mgmt.h
src/shared/gatt-db.h
src/shared/uhid.c
src/shared/mainloop.h
src/shared/timeout.h
src/shared/att-types.h
src/shared/pcap.c
src/shared/gap.c
src/shared/att.c
src/shared/pcap.h
src/shared/hci.h
src/shared/gatt-client.h
src/shared/io.h
src/shared/gatt-client.c
src/shared/ad.c
src/shared/att.h
src/shared/gatt-server.c
src/shared/hci-crypto.h
src/shared/ad.h
License: GPL-2.0-or-later
src/attrib-server.h
src/advertising.h
src/textfile.c
src/attrib-server.c
src/uinput.h
src/log.h
src/eir.h
src/sdpd.h
src/sdpd-request.c
src/service.h
src/sdpd-database.c
src/adapter.h
src/plugin.h
src/uuid-helper.h
src/plugin.c
src/main.c
src/sdp-xml.c
src/error.h
src/oui.c
src/device.c
src/agent.h
src/sdp-client.c
src/oui.h
src/device.h
src/gatt-database.c
src/error.c
src/backtrace.c
src/sdpd-server.c
src/adapter.c
src/log.c
src/agent.c
src/backtrace.h
src/sdp-xml.h
src/hcid.h
src/dbus-common.h
src/uuid-helper.c
src/storage.c
src/profile.c
src/advertising.c
src/storage.h
src/dbus-common.c
src/profile.h
src/sdpd-service.c
src/eir.c
src/sdp-client.h
src/gatt-database.h
src/gatt-client.h
src/rfkill.c
src/gatt-client.c
src/service.c
src/textfile.h
License: BSD-2-Clause
src/shared/ecc.h
src/shared/ecc.c
|
|
|
|
| |
APIs exposed to plugins shall have btd_ prefix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RemoveDevice on adapter interface used to remove a device, even when
the device is connected. However, since the introduction of the new
30 seconds timeout when setting a device as temporary, RemoveDevice
doesn't immediately remove a connected device, but only disconnects
it and waits for the timer to expire before effectively removes it.
This patch removes the device as soon as it gets disconnected,
provided the disconnection is triggered by a call to RemoveDevice.
The regular timeout still applies for other cases.
Tested manually by calling RemoveDevice on a connected device,
and with ChromeOS autotest setup.
|
|
|
|
|
|
| |
Register for controller resume notification and notify the adapter
drivers when it occurs. Also adds the resume event kernel feature to
make sure the kernel supports this event.
|
|
|
|
|
| |
Move all the kernel specific feature globals into a single
kernel_features bitfield and replace all uses with the bitfield instead.
|
|
|
|
|
| |
Given that adapter.h refers symbols from lib/bluetooth.h and lib/sdp.h,
these two headers should be included directly in adapter.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a device is allowed to wake the host system from suspend, it should
be marked as wake allowed. We add support for a new property that is
sent to the kernel via set device flags mgmt op. We also add the dbus
endpoint to allow the wake allowed setting to be controlled.
In order for wake allowed to be set, the profile must also support wake.
This setting isn't exposed to the user but must be set by profiles that
intend to support wake from suspend.
If a device is connecting for the first time, it will be marked
WakeAllowed if the profile supports it. On subsequent reloads of bluez,
the stored setting "WakeAllowed" will be used to override any other
setting.
|
|
|
|
|
| |
Since those have adapter folder prefixed with "static-" this needs
to be taken into account when storing data.
|
|
|
|
|
|
|
|
|
|
|
| |
If remote device is dual mode and advertises without "BR/EDR flag
not supported" set than device is marked as supporting BR/EDR
even if controller is doing LE only. This results in bluetoothd
trying to connect over BR/EDR since this is prefered transport
if none is connected.
Fix this by checking if adapter supports specified technology
before doing heuristic transport selection.
|
|
|
|
|
| |
Until now advertising as peripheral was always setting General Discoverable
flag set. With this patch this is set based on adapter discoverable setting.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add btd_request_authorization_cable_configured() function to allow
cable configured devices to ask the user straight away about whether the
device should be allowed to connect to the computer.
This allows us to ask the user at the time of the USB connection and
initial setup, rather than when the first Bluetooth connection is made.
The fact that the device might not be connected to the adapter when
this event is triggered is mentioned in the Agent API docs.
|
| |
|
|
|
|
|
|
|
|
| |
There is no guarantee the objects returned by GetManagedObjects
are ordered in the required order which is Service, Characteristic
Descriptor due to their respective dependencies.
This change ensures the objects are processed in the correct order.
|
| |
|
|
|
|
|
|
| |
This patch adds code that initializes a btd_gatt_database for a
btd_adapter. Also added is the btd_adapter_get_database getter
function.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From mgmt version 1.4 onward the ATT server socket gets appropriate
notifications also for outgoing connections triggered by
mgmt_pair_device. This patch adds a check for the mgmt version to not
unnecessarily create the LE client socket first.
For now this also fixes a potential race condition in the kernel where
the socket connect LE scan disabling will fail because of a preceding
mgmt_stop_discovery trying to do the same thing. Since mgmt commands
(unlike the socket connect) are serialized the race cannot happen with
the mgmt_stop_discover + mgmt_pair_device combination.
|
|
|
|
|
|
|
|
| |
This patch allows plugins to be notified whenever an adapter receives
Manufacturer Specific Data in the advertising reports from a device.
This can happen when new device is discovered or when we autoconnect
to it.
|
|
|
|
|
|
| |
We've decided to have pairable (soon to be renamed to bondable) always
set after all, so neither the always_pairable variable nor the
AlwaysPairable config option is needed.
|
| |
|
|
|
|
|
|
| |
We want to be able to accept connections from all non-temporary devices.
We should pass these devices kernels that support the BR/EDR whitelist
(through the Add Device mgmt command).
|
| |
|
|
|
|
| |
This will be used by the reconnection policy logic.
|
|
|
|
|
|
| |
This patch adds an API to monitor devices disconnections, including the
reason for the disconnection. It paves the way to allow creating a
policy for reconnecting when disconnected.
|
|
|
|
| |
This is necessary to do accurate matching for LE devices.
|
| |
|
| |
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
| |
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
|
|
|
|
| |
Use standard "bool" type instead. Callers in plugins/* are fixed on the
same commit to avoid compilation errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch splits the bonding process in an interative process
consisting of one or more "bonding attempts". The user/agent starts a
new "bonding" that may involve several rounds of "bonding attempts" with
the device before it gets back to the user/agent.
Some functions were split in two parts to reflect this change. When a
bonding attempt fails with an authentication error and a pin code was
provided, a new bonding attempt is initiated (after a short delay) to
retry with the next function (or next call to the same function) in the
pincode callback list. If no pin code was provided to the device, no
retry is attempted and the authentication error is returned to the
client. This effectively allows a plugin try different pincodes for the
same device during the same bonding.
|