fuchsia.bluetooth

Added: 7

PROTOCOLS

Channel

Defined in fuchsia.bluetooth/channel.fidl

A duplex channel for sending/recieving Packets. This protocol also serves as a token to keeping the Channel open. Closing this protocol (and the associated socket for BR/EDR channels) will close the underlying channel.

Added: 23

Receive

Hanging get that waits for inbound packets. Only one Receive may be pending at a time.

Request

<EMPTY>

Response

NameType
payload Channel_Receive_Result

Send

Send multiple packets of data over the channel. Only one Send may be pending at a time.

Request

NameType
packets vector<Packet>

Response

NameType
payload Channel_Send_Result

WatchChannelParameters

For RFCOMM channels, this will not return and calls will hang indefinitely.

For BR/EDR L2CAP connection-oriented channels this will currently not return and calls will hang indefinitely. The initial channel parameters are provided in fuchsia.bluetooth.bredr/Channel.

For LE L2CAP connection-oriented channels, the first call will immediately return the parameters of the remote side of the channel. Subsequent calls will hang until the ChannelParameters change, at which point it will return the new parameters, including those that have not changed.

Request

<EMPTY>

Response

NameType
payload Channel_WatchChannelParameters_Result

STRUCTS

Address

Defined in fuchsia.bluetooth/address.fidl

Represents a 48-bit Bluetooth Device Address.

FieldTypeDescriptionDefault
type AddressType

Type of the device address.

No default
bytes array<uint8, 6>

The device address bytes in little-endian order.

No default

Bool

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED

FieldTypeDescriptionDefault
value bool No default

Channel_Receive_Response

Defined in fuchsia.bluetooth/channel.fidl

FieldTypeDescriptionDefault
packets vector<Packet> No default

Channel_Send_Response

Defined in fuchsia.bluetooth/channel.fidl

<EMPTY>

DeviceClass

Defined in fuchsia.bluetooth/device_class.fidl

The "Class of Device/Service" is a variable-format field that defines the category of a Bluetooth device. The bitfield is divided into segments called "major service class", "major device class", and "minor device class".

No assumptions about the specific functionality or characteristics of any application should be based solely on its inclusion within a Major or Minor device class. For more information, see https://www.bluetooth.com/specifications/assigned-numbers/baseband.

FieldTypeDescriptionDefault
value uint32 No default

Error

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED - Use protocol specific error enums instead

FieldTypeDescriptionDefault
error_code ErrorCode No default
protocol_error_code uint32 No default
description string? No default

HostId

Defined in fuchsia.bluetooth/id.fidl

64-bit unique value used by the system to identify host adapters.

FieldTypeDescriptionDefault
value uint64 No default

Int8

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED

FieldTypeDescriptionDefault
value int8 No default

Packet

Defined in fuchsia.bluetooth/channel.fidl

A payload of data sourced from or sent to a protocol or service on the remote peer.

Added: 23

FieldTypeDescriptionDefault
packet vector<uint8> No default

PeerId

Defined in fuchsia.bluetooth/id.fidl

64-bit unique value used by the system to identify peer devices.

FieldTypeDescriptionDefault
value uint64 No default

Status

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED - Use protocol specific error enums and the 'error' syntax instead

FieldTypeDescriptionDefault
error Error? No default

UInt16

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED

FieldTypeDescriptionDefault
value uint16 No default

Uuid

Defined in fuchsia.bluetooth/uuid.fidl

Represents a Bluetooth UUID in its 128-bit canonical form. While the Bluetooth standard supports 16- and 32-bit short form UUIDs over the wire, the Fuchsia FIDL libraries require all UUIDs to be represented in their canonical 128-bit form.

FieldTypeDescriptionDefault
value array<uint8, 16>

The UUID bytes in little-endian order.

No default

ENUMS

AddressType strict

Type: uint8

Defined in fuchsia.bluetooth/address.fidl

NameValueDescription
1

LE public device address or BR/EDR BD_ADDR.

2

LE private or static random device address.

Appearance flexible

Type: uint16

Defined in fuchsia.bluetooth/appearance.fidl

