fuchsia.bluetooth.control

PROTOCOLS

Control

Defined in fuchsia.bluetooth.control/control.fidl

Primary Bluetooth control service to access bluetooth

IsBluetoothAvailable

Returns whether or not Bluetooth is currently available on the system.

Request

NameType

Response

NameType
available bool

SetPairingDelegate

Registers a delegate to handle pairing requests. Indicate the capability type of the PairingDelegate using in and out. If your input/output capability is variable, call this function when it changes to update. Setting a pairing delegate closes the previously assigned pairing Delegate.

To disable pairing, set delegate to null.

Request

NameType
delegate PairingDelegate?

Response

NameType
success bool

GetAdapters

Returns information about all local adapters that are known to the system.

Request

NameType

Response

NameType
adapters vector<AdapterInfo>?

SetActiveAdapter

Sets the local adapter with the given identifier to act as the backing adapter for all Bluetooth interfaces.

Request

NameType
identifier string

Response

NameType
status fuchsia.bluetooth/Status

GetActiveAdapterInfo

Returns information on the current active adapter, if it exists.

Request

NameType

Response

NameType
adapter AdapterInfo?

RequestDiscovery

If discovery is true, active discovery is requested. When requesting discovery, general discovery for BR/EDR and LE will be active and newly discovered devices will be reported via RemoteDeviceDelegate.OnDeviceUpdate().

Discovery may be active when not reqested. If an error occurs when starting discovery, it is reflected in status.

Request

NameType
discovery bool

Response

NameType
status fuchsia.bluetooth/Status

GetKnownRemoteDevices

Retrieve the set of known remote devices. Note: These devices are not guaranteed to still be reachable.

Request

NameType

Response

NameType
devices vector<RemoteDevice>

SetName

Sets the public Bluetooth name for this device, or resets to the default name if name is not present.

Request

NameType
name string?

Response

NameType
status fuchsia.bluetooth/Status

SetDeviceClass

Set the Device Class for the active Bluetooth adapter. Values are defined in https://www.bluetooth.com/specifications/assigned-numbers/baseband

Request

NameType
device_class DeviceClass

Response

NameType
status fuchsia.bluetooth/Status

SetDiscoverable

Set the discoverability of this device.

Request

NameType
discoverable bool

Response

NameType
status fuchsia.bluetooth/Status

Connect

Attempt to connect to the remote device_id.

Request

NameType
device_id string

Response

NameType
status fuchsia.bluetooth/Status

Disconnect

Disconnect a previously-connected device. Note: This does not remove a device bond, see Control::Forget.

Request

NameType
device_id string

Response

NameType
status fuchsia.bluetooth/Status

Forget

Forgets device_id completely, removing all bonding information. This will disconnect a device if it is connected.

Request

NameType
device_id string

Response

NameType
status fuchsia.bluetooth/Status

SetIOCapabilities

Set local IO Capabilities to use during pairing.

Request

NameType
input InputCapabilityType
output OutputCapabilityType

OnActiveAdapterChanged

Sent when the active adapter has been updated. If active_adapter is null, then no adapter is currently active.

Response

NameType
adapter AdapterInfo?

OnAdapterUpdated

Sent when an adapter has been updated.

Response

NameType
adapter AdapterInfo

OnAdapterRemoved

Sent when an adapter with the given identifier has been removed from the system.

Response

NameType
identifier string

OnDeviceUpdated

Sent when a peer is updated.

Response

NameType
device RemoteDevice

OnDeviceRemoved

Sent when a peer is removed.

Response

NameType
identifier string

PairingDelegate

Defined in fuchsia.bluetooth.control/pairing_delegate.fidl

OnPairingRequest

Called for most pairing requests. The delegate must respond with “true” or “false” to either accept or reject the pairing request. If the pairing method requires a passkey this is returned as well.

Any response from this method will be ignored if the OnPairingComplete event has already been sent for device.

Request

NameType
device RemoteDevice
method PairingMethod
displayed_passkey string?

Response

NameType
accept bool
entered_passkey string?

OnPairingComplete

Called if the pairing procedure for the device with the given ID is completed. This can be due to successful completion or an error (e.g. due to cancellation by the peer, a timeout, or disconnection) which is indicated by status.

Request

NameType
device_id string
status fuchsia.bluetooth/Status

OnRemoteKeypress

Called to notify keypresses from the peer device during pairing using PairingMethod.PASSKEY_DISPLAY.

