APIs for interacting with Bluetooth vendor and transport drivers.
PROTOCOLS
Emulator
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Protocol used to emulate a Bluetooth controller that supports the standard Bluetooth HCI. Represents the bt-emulator device protocol. A bt-emulator device is used for configuring and publishing fake bt-hci devices.
AddBredrPeer
Inserts a new BR/EDR peer device to be emulated by this controller. Once registered, the state
of the fake peer can be driven and observed using the peer handle.
A reply will be sent to acknowledge the creation of the fake peer. If a peer cannot be
initialized (e.g. due to a missing required field in parameters or for containing an
address that is already emulated) the peer handle will be closed and an error reply will
be sent.
The peer will appear in inquiry results and respond to requests according to its
configuration as long as the peer channel is open. The emulator stops emulating this peer
when the channel gets closed, which makes it no longer discoverable and not respond to any
requests.
Request
| Name | Type |
|---|---|
payload |
PeerParameters
|
Response
| Name | Type |
|---|---|
payload |
Emulator_AddBredrPeer_Result
|
AddLowEnergyPeer
Inserts a new LE peer device to be emulated by this controller. Once registered, the state
of the fake peer can be driven and observed using the peer handle.
A reply will be sent to acknowledge the creation of the fake peer. If a peer cannot be
initialized (e.g. due to a missing required field in parameters or for containing an
address that is already emulated) the peer handle will be closed and an error reply will
be sent.
The peer will appear in advertising reports and respond to requests according to its
configuration as long as the peer channel is open. The emulator stops emulating this peer
when the channel gets closed, which makes it no longer discoverable and not respond to any
requests.
Request
| Name | Type |
|---|---|
payload |
PeerParameters
|
Response
| Name | Type |
|---|---|
payload |
Emulator_AddLowEnergyPeer_Result
|
Publish
Publish a bt-hci device using the provided settings. Each Emulator instance can only
manage a single bt-hci device. Returns Emulator.HCI_ALREADY_PUBLISHED if the device has
already been published.
Request
| Name | Type |
|---|---|
payload |
EmulatorSettings
|
Response
| Name | Type |
|---|---|
payload |
Emulator_Publish_Result
|
WatchControllerParameters
Hanging get pattern for the controller parameter state will not resolve until the state has changed from the last response.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Emulator_WatchControllerParameters_Result
|
WatchLeScanStates
Returns a vector of the least to most recent states for the link layer LE scan procedure. This method returns when there has been at least one state change since the last invocation of this method by this client.
Multiple calls to this method can be outstanding at a given time. All calls will resolve in a response as soon as there is a change to the scan state.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Emulator_WatchLeScanStates_Result
|
WatchLegacyAdvertisingStates
Returns a vector of the least to most recent states for the link layer LE legacy advertising procedure. This method returns when there has been at least one state change since the last invocation of this method by this client.
Multiple calls to this method can be outstanding at a given time. All calls will resolve in a response as soon as there is a change to the scan state.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Emulator_WatchLegacyAdvertisingStates_Result
|
Hci
Defined in fuchsia.hardware.bluetooth/hci.fidl
ConfigureSco
Configure the HCI for a SCO connection with the indicated parameters. This must be called before sending/receiving data on the SCO channel. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver.
Request
| Name | Type |
|---|---|
coding_format |
ScoCodingFormat
|
encoding |
ScoEncoding
|
sample_rate |
ScoSampleRate
|
Response
| Name | Type |
|---|---|
payload |
Hci_ConfigureSco_Result
|
OpenAclDataChannel
Open the two-way HCI ACL data channel. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Request
| Name | Type |
|---|---|
channel |
handle<channel>
|
Response
| Name | Type |
|---|---|
payload |
Hci_OpenAclDataChannel_Result
|
OpenCommandChannel
Open the two-way HCI command channel for sending HCI commands and receiving event packets. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Request
| Name | Type |
|---|---|
channel |
handle<channel>
|
Response
| Name | Type |
|---|---|
payload |
Hci_OpenCommandChannel_Result
|
OpenIsoDataChannel
Opens a channel on the provided handle for sending and receiving isochronous data packets. The zircon channel is closed in the event of an error opening the hci channel or if the hci channel is already associated with a handle to another zircon channel. Returns ZX_ERR_NOT_SUPPORTED if ISO is not supported by the current vendor or transport driver. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Request
| Name | Type |
|---|---|
channel |
handle<channel>
|
Response
| Name | Type |
|---|---|
payload |
Hci_OpenIsoDataChannel_Result
|
OpenScoDataChannel
Opens a SCO channel on the provided handle. The zircon channel is closed in the event of an error opening the hci channel or if the hci channel is already associated with a handle to another zircon channel. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Request
| Name | Type |
|---|---|
channel |
handle<channel>
|
Response
| Name | Type |
|---|---|
payload |
Hci_OpenScoDataChannel_Result
|
OpenSnoopChannel
Open an output-only channel for monitoring HCI traffic. The format of each message is: [1-octet flags] [n-octet payload] The flags octet is a bitfield with the following values defined:
- 0x00: The payload represents a command packet sent from the host to the controller.
- 0x01: The payload represents an event packet sent by the controller. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Request
| Name | Type |
|---|---|
channel |
handle<channel>
|
Response
| Name | Type |
|---|---|
payload |
Hci_OpenSnoopChannel_Result
|
ResetSco
Releases resources held by an active SCO connection. Must be called when a SCO connection is closed. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Hci_ResetSco_Result
|
HciTransport
Defined in fuchsia.hardware.bluetooth/hci.fidl
AckReceive
Request
<EMPTY>
ConfigureSco
Establish a SCO connection. Only 1 SCO connection can be configured at a time.
Request
| Name | Type |
|---|---|
payload |
HciTransportConfigureScoRequest
|
OnReceive
More than one packet event can be sent before acknowledged. Each packet must be
acknowledged with AckReceive. Servers should limit the number of pending acknowledgements
to avoid channel overflow. A maximum of 10 unacked packets is recommended. If a command or
SCO packet is received by the client, the client should close the protocol.
Response
| Name | Type |
|---|---|
payload |
ReceivedPacket
|
Send
More than one Send can be pending simultaneously. Prefer to limit the number of pending calls to avoid overflow. A maximum of 10 pending calls is suggested. If an event or SCO packet is received by the server, the server should close the protocol.
Request
| Name | Type |
|---|---|
payload |
SentPacket
|
Response
| Name | Type |
|---|---|
payload |
HciTransport_Send_Result
|
Peer
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Protocol used to drive the state of a fake peer device.
AssignConnectionStatus
Assign a HCI status for the controller to generate in response to connection requests.
Applies to all successive HCI_Create_Connection and HCI_LE_Create_Connection commands. The
procedure is acknowledged with an empty response.
Request
| Name | Type |
|---|---|
status |
HciError
|
Response
| Name | Type |
|---|---|
payload |
Peer_AssignConnectionStatus_Result
|
EmulateDisconnectionComplete
Emulate disconnection. Does nothing if the peer is not connected.
Request
<EMPTY>
EmulateLeConnectionComplete
Emulates a LE connection event. Does nothing if the peer is already connected. The
role parameter determines the link layer connection role.
Request
| Name | Type |
|---|---|
role |
fuchsia.bluetooth/ConnectionRole
|
SetDeviceClass
Sets the device class reported in the inquiry response for this peer during device
discovery. If the peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED
epitaph.
Request
| Name | Type |
|---|---|
value |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Peer_SetDeviceClass_Result
|
SetLeAdvertisement
Request
| Name | Type |
|---|---|
payload |
PeerSetLeAdvertisementRequest
|
Response
| Name | Type |
|---|---|
payload |
Peer_SetLeAdvertisement_Result
|
SetServiceDefinitions
Sets the peer's services that will be discoverable via Service Discovery Protocol. If the
peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED epitaph.
Request
| Name | Type |
|---|---|
service_definitions |
vector<fuchsia.bluetooth.bredr/ServiceDefinition>:32
|
Response
| Name | Type |
|---|---|
payload |
Peer_SetServiceDefinitions_Result
|
WatchConnectionStates
Returns a vector of the least to most recent controller connection states. This method returns when there has been a state change since the last invocation of this method by this client.
Multiple calls to this method can be outstanding at a given time. All calls will resolve in a response as soon as there is a change to the scan state.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Peer_WatchConnectionStates_Result
|
ScoConnection
Defined in fuchsia.hardware.bluetooth/hci.fidl
AckReceive
Request
<EMPTY>
OnReceive
More than one packet event can be sent before acknowledged. Each packet must be
acknowledged with AckReceive. Servers should limit the number of pending acknowledgements
to avoid channel overflow. A maximum of 10 unacked packets is recommended.
Response
| Name | Type |
|---|---|
packet |
vector<uint8>:258
|
Send
More than one Send can be pending simultaneously. Prefer to limit the number of pending calls to avoid overflow. A maximum of 10 pending calls is suggested.
Request
| Name | Type |
|---|---|
packet |
vector<uint8>:258
|
Response
| Name | Type |
|---|---|
payload |
ScoConnection_Send_Result
|
Stop
The server will close the protocol when Stop is received. This is useful for
synchronization (e.g. before configuring another ScoConnection).
Request
<EMPTY>
Snoop
Defined in fuchsia.hardware.bluetooth/hci.fidl
AcknowledgePackets
Acknowledge packets have been received up to sequence.
Request
| Name | Type |
|---|---|
sequence |
uint64
|
OnDroppedPackets
Sent by the server once after AcknowledgePackets is received if packets were dropped since
the last OnObservePacket.
Response
| Name | Type |
|---|---|
payload |
SnoopOnDroppedPacketsRequest
|
OnObservePacket
A packet has been transmitted/received. Some number of packets can be observed before the server stalls. The server is allowed to drop packets if the client takes too long to acknowledge packets.
Response
| Name | Type |
|---|---|
payload |
SnoopOnObservePacketRequest
|
Vendor
Defined in fuchsia.hardware.bluetooth/vendor.fidl
The BtVendor protocol may be implemented by vendor drivers to support feature interrogation and vendor command encoding.
EncodeCommand
Encode the vendor HCI command and return the encoded command.
See VendorCommand for possible commands and parameters.
- error
ZX_ERR_NOT_SUPPORTEDThe command is not supported. - error
ZX_ERR_INVALID_ARGSThe parameters of the command are invalid.
Request
| Name | Type |
|---|---|
payload |
VendorCommand
|
Response
| Name | Type |
|---|---|
payload |
Vendor_EncodeCommand_Result
|
GetFeatures
Returns the Vendor Features supported by this controller.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Vendor_GetFeatures_Result
|
OpenHci
Deprecated. Open the HCI protocol to the controller. This call may block until the controller has been initialized. Returns ALREADY_BOUND if another client has already connected.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Vendor_OpenHci_Result
|
OpenHciTransport
Open the HciTransport protocol to the controller. This call may block until the controller has been initialized. Returns ALREADY_BOUND if another client has already connected.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Vendor_OpenHciTransport_Result
|
OpenSnoop
Open the Snoop protocol to the transport driver. Returns ALREADY_BOUND if another client has already connected.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Vendor_OpenSnoop_Result
|
VirtualController
Defined in fuchsia.hardware.bluetooth/virtual.fidl
Used for spawning virtual Bluetooth devices.
CreateEmulator
Creates a child device, and returns the name of the child created.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
VirtualController_CreateEmulator_Result
|
CreateLoopbackDevice
Creates a virtual Bluetooth serial device, speaking the BT HCI UART protocol on the provided handle. The zircon channel is closed in the event of an error.
Request
| Name | Type |
|---|---|
payload |
VirtualControllerCreateLoopbackDeviceRequest
|
STRUCTS
Emulator_AddBredrPeer_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Emulator_AddLowEnergyPeer_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Emulator_Publish_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Emulator_WatchLeScanStates_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Field | Type | Description | Default |
|---|---|---|---|
states |
vector<LeScanState>
|
No default |
Emulator_WatchLegacyAdvertisingStates_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Field | Type | Description | Default |
|---|---|---|---|
states |
vector<LegacyAdvertisingState>
|
No default |
HciTransport_Send_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_ConfigureSco_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_OpenAclDataChannel_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_OpenCommandChannel_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_OpenIsoDataChannel_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_OpenScoDataChannel_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_OpenSnoopChannel_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Hci_ResetSco_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
Peer_AssignConnectionStatus_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Peer_SetDeviceClass_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Peer_SetLeAdvertisement_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Peer_SetServiceDefinitions_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
<EMPTY>
Peer_WatchConnectionStates_Response
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Field | Type | Description | Default |
|---|---|---|---|
states |
vector<ConnectionState>
|
No default |
ScoConnection_Send_Response
Defined in fuchsia.hardware.bluetooth/hci.fidl
<EMPTY>
ScoPacket
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Field | Type | Description | Default |
|---|---|---|---|
packet |
vector<uint8>:258
|
No default |
Vendor_EncodeCommand_Response
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Field | Type | Description | Default |
|---|---|---|---|
encoded |
vector<uint8>:16
|
No default |
Vendor_OpenHciTransport_Response resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Field | Type | Description | Default |
|---|---|---|---|
channel |
client_end:HciTransport
|
No default |
Vendor_OpenHci_Response resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Field | Type | Description | Default |
|---|---|---|---|
channel |
client_end:Hci
|
No default |
Vendor_OpenSnoop_Response resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Field | Type | Description | Default |
|---|---|---|---|
channel |
client_end:Snoop
|
No default |
VirtualController_CreateEmulator_Response
Defined in fuchsia.hardware.bluetooth/virtual.fidl
| Field | Type | Description | Default |
|---|---|---|---|
name |
string:32?
|
No default |
ENUMS
ConnectionState flexible
Type: uint32
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Name | Value | Description |
|---|---|---|
CONNECTED |
1 |
|
DISCONNECTED |
2 |
EmulatorError flexible
Type: uint32
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Error codes that can be generated for emulator-wide configurations.
| Name | Value | Description |
|---|---|---|
FAILED |
1 |
|
HCI_ALREADY_PUBLISHED |
2 |
EmulatorPeerError flexible
Type: uint32
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Error codes that are generated for functions that manipulate fake peers.
| Name | Value | Description |
|---|---|---|
ADDRESS_REPEATED |
1 |
|
PARAMETERS_INVALID |
2 |
|
NOT_FOUND |
3 |
HciConfig flexible
Type: uint32
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Pre-set HCI configurations.
| Name | Value | Description |
|---|---|---|
DUAL_MODE |
1 |
Support both BR/EDR and LE in LMP features. |
LE_ONLY |
2 |
Limits supported features and HCI commands to those that are required for LE only. |
HciError flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Defines the list of HCI protocol error codes that a Bluetooth controller can report. These values are taken from Bluetooth Core Specification v5.4, Vol 2, Part D, Section 1.3
| Name | Value | Description |
|---|---|---|
SUCCESS |
0 |
|
UNKNOWN_COMMAND |
1 |
|
UNKNOWN_CONNECTION_ID |
2 |
|
HARDWARE_FAILURE |
3 |
|
PAGE_TIMEOUT |
4 |
|
AUTHENTICATION_FAILURE |
5 |
|
PIN_OR_KEY_MISSING |
6 |
|
MEMORY_CAPACITY_EXCEEDED |
7 |
|
CONNECTION_TIMEOUT |
8 |
|
CONNECTION_LIMIT_EXCEEDED |
9 |
|
SYNCHRONOUS_CONNECTION_LIMIT_EXCEEDED |
10 |
|
CONNECTION_ALREADY_EXISTS |
11 |
|
COMMAND_DISALLOWED |
12 |
|
CONNECTION_REJECTED_LIMITED_RESOURCES |
13 |
|
CONNECTION_REJECTED_SECURITY |
14 |
|
CONNECTION_REJECTED_BAD_BD_ADDR |
15 |
|
CONNECTION_ACCEPT_TIMEOUT_EXCEEDED |
16 |
|
UNSUPPORTED_FEATURE_OR_PARAMETER |
17 |
|
INVALID_HCICOMMAND_PARAMETERS |
18 |
|
REMOTE_USER_TERMINATED_CONNECTION |
19 |
|
REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES |
20 |
|
REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF |
21 |
|
CONNECTION_TERMINATED_BY_LOCAL_HOST |
22 |
|
REPEATED_ATTEMPTS |
23 |
|
PAIRING_NOT_ALLOWED |
24 |
|
UNKNOWN_LMP_PDU |
25 |
|
UNSUPPORTED_REMOTE_FEATURE |
26 |
|
SCO_OFFSET_REJECTED |
27 |
|
SCO_INTERVAL_REJECTED |
28 |
|
SCO_AIR_MODE_REJECTED |
29 |
|
INVALID_LMP_OR_LL_PARAMETERS |
30 |
|
UNSPECIFIED_ERROR |
31 |
|
UNSUPPORTED_LMP_OR_LL_PARAMETER_VALUE |
32 |
|
ROLE_CHANGE_NOT_ALLOWED |
33 |
|
LMP_OR_LL_RESPONSE_TIMEOUT |
34 |
|
LMP_ERROR_TRANSACTION_COLLISION |
35 |
|
LMP_PDU_NOT_ALLOWED |
36 |
|
ENCRYPTION_MODE_NOT_ACCEPTABLE |
37 |
|
LINK_KEY_CANNOT_BE_CHANGED |
38 |
|
REQUESTED_QOS_NOT_SUPPORTED |
39 |
|
INSTANT_PASSED |
40 |
|
PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED |
41 |
|
DIFFERENT_TRANSACTION_COLLISION |
42 |
|
RESERVED0 |
43 |
|
QOS_UNACCEPTABLE_PARAMETER |
44 |
|
QOS_REJECTED |
45 |
|
CHANNEL_CLASSIFICATION_NOT_SUPPORTED |
46 |
|
INSUFFICIENT_SECURITY |
47 |
|
PARAMETER_OUT_OF_MANDATORY_RANGE |
48 |
|
RESERVED1 |
49 |
|
ROLE_SWITCH_PENDING |
50 |
|
RESERVED2 |
51 |
|
RESERVED_SLOT_VIOLATION |
52 |
|
ROLE_SWITCH_FAILED |
53 |
|
EXTENDED_INQUIRY_RESPONSE_TOO_LARGE |
54 |
|
SECURE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST |
55 |
|
HOST_BUSY_PAIRING |
56 |
|
CONNECTION_REJECTED_NO_SUITABLE_CHANNEL_FOUND |
57 |
|
CONTROLLER_BUSY |
58 |
|
UNACCEPTABLE_CONNECTION_PARAMETERS |
59 |
|
DIRECTED_ADVERTISING_TIMEOUT |
60 |
|
CONNECTION_TERMINATED_MIC_FAILURE |
61 |
|
CONNECTION_FAILED_TO_BE_ESTABLISHED |
62 |
|
MAC_CONNECTION_FAILED |
63 |
|
COARSE_CLOCK_ADJUSTMENT_REJECTED |
64 |
|
TYPE0_SUBMAP_NOT_DEFINED |
65 |
|
UNKNOWN_ADVERTISING_IDENTIFIER |
66 |
|
LIMIT_REACHED |
67 |
|
OPERATION_CANCELLED_BY_HOST |
68 |
|
PACKET_TOO_LONG |
69 |
|
TOO_LATE |
70 |
|
TOO_EARLY |
71 |
LegacyAdvertisingType strict
Type: uint8
Defined in fuchsia.hardware.bluetooth/emulator.fidl
LE legacy advertising types from Bluetooth Core Specification v5.4, Vol 4, Part E, 7.8.5.
| Name | Value | Description |
|---|---|---|
ADV_IND |
0 |
Connectable and scannable. |
ADV_DIRECT_IND |
1 |
Connectable, high-duty cycle, directed. |
ADV_SCAN_IND |
2 |
Scannable, undirected. |
ADV_NONCONN_IND |
3 |
Non-connectable, undirected |
SCAN_RSP |
4 |
Scan response |
PacketDirection strict
Type: uint32
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Name | Value | Description |
|---|---|---|
HOST_TO_CONTROLLER |
1 |
|
CONTROLLER_TO_HOST |
2 |
ScoCodingFormat flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Name | Value | Description |
|---|---|---|
CVSD |
1 |
|
MSBC |
2 |
ScoEncoding flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Name | Value | Description |
|---|---|---|
BITS_8 |
1 |
|
BITS_16 |
2 |
ScoSampleRate flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Name | Value | Description |
|---|---|---|
KHZ_8 |
1 |
|
KHZ_16 |
2 |
VendorAclDirection flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Name | Value | Description |
|---|---|---|
SOURCE |
1 |
|
SINK |
2 |
VendorAclPriority flexible
Type: uint8
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Name | Value | Description |
|---|---|---|
NORMAL |
1 |
|
HIGH |
2 |
TABLES
AclBufferSettings
Defined in fuchsia.hardware.bluetooth/emulator.fidl
The HCI ACL data flow-control parameters.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
data_packet_length |
uint16
|
ACL frame MTU in bytes. |
2 |
total_num_data_packets |
uint8
|
The maximum number of ACL frames that the controller can buffer. |
AdvertisingData
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
data |
vector<uint8>:31
|
AndroidVendorSupport
Defined in fuchsia.hardware.bluetooth/vendor.fidl
Indicates support for Android Vendor Extensions If empty, Android HCI Extensions are supported but the version is unspecified. The version should be detected using the LE Get Vendor Capabilities Command.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
major_version |
uint8
|
|
2 |
minor_version |
uint8
|
AudioOffloadSettings
Defined in fuchsia.hardware.bluetooth/vendor.fidl
Various settings for audio offload data paths, which vary by controller manufacturer and firmware version.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
sco_offload_index |
uint8
|
The index to use when SCO OFFLOAD DataPath is requested. |
ControllerParameters
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Contains Bluetooth controller & baseband parameters that are writable by the host but don't fall under a particular procedural category (as are those defined below).
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
local_name |
string:248
|
The local name used for the Link Layer name discovery procedure. This parameter only applies for the BR/EDR transport. In LE, the local name is provided as an advertising parameter and via GATT. |
2 |
device_class |
fuchsia.bluetooth/DeviceClass
|
The local "Class of Device" used during the BR/EDR inquiry procedure. |
EmulatorSettings
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Controller settings used by the emulator.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
address |
fuchsia.bluetooth/Address
|
The |
2 |
hci_config |
HciConfig
|
Supported HCI command configuration. Defaults to " |
3 |
extended_advertising |
bool
|
True if the 5.0 extended advertising features are supported. Defaults to "false". |
4 |
acl_buffer_settings |
AclBufferSettings
|
The ACL-U data buffer settings. Defaults to
data_packet_length: 1024
total_num_data_packets: 5
IF |
5 |
le_acl_buffer_settings |
AclBufferSettings
|
The LE-U ACL data buffer settings. Defaults to data_packet_length: 251 total_num_data_packets: 5 |
HciTransportConfigureScoRequest resource
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
coding_format |
ScoCodingFormat
|
Required. |
2 |
encoding |
ScoEncoding
|
Required. |
3 |
sample_rate |
ScoSampleRate
|
Required. |
4 |
connection |
server_end:ScoConnection
|
Required. |
LeScanState
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Represents the LE scan state. The fields are present if scan parameters have been configured.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
enabled |
bool
|
True if a scan is enabled. |
2 |
active |
bool
|
True if an active scan is enabled. Otherwise the scan is passive. |
3 |
interval |
uint16
|
The scan interval and window parameters. These are defined in Bluetooth controller "timeslices" where 1 slice = 0.625 ms. Valid values range from 0x4 (2.5 ms) to 0x4000 (10.24 ms). |
4 |
window |
uint16
|
|
5 |
filter_duplicates |
bool
|
True if duplicate filtering has been enabled. |
6 |
address_type |
fuchsia.bluetooth/AddressType
|
The type of local device address used. |
LegacyAdvertisingState
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Controller parameters for legacy advertising.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
enabled |
bool
|
True if advertising has been enabled using the HCI_LE_Set_Advertising_Enable command. This field is always present. |
2 |
type |
LegacyAdvertisingType
|
The most recently configured advertising type. This field is always present. Defaults to fuchsia.hardware.bluetooth/LegacyAdvertisingType.ADV_IND. |
3 |
address_type |
fuchsia.bluetooth/AddressType
|
The LE address type being used for advertising. This field is always present. Defaults to fuchsia.bluetooth/AddressType.PUBLIC. |
4 |
interval_min |
uint16
|
The host-specified advertising interval range parameters. Present only if configured. |
5 |
interval_max |
uint16
|
|
6 |
advertising_data |
AdvertisingData
|
Any configured advertising and scan response data. Present only if either field is non-zero. |
7 |
scan_response |
AdvertisingData
|
PeerParameters resource
Defined in fuchsia.hardware.bluetooth/emulator.fidl
Parameters used to emulate a peer's behavior over the BR/EDR/Low Energy transport.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
address |
fuchsia.bluetooth/Address
|
The public BR/EDR BD_ADDR address of a peer. This field is mandatory. |
2 |
connectable |
bool
|
When present and true, the peer will send connectable advertisements and accept connection requests. The peer will ignore connection requests if not connectable. |
3 |
channel |
server_end:Peer
|
Server end of channel bound to Peer protocol. |
PeerSetLeAdvertisementRequest
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
le_address |
fuchsia.bluetooth/Address
|
The LE address of the peer. |
2 |
advertisement |
AdvertisingData
|
The advertising data contents. If not present, the advertising data sent by this peer will be empty. |
3 |
scan_response |
AdvertisingData
|
The scan response data contents. When present, the fake controller will generate scannable advertising packets and scan response events. |
SnoopOnDroppedPacketsRequest
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
sent |
uint32
|
|
2 |
received |
uint32
|
SnoopOnObservePacketRequest
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
sequence |
uint64
|
Monotonically increasing packet count. Used for flow control in conjunction with
|
2 |
direction |
PacketDirection
|
|
3 |
packet |
SnoopPacket
|
VendorFeatures
Defined in fuchsia.hardware.bluetooth/vendor.fidl
Table of features supported by the vendor.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
acl_priority_command |
bool
|
Supports the SetAclPriority command If missing, the command is not supported. |
2 |
android_vendor_extensions |
AndroidVendorSupport
|
Supports Android Vendor Extensions If missing, Android Vendor Extensions are not supported. |
3 |
audio_offload_settings |
AudioOffloadSettings
|
Specify some alternative settings for audio offload paths. If missing, use the reasonable defaults or configured settings. Added: 28
|
VendorSetAclPriorityParams
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
connection_handle |
uint16
|
The ACL connection handle which is requested to be prioritized. |
2 |
priority |
VendorAclPriority
|
|
3 |
direction |
VendorAclDirection
|
The direction data should be prioritized in. May not be supported by all vendors. Ignored when priority is normal. |
VirtualControllerCreateLoopbackDeviceRequest resource
Defined in fuchsia.hardware.bluetooth/virtual.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
uart_channel |
handle<channel>
|
UNIONS
Emulator_AddBredrPeer_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Emulator_AddBredrPeer_Response
|
|
2 |
err |
EmulatorPeerError
|
|
3 |
framework_err |
internal
|
Emulator_AddLowEnergyPeer_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Emulator_AddLowEnergyPeer_Response
|
|
2 |
err |
EmulatorPeerError
|
|
3 |
framework_err |
internal
|
Emulator_Publish_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Emulator_Publish_Response
|
|
2 |
err |
EmulatorError
|
|
3 |
framework_err |
internal
|
Emulator_WatchControllerParameters_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
ControllerParameters
|
|
3 |
framework_err |
internal
|
Emulator_WatchLeScanStates_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Emulator_WatchLeScanStates_Response
|
|
3 |
framework_err |
internal
|
Emulator_WatchLegacyAdvertisingStates_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Emulator_WatchLegacyAdvertisingStates_Response
|
|
3 |
framework_err |
internal
|
HciTransport_Send_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
HciTransport_Send_Response
|
|
3 |
framework_err |
internal
|
Hci_ConfigureSco_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_ConfigureSco_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_OpenAclDataChannel_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_OpenAclDataChannel_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_OpenCommandChannel_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_OpenCommandChannel_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_OpenIsoDataChannel_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_OpenIsoDataChannel_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_OpenScoDataChannel_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_OpenScoDataChannel_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_OpenSnoopChannel_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_OpenSnoopChannel_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Hci_ResetSco_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Hci_ResetSco_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Peer_AssignConnectionStatus_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Peer_AssignConnectionStatus_Response
|
|
3 |
framework_err |
internal
|
Peer_SetDeviceClass_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Peer_SetDeviceClass_Response
|
|
3 |
framework_err |
internal
|
Peer_SetLeAdvertisement_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Peer_SetLeAdvertisement_Response
|
|
2 |
err |
EmulatorPeerError
|
|
3 |
framework_err |
internal
|
Peer_SetServiceDefinitions_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Peer_SetServiceDefinitions_Response
|
|
3 |
framework_err |
internal
|
Peer_WatchConnectionStates_Result strict
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Peer_WatchConnectionStates_Response
|
|
3 |
framework_err |
internal
|
ReceivedPacket flexible
Defined in fuchsia.hardware.bluetooth/hci.fidl
Packet received by the host from the controller.
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
event |
vector<uint8>:257
|
|
2 |
acl |
vector<uint8>:65539
|
|
3 |
iso |
vector<uint8>:16387
|
ScoConnection_Send_Result strict
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
ScoConnection_Send_Response
|
|
3 |
framework_err |
internal
|
SentPacket flexible
Defined in fuchsia.hardware.bluetooth/hci.fidl
Packet sent by the host to the controller.
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
command |
vector<uint8>:258
|
|
2 |
acl |
vector<uint8>:65539
|
|
3 |
iso |
vector<uint8>:16387
|
SnoopPacket flexible
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
event |
vector<uint8>:257
|
|
2 |
command |
vector<uint8>:258
|
|
3 |
acl |
vector<uint8>:65539
|
|
4 |
sco |
vector<uint8>:258
|
|
5 |
iso |
vector<uint8>:16387
|
VendorCommand flexible
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
set_acl_priority |
VendorSetAclPriorityParams
|
Vendor_EncodeCommand_Result strict
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Vendor_EncodeCommand_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Vendor_GetFeatures_Result strict
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
VendorFeatures
|
|
3 |
framework_err |
internal
|
Vendor_OpenHciTransport_Result strict resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Vendor_OpenHciTransport_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Vendor_OpenHci_Result strict resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Vendor_OpenHci_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Vendor_OpenSnoop_Result strict resource
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Vendor_OpenSnoop_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
VirtualController_CreateEmulator_Result strict
Defined in fuchsia.hardware.bluetooth/virtual.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
VirtualController_CreateEmulator_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| ACL_PACKET_MAX |
65539
|
uint64 |
|
| BT_VENDOR_MAX_COMMAND_BUFFER_LEN |
16
|
uint16 |
The maximum buffer length an encoded command might require. Update when adding new commands that might require a larger buffer. |
| COMMAND_MAX |
258
|
uint64 |
|
| EVENT_MAX |
257
|
uint64 |
|
| ISO_PACKET_MAX |
16387
|
uint64 |
|
| MAX_LEGACY_ADVERTISING_DATA_LENGTH |
31
|
uint8 |
Advertising data MTUs for legacy (4.x) and extended (5.x) advertising PDU types (see Core Specification v5.4, Vol 4, Part E, Sections 7.3.11 & 7.8.54). |
| MAX_LOCAL_NAME_LENGTH |
248
|
uint8 |
The maximum size (in bytes) of a local name assigned using the HCI_Write_Local_Name command (see Core Specification v5.4, Vol 4, Part E, 7.3.11). |
| MAX_NAME_LENGTH |
32
|
uint32 |
|
| MAX_PEER_SERVICES |
32
|
uint8 |
Maximum service records that can be advertised at once. |
| SCO_PACKET_MAX |
258
|
uint64 |
SERVICES
EmulatorService
Defined in fuchsia.hardware.bluetooth/emulator.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.bluetooth/Emulator
|
Channel |
HciService
Defined in fuchsia.hardware.bluetooth/hci.fidl
| Name | Type | Transport |
|---|---|---|
| hci |
fuchsia.hardware.bluetooth/Hci
|
Channel |
| hci_transport |
fuchsia.hardware.bluetooth/HciTransport
|
Channel |
| snoop |
fuchsia.hardware.bluetooth/Snoop
|
Channel |
Service
Defined in fuchsia.hardware.bluetooth/vendor.fidl
| Name | Type | Transport |
|---|---|---|
| vendor |
fuchsia.hardware.bluetooth/Vendor
|
Channel |