Possible values for the LE Appearance property which describes the external appearance of a peer at a high level. (See the Bluetooth assigned-numbers document: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml) This enum is flexible as newer devices may use new appearance values and in the future the assigned numbers document may have additional entries.

NameValueDescription
0
64
128
192
193
256
320
384
448
512
576
640
704
768
769
832
833
896
897
898
960
961
962
963
964
965
966
967
968
1024
1088
1089
1090
1091
1152
1153
1154
1155
1156
1157
3136
3137
3138
3200
3264
3265
3266
3328
5184
5185
5186
5187
5188

AssignedCodingFormat flexible

Type: uint8

Defined in fuchsia.bluetooth/coding_format.fidl

Coding Format, as specified by the Bluetooth SIG (see Assigned Numbers document for values): https://www.bluetooth.com/specifications/assigned-numbers/

Added: 23

NameValueDescription
0
1
2
3
4
5
6
7

ChannelMode flexible

Type: uint32

Defined in fuchsia.bluetooth/channel.fidl

The supported channel modes of operation of an L2CAP channel.

For BR/EDR, this is used to specify preferred and accepted L2CAP channel modes. If the peer rejects a non-BASIC mode, the Bluetooth system will attempt to open the channel in BASIC mode instead.

For LE, this is used to specify the exact channel mode to use, if the peer rejects the requested mode, the channel will fail to be established.

For a description of each mode, see Bluetooth Spec v5.4, Vol 3, Part A, Sec 2.4.

Added: 23

NameValueDescription
1

BR/EDR only.

2

BR/EDR only.

3

LE only.

4

LE_only.

ConnectionRole strict

Type: uint32

Defined in fuchsia.bluetooth/connection_role.fidl

Refers to the role of a Bluetooth device (local or peer) in a physical channel piconet. See Bluetooth Vocabulary Guide for more information.

NameValueDescription
1

The role of the device that defines the piconet physical channel in BR/EDR or the "initiating" device in LE.

2

The role of a device that synchronizes to the piconet physical channel in BR/EDR or the "advertising" device in LE.

DataDirection strict

Type: uint8

Defined in fuchsia.bluetooth/coding_format.fidl

Indicates direction of data in a stream. Note that these values do not correspond to constants from the Bluetooth Core specification.

Added: 24

NameValueDescription
1

Host => Controller

2

Controller => Host

ErrorCode strict

Type: uint32

Defined in fuchsia.bluetooth/deprecated.fidl

DEPRECATED - Use protocol specific error enums and zx.Status instead

NameValueDescription
0
1
2
3
4
5
6
7
8
9
10
11

LogicalTransportType flexible

Type: uint8

Defined in fuchsia.bluetooth/coding_format.fidl

Logical transport types that may be used with encoded data streams. Note that these values do not correspond to constants from the Bluetooth Core specification, nor are BR/EDR values supported yet.

Added: 24

NameValueDescription
1

LE CIS

2

LE BIS

TABLES

ChannelParameters

Defined in fuchsia.bluetooth/channel.fidl

The set of parameters to use or that were used to establish an L2CAP connection-oriented channel.

Added: 23

OrdinalFieldTypeDescription
channel_mode ChannelMode

Optional. For BR/EDR: If not provided, BASIC will be used. For LE: If not provided, LE_CREDIT_BASED_FLOW_CONTROL will be used.

max_rx_packet_size uint16

Maximum packet size this profile is capable of accepting. Must be >= 48. Optional. If not provided, the size will be determined by the Bluetooth system. No guarantees are given regarding the size selected.

security_requirements SecurityRequirements

For BR/EDR: Minimum security requirements a link must have before this channel can be created. The requirements provided here will be attempted with the peer before the channel is established. If a peer cannot provide the requirements, the channel is closed. Optional. If not provided, then the only security property guaranteed is encryption.

For LE: Unused, must not be present.

flush_timeout zx/Duration

For BR/EDR: The flush timeout indicates the maximum amount of time a data packet should be buffered in the controller before it is dropped. A flush timeout of infinity can be used to mark packets as flushable without any particular flush timeout. Range: 1ms - 1,279ms (or ∞). Rounded down. Optional. If not provided, no flush timeout and packets are not flushable.