This event is used to provide key press events to the delegate for a responsive user experience as the user types the passkey on the peer device. This event will be called once for each key-press.

Request

NameType
device_id string
keypress PairingKeypressType

OnLocalKeypress

The delegate can send this event to notify the peer of local keypresses during pairing using PairingMethod.PASSKEY_ENTRY.

Response

NameType
device_id string
keypress PairingKeypressType

STRUCTS

SecurityProperties

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
authenticated bool No default
secure_connections bool No default
encryption_key_size uint8 No default

RemoteKey

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
security_properties SecurityProperties No default
value uint8[16] No default

LocalKey

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
value uint8[16] No default

LTK

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
key RemoteKey No default
key_size uint8 No default
ediv uint16 No default
rand uint64 No default

LEConnectionParameters

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
connection_interval uint16 No default
connection_latency uint16 No default
supervision_timeout uint16 No default

LEData

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
address string No default
address_type AddressType No default
connection_parameters LEConnectionParameters? No default
services vector<string> No default
ltk LTK? No default
irk RemoteKey? No default
csrk RemoteKey? No default

BREDRData

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
address string No default
piconet_leader bool No default
services vector<string> No default
link_key LTK? No default

BondingData

Defined in fuchsia.bluetooth.control/bonding.fidl

NameTypeDescriptionDefault
identifier string No default
local_address string No default
name string? No default
le LEData? No default
bredr BREDRData? No default

HostData

Defined in fuchsia.bluetooth.control/bonding.fidl

Represents persistent local host data.

NameTypeDescriptionDefault
irk LocalKey?

The local Identity Resolving Key used by a bt-host device to generate Resolvable Private Addresses when privacy is enabled.

NOTE: This key is distributed to LE peers during pairing procedures. The client must take care to assign an IRK that consistent with the local bt-host identity.

No default

AdapterInfo

Defined in fuchsia.bluetooth.control/control.fidl

Bluetooth controller and its associated host-subsystem state that is present on the current platform.

NameTypeDescriptionDefault
identifier string

UUID that uniquely identifies this adapter on the current system.

No default
technology TechnologyType

The Bluetooth technologies that are supported by this adapter.

No default
address string

Public Bluetooth device address which can be displayed to the user.

No default
state AdapterState?

The current adapter state. This field is only present when an AdapterInfo is obtained via the Control and ControlDelegate interfaces. If present, all optional members of state will also be present.

No default

AdapterState

Defined in fuchsia.bluetooth.control/control.fidl

Contains static global information about a local Bluetooth adapter, including its current state. Each adapter instance represents a physical

NameTypeDescriptionDefault
local_name string? No default
discoverable fuchsia.bluetooth/Bool? No default
discovering fuchsia.bluetooth/Bool? No default
local_service_uuids vector<string>? No default

DeviceClass

Defined in fuchsia.bluetooth.control/control.fidl

Device Class represents the Major and Minor Device Class and Service Class of an adapter Values are defined in https://www.bluetooth.com/specifications/assigned-numbers/baseband

NameTypeDescriptionDefault
value uint32 No default

RemoteDevice

Defined in fuchsia.bluetooth.control/remote_device.fidl

Represents a remote BR/EDR, LE, or dual-mode BR/EDR/LE device.

NameTypeDescriptionDefault
identifier string

Uniquely identifies this device on the current system.

No default
address string

Bluetooth device address that identifies this remote device. Clients should display this field to the user when name is not available.

NOTE: Clients should use the identifier field to distinguish between remote devices instead of using their address.

No default
technology TechnologyType

The Bluetooth technologies that are supported by this device.

No default
name string?

The name of the remote device if present or known.

No default
appearance Appearance

The LE appearance property. Present if this is a LE device and the appearance information was obtained over advertising and/or GATT.

No default
rssi fuchsia.bluetooth/Int8?

The most recently obtained advertising signal strength for this device.

No default
tx_power fuchsia.bluetooth/Int8?

The most recently obtained transmission power for this device.

No default
connected bool

Whether or not a BR/EDR and/or LE connection exists between the local adapter and this device.

No default
bonded bool

Whether or not a bond exists between the local adapter and this device.

No default
service_uuids vector<string>

The list of service UUIDs known to be published on this remote device.

No default

ENUMS

AddressType

Type: uint8

Defined in fuchsia.bluetooth.control/bonding.fidl

