| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This makes use of BIT macro when defining bitfields which makes it
clearer what bit it is toggling.
|
| |
|
|
|
|
|
| |
Populated new opcodes and events into static mgmt_ev and mgmt_op string
arrays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2450
• If extended advertising PDU types are being used (bit 4 = 0) then:
The advertisement shall not be both connectable and scannable.
So instead this attempts to set name as part of Advertising Data rather
then setting it as Scan Response:
bluetoothctl> advertise.secondary 2M
bluetoothctl> advertise.name Intel-3
bluetoothctl> advertise on
< HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
Handle: 0x01
Properties: 0x0001
Connectable
Min advertising interval: 1280.000 msec (0x0800)
Max advertising interval: 1280.000 msec (0x0800)
Channel map: 37, 38, 39 (0x07)
Own address type: Public (0x00)
Peer address type: Public (0x00)
Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)
TX power: Host has no preference (0x7f)
Primary PHY: LE 1M (0x01)
Secondary max skip: 0x00
Secondary PHY: LE 2M (0x02)
SID: 0x00
Scan request notifications: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 5
LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1
Status: Success (0x00)
TX power (selected): 7 dbm (0x07)
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 4
Handle: 0x01
Operation: Complete extended advertising data (0x03)
Fragment preference: Minimize fragmentation (0x01)
Data length: 0x00
@ MGMT Event: Command Complete (0x0001) plen 7
Add Extended Advertising Parameters (0x0054) plen 4
Status: Success (0x00)
Instance: 1
TX power: 7 dbm (0x07)
Available adv data len: 31
Available scan rsp data len: 31
> HCI Event: Command Complete (0x0e) plen 4
LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
Status: Success (0x00)
@ MGMT Command: Add Extended Advertising Data (0x0055) plen 23
Instance: 1
Advertising data length: 12
Name (complete): Intel-3
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
Scan response length: 0
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 16
Handle: 0x01
Operation: Complete extended advertising data (0x03)
Fragment preference: Minimize fragmentation (0x01)
Data length: 0x0c
Name (complete): Intel-3
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
> HCI Event: Command Complete (0x0e) plen 4
LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 4
Handle: 0x01
Operation: Complete scan response data (0x03)
Fragment preference: Minimize fragmentation (0x01)
Data length: 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
Extended advertising: Enabled (0x01)
Number of sets: 1 (0x01)
Entry 0
Handle: 0x01
Duration: 0 ms (0x00)
Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
LE Set Extended Advertising Enable (0x08|0x0039) ncmd 2
Status: Success (0x00)
@ MGMT Event: Command Complete (0x0001) plen 4
Add Extended Advertising Data (0x0055) plen 1
Status: Success (0x00)
Instance: 1
|
|
|
|
|
|
|
|
| |
Report failure when resolving remote name to userspace. This is useful
so the userspace can make an informed decision when to retry name
resolving procedure.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
|
|
|
|
| |
This patch adds definitions of the new Advertisement Monitor Device
Found and Device Lost events to indicate that the controller has
started/stopped tracking a particular 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", and "accept list".
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
| |
This patch updates the mgmt header to align with the mgmt api document
(doc/mgmt-api.txt)
|
|
|
|
| |
This adds the missing opcodes to mgmt_op so they are properly decoded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for the advertising parameters hci request to indicate that an
advertising set uses a scannable PDU, we pass a scannable flag along
with the initial parameters MGMT request. This flag is populated based
on the existence of any scan response data requested by the client.
Without this patch, a broadcast advertisement with a scan response will
either be rejected by the controller, or will ignore the requested scan
response. The patch is tested by performing the above and confirming
that the scan response is retrievable from a peer as expected.
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new SupportedFeatures member tells advertising clients whether the
platform has hardware support for advertising or capability to set tx
power of advertisements.
Additionally, fix small typo in "secondary_exists" function name.
Change is tested on hatch and kukui chromebooks by using dbus-send to
verify that SupportedFeatures always exists, and is only populated when
extended advertising is available.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
|
|
|
|
| |
The new op is to utilize RSSI in advertisement monitor
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows bluetoothd to use the new extended advertising add
mgmt interface if it is available. The new interface will be used by
default, as it allows the client to set advertising intervals, and tx
power if the controller and kernel support extended advertising.
Each new registered advertisement will submit two requests to kernel;
the first sets the advertising parameters for the advertising instance,
and the second sets the advertising data and scan response for the
instance.
The parameters MGMT request will return the tx power selected by the
controller (if applicable), which is propagated to the client via a dbus
Set method.
Note: This patch also fixes a small bug in the packet monitor, where the
tx power value 0xff is considered as "Host has no preference". However,
the spec states this value to be 0x7f. It is corrected in this patch
This change has been tested extensively on Hatch (extended advertising)
and Kukui (no extended advertising) chromebooks. Manual tests do the
following:
- Configure advertisement with custom intervals, tx power with valid and
invalid values and combinations
- Ensure that with valid parameters, they are propagated and set in hci
requests. With invalid parameters, ensure that the registration fails.
Automatic tests verify 25 advertising usage scenarios involving single
and multi-advertising registration, over-registration, parameter
validation, etc. These tests don't test new intervals and tx power, but
validate that the new MGMT interface does not regress compatibility in
these 25 scenarios.
|
|
|
|
|
|
|
|
|
|
| |
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
-------------------------------------
GPL-2.0-or-later : 18
GPL-2.0-only : 1
License: GPL-2.0-or-later
lib/sco.h
lib/sdp.c
lib/a2mp.h
lib/uuid.h
lib/bluetooth.h
lib/hidp.h
lib/rfcomm.h
lib/hci.c
lib/sdp.h
lib/sdp_lib.h
lib/bluetooth.c
lib/mgmt.h
lib/hci.h
lib/uuid.c
lib/l2cap.h
lib/bnep.h
lib/hci_lib.h
lib/cmtp.h
License: GPL-2.0-only
lib/amp.h
|
|
|
|
| |
Add the controller suspend and resume events.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Add Get Device Flags, Set Device Flags and Device Flags Changed.
|
|
|
|
|
| |
This corrects the string of MGMT_OP_ADD_ADV_PATTERNS_MONITOR to match
mgmt-api.txt.
|
|
|
|
|
|
| |
This renames MGMT_OP_ADD_ADV_MONITOR to
MGMT_OP_ADD_ADV_PATTERNS_MONITOR as this command is only used for
patterns.
|
|
|
|
|
| |
This patch simply fixes the definition names (and corresponding
implemenation) to the adopted documentation.
|
|
|
|
|
|
|
|
|
|
| |
This adds the following command opcodes, event codes and the corresponding
structures.
- MGMT_OP_READ_ADV_MONITOR_FEATURES
- MGMT_OP_ADD_ADV_PATTERNS_MONITOR
- MGMT_OP_REMOVE_ADV_MONITOR
- MGMT_EV_ADV_MONITOR_ADDED
- MGMT_EV_ADV_MONITOR_REMOVED
|
|
|
|
| |
This change adds the load default system configuration definitions
|
| |
|
|
|
|
| |
Fixing what looks like a bad merge in the opcode order.
|
| |
|
| |
|
|
|
|
|
| |
This change adds the corresponding user space definition for wide band
speech.
|
|
|
|
| |
Adding the missing string conversion for MGMG_OP_SET_BLOCKED_KEYS.
|
|
|
|
| |
Adding the required definitions for the MGMT_OP_SET_BLOCKED_KEYS Api.
|
|
|
|
|
|
|
|
|
|
| |
This basically adds BREDR packet types also in the PHY confiuration
commands & events and makes the PHYs 32 bit so that it can be
extended in future. This also add configurable PHYs in the GetPhy
command wherein only those can be selected or deselected in SetPhy.
This also adds LE prefix for LE phys to make it more
descriptive
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This patch adds macro definitions for possible advertising instance
flags that can be passed to the "Add Advertising" mgmt command.
|
|
|
|
|
| |
This patch provides data structures and opcodes for the Add/Remove
Advertising commands and the Advertising Added/Removed events.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|