For LE: Unused, must not be present.

CodecAttributes

Defined in fuchsia.bluetooth/coding_format.fidl

Identifies a codec and its configuration that may be used with a data stream.

Added: 24

OrdinalFieldTypeDescription
codec_id CodecId

Coding format. Required.

codec_configuration vector<uint8>

Configuration data. Optionally present, as determined by codec being used.

SecurityRequirements

Defined in fuchsia.bluetooth/channel.fidl

Authentication and permission requirements to access an advertised service. BR/EDR only.

Added: 23

OrdinalFieldTypeDescription
authentication_required bool

If present and true, the physical link must be authenticated with on-path attacker protection to access this service. If missing then authentication is not required.

secure_connections_required bool

If present and true, the physical link must be encrypted with a Secure Connections key to access this service if the host is capable. Advertisement will fail if the host does not support Secure Connections. See Bluetooth Spec v5.2, Vol 3, Part C, Sec 5.2.2.8.

VendorCodingFormat

Defined in fuchsia.bluetooth/coding_format.fidl

Vendor-defined coding format.

Added: 24

OrdinalFieldTypeDescription
company_id uint16

Company ID, see Assigned Numbers document for values https://www.bluetooth.com/specifications/assigned-numbers/ Required.

vendor_id uint16

Vendor-defined codec ID. Required.

UNIONS

Channel_Receive_Result strict

Defined in fuchsia.bluetooth/channel.fidl

OrdinalVariantTypeDescription
response Channel_Receive_Response
framework_err internal

Channel_Send_Result strict

Defined in fuchsia.bluetooth/channel.fidl

OrdinalVariantTypeDescription
response Channel_Send_Response
framework_err internal

Channel_WatchChannelParameters_Result strict

Defined in fuchsia.bluetooth/channel.fidl

OrdinalVariantTypeDescription
response ChannelParameters
framework_err internal

CodecId flexible

Defined in fuchsia.bluetooth/coding_format.fidl

Specifies a coding format.

Added: 24
OrdinalVariantTypeDescription
assigned_format AssignedCodingFormat

Coding format defined by Bluetooth SIG.

vendor_format VendorCodingFormat

Coding format defined by vendor.

CONSTANTS

NameValueTypeDescription
MAJOR_DEVICE_CLASS_AUDIO_VIDEO 1024 uint32
MAJOR_DEVICE_CLASS_COMPUTER 256 uint32
MAJOR_DEVICE_CLASS_HEALTH 2304 uint32
MAJOR_DEVICE_CLASS_IMAGING 1536 uint32
MAJOR_DEVICE_CLASS_LAN 768 uint32
MAJOR_DEVICE_CLASS_MASK 7936 uint32

Constants for the major device class field. The major device class is defined by bits 12-8.

MAJOR_DEVICE_CLASS_MISCELLANEOUS 0 uint32
MAJOR_DEVICE_CLASS_PERIPHERAL 1280 uint32
MAJOR_DEVICE_CLASS_PHONE 512 uint32
MAJOR_DEVICE_CLASS_TOY 2048 uint32
MAJOR_DEVICE_CLASS_UNCATEGORIZED 7936 uint32
MAJOR_DEVICE_CLASS_WEARABLE 1792 uint32
MAX_DEVICE_NAME_LENGTH 248 uint8

The maximum length of a device name. This value was selected based on the HCI and GAP specifications (v5.2, Vol 4, Part E, 7.3.11 and Vol 3, Part C, 12.1).

UUID_STRING_REPRESENTATION_LENGTH 36 uint8

The size of the standard string representation for a UUID. This value is based on the canonical 36-character 8-4-4-4-12 format defined in IETF RFC4122 Section 3.

ALIASES

NameValueDescription
DeviceName string[MAX_DEVICE_NAME_LENGTH]

Alias for a Bluetooth device name.

PeerIdString string[16]

DEPRECATED - Use fuchsia.bluetooth/PeerId instead

UuidString string[UUID_STRING_REPRESENTATION_LENGTH]

DEPRECATED - Use fuchsia.bluetooth/Uuid instead