NameValueDescription
LE_PUBLIC 0
LE_RANDOM 1
BREDR 2

InputCapabilityType

Type: uint32

Defined in fuchsia.bluetooth.control/pairing_delegate.fidl

Input and Output Capabilities for pairing exchanges. See Volume 3, Part C, Table 5.3 and 5.4

NameValueDescription
NONE 0
CONFIRMATION 1
KEYBOARD 2

OutputCapabilityType

Type: uint32

Defined in fuchsia.bluetooth.control/pairing_delegate.fidl

NameValueDescription
NONE 0
DISPLAY 1

PairingMethod

Type: uint32

Defined in fuchsia.bluetooth.control/pairing_delegate.fidl

Different types required by the Security Manager for pairing methods. Bluetooth SIG has different requirements for different device capabilities.

NameValueDescription
CONSENT 0

The user is asked to accept or reject pairing.

PASSKEY_DISPLAY 1

The user is shown a 6-digit numerical passkey which they must enter on the peer device.

PASSKEY_COMPARISON 2

The user is shown a 6-digit numerical passkey which will also shown on the peer device. The user must compare the passkeys and accept the pairing if the passkeys match.

PASSKEY_ENTRY 3

The user is asked to enter a 6-digit passkey.

PairingKeypressType

Type: uint32

Defined in fuchsia.bluetooth.control/pairing_delegate.fidl

NameValueDescription
DIGIT_ENTERED 0

The user has entered a single digit.

DIGIT_ERASED 1

The user has erased a single digit.

PASSKEY_CLEARED 2

The user has cleared the entire passkey.

PASSKEY_ENTERED 3

The user has finished entering the passkey.

Appearance

Type: uint16

Defined in fuchsia.bluetooth.control/remote_device.fidl

Possible values for the LE Appearance property which describes the external appearance of a device at a high level. (See the Bluetooth assigned-numbers document: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml)

NameValueDescription
UNKNOWN 0
PHONE 64
COMPUTER 128
WATCH 192
WATCH_SPORTS 193
CLOCK 256
DISPLAY 320
REMOTE_CONTROL 384
EYE_GLASSES 448
TAG 512
KEYRING 576
MEDIA_PLAYER 640
BARCODE_SCANNER 704
THERMOMETER 768
THERMOMETER_EAR 769
HEART_RATE_SENSOR 832
HEART_RATE_SENSOR_BELT 833
BLOOD_PRESSURE 896
BLOOD_PRESSURE_ARM 897
BLOOD_PRESSURE_WRIST 898
HID 960
HID_KEYBOARD 961
HID_MOUSE 962
HID_JOYSTICK 963
HID_GAMEPAD 964
HID_DIGITIZER_TABLET 965
HID_CARD_READER 966
HID_DIGITAL_PEN 967
HID_BARCODE_SCANNER 968
GLUCOSE_METER 1024
RUNNING_WALKING_SENSOR 1088
RUNNING_WALKING_SENSOR_IN_SHOE 1089
RUNNING_WALKING_SENSOR_ON_SHOE 1090
RUNNING_WALKING_SENSOR_ON_HIP 1091
CYCLING 1152
CYCLING_COMPUTER 1153
CYCLING_SPEED_SENSOR 1154
CYCLING_CADENCE_SENSOR 1155
CYCLING_POWER_SENSOR 1156
CYCLING_SPEED_AND_CADENCE_SENSOR 1157
PULSE_OXIMETER 3136
PULSE_OXIMETER_FINGERTIP 3137
PULSE_OXIMETER_WRIST 3138
WEIGHT_SCALE 3200
PERSONAL_MOBILITY 3264
PERSONAL_MOBILITY_WHEELCHAIR 3265
PERSONAL_MOBILITY_SCOOTER 3266
GLUCOSE_MONITOR 3328
SPORTS_ACTIVITY 5184
SPORTS_ACTIVITY_LOCATION_DISPLAY 5185
SPORTS_ACTIVITY_LOCATION_AND_NAV_DISPLAY 5186
SPORTS_ACTIVITY_LOCATION_POD 5187
SPORTS_ACTIVITY_LOCATION_AND_NAV_POD 5188

TechnologyType

Type: uint32

Defined in fuchsia.bluetooth.control/remote_device.fidl

NameValueDescription
LOW_ENERGY 0
CLASSIC 1
DUAL_MODE 2