blob: 0c093b962669d89827f24263083018001e671471 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.bluetooth.le
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## AdvertisedPeripheral {#AdvertisedPeripheral}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=89)*
<p>Protocol that is valid for the duration of advertising. The caller can close
the protocol to stop advertising. If the system internally stops advertising
for any reason, the protocol will be closed to communicate this to the
client.</p>
### OnConnected {#AdvertisedPeripheral.OnConnected}
<p>Called when a remote LE central connects to this peripheral when
connectable advertising is enabled via
<a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Peripheral.Advertise'>Peripheral.Advertise</a>. When this call is made,
the system has paused advertising, and will not continue until it
receives a response.</p>
<p>The returned <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Connection'>Connection</a> protocol can be used to
interact with the peer. It also represents a peripheral's ownership over
the connection: the client can drop the protocol to request a
disconnection. Similarly, the protocol is closed by the system to
indicate that the connection to the peer has been lost.</p>
<ul>
<li>request <code>peer</code> Information about the central that initiated the
connection.</li>
<li>request <code>connection</code> Represents the connection.</li>
</ul>
<ul>
<li>response An empty response should be sent to acknowledge the
connection and resume advertising (for flow control).</li>
</ul>
#### Request {#AdvertisedPeripheral.OnConnected_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>peer</code></td>
<td>
<code><a class='link' href='#Peer'>Peer</a></code>
</td>
</tr>
<tr>
<td><code>connection</code></td>
<td>
<code><a class='link' href='#Connection'>Connection</a></code>
</td>
</tr>
</table>
#### Response {#AdvertisedPeripheral.OnConnected_Response}
&lt;EMPTY&gt;
## AdvertisingHandle {#AdvertisingHandle}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=83)*
<p>Capability that is valid for the duration of advertising. The caller can close the handle to
stop advertising. If the system internally stops advertising for any reason, the handle will be
closed to communicate this to the client.</p>
## Central {#Central}
*Defined in [fuchsia.bluetooth.le/central.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/central.fidl;l=93)*
### Connect {#Central.Connect}
<p>Connect to the peer with the given identifier.</p>
<p>The requested <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Connection'>Connection</a> represents the
client's interest on the LE connection to the peer. Closing the channel
removes interest, but may not result in disconnection if another client
holds a valid <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Connection'>Connection</a> to the same peer.</p>
<p>The <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Connection'>Connection</a> <code>handle</code> will be closed by the
system if the connection to the peer is lost or an error occurs.</p>
<p>The following epitaphs may be sent by the server on error:
+ <code>INVALID_ARGS</code>: Some of the parameters are invalid.
+ <code>ALREADY_BOUND</code>: A Connection to the peer already exists for this Central. The existing
Connection should be used.
+ <code>NOT_CONNECTED</code>: A connection could not be established.
+ <code>CONNECTION_RESET</code>: The peer disconnected.</p>
<ul>
<li>request <code>id</code> Identifier of the peer to initiate a connection to.</li>
<li>request <code>options</code> Options used to configure the connection.</li>
<li>request <code>handle</code> Handle that remains valid for the duration of this
connection.</li>
</ul>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
#### Request {#Central.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>id</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerId'>PeerId</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr>
<tr>
<td><code>handle</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Connection'>Connection</a>&gt;</code>
</td>
</tr>
</table>
### ConnectPeripheral {#Central.ConnectPeripheral}
<p>Creates a connection to the peripheral device with the given identifier.
Returns the status of the operation in <code>status</code>.</p>
<p>On success, <code>gatt_client</code> will be bound and can be used for GATT client
role procedures. On failure, <code>gatt_client</code> will be closed and <code>status</code> will
indicate an error.</p>
<p><b>DEPRECATED </b>- Use Connect instead</p>
#### Request {#Central.ConnectPeripheral_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
</tr>
<tr>
<td><code>gatt_client</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.bluetooth.gatt/'>fuchsia.bluetooth.gatt</a>/<a class='link' href='../fuchsia.bluetooth.gatt/#Client'>Client</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Central.ConnectPeripheral_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>status</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code>
</td>
</tr>
</table>
### DisconnectPeripheral {#Central.DisconnectPeripheral}
<p>Disconnects this Central's connection to the peripheral with the given identifier.</p>
<p><b>DEPRECATED </b></p>
#### Request {#Central.DisconnectPeripheral_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code>
</td>
</tr>
</table>
#### Response {#Central.DisconnectPeripheral_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>status</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code>
</td>
</tr>
</table>
### GetPeripheral {#Central.GetPeripheral}
<p><strong>This method is not implemented by the Fuchsia core stack- TODO(fxbug.dev/1424)</strong></p>
<p>Returns information about a single peripheral that is known to the system from previous scan,
connection, and/or bonding procedures based on its unique identifier. Returns null if
<code>identifier</code> is not recognized.</p>
<p><b>DEPRECATED </b></p>
#### Request {#Central.GetPeripheral_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code>
</td>
</tr>
</table>
#### Response {#Central.GetPeripheral_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>peripheral</code></td>
<td>
<code><a class='link' href='#RemoteDevice'>RemoteDevice</a>?</code>
</td>
</tr>
</table>
### GetPeripherals {#Central.GetPeripherals}
<p>Returns the list of peripherals that are known to the system from previous scan, connection,
and/or bonding procedures. The results can be filtered based on service UUIDs that are known to
be present on the peripheral.</p>
<p>This method only returns peripherals (i.e. connectable devices).</p>
<p><b>DEPRECATED </b></p>
#### Request {#Central.GetPeripherals_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>service_uuids</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
</tr>
</table>
#### Response {#Central.GetPeripherals_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>peripherals</code></td>
<td>
<code>vector&lt;<a class='link' href='#RemoteDevice'>RemoteDevice</a>&gt;</code>
</td>
</tr>
</table>
### OnDeviceDiscovered {#Central.OnDeviceDiscovered}
<p>Called for each peripheral/broadcaster that is discovered during a scan session. <code>rssi</code>
contains the received signal strength of the advertising packet that generated this event, if
available.</p>
<p><b>DEPRECATED </b></p>
#### Response {#Central.OnDeviceDiscovered_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>device</code></td>
<td>
<code><a class='link' href='#RemoteDevice'>RemoteDevice</a></code>
</td>
</tr>
</table>
### OnPeripheralDisconnected {#Central.OnPeripheralDisconnected}
<p>Called when this Central's connection to a peripheral with the given identifier is terminated.</p>
<p><b>DEPRECATED </b></p>
#### Response {#Central.OnPeripheralDisconnected_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code>
</td>
</tr>
</table>
### OnScanStateChanged {#Central.OnScanStateChanged}
<p>Called when the scan state changes, e.g. when a scan session terminates due to a call to
Central.StopScan() or another unexpected condition.</p>
<p><b>DEPRECATED </b></p>
#### Response {#Central.OnScanStateChanged_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>scanning</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### Scan {#Central.Scan}
<p>Scans for nearby LE peripherals and broadcasters. If the scan cannot be
initiated, then <code>result_watcher</code> will be closed with an epitaph.</p>
<p>A Central client is allowed to have only one active scan at a time.
Accordingly, only one Scan request can be outstanding at a time.
Additional calls to Scan will fail.</p>
<p>The lifetime of the scan session is tied to the <code>result_watcher</code>
protocol provided. The scan will be stopped if the channel is closed.</p>
<p>Once a scan is started, the <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#ScanResultWatcher'>ScanResultWatcher</a>
can be used to watch for scan results.</p>
<ul>
<li>request <code>options</code> Options used to configure the scan session.</li>
<li>request <code>result_watcher</code> Protocol that remains valid for the duration
of this scan session.</li>
</ul>
<ul>
<li>response An empty response will be sent to acknowledge the scan has
stopped.</li>
</ul>
<p>The following epitaphs may be sent by the server on error:</p>
<ul>
<li>error <code>ALREADY_EXISTS</code>: A scan is already in progress. Each <code>Central</code>
protocol is only allowed 1 active scan.</li>
<li>error <code>INVALID_ARGS</code>: Some of the scan <code>options</code> are invalid. See the
<code>ScanOptions</code> documentation.</li>
<li>error <code>INTERNAL</code>: An internal error occurred and a scan could not be
started.</li>
</ul>
#### Request {#Central.Scan_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ScanOptions'>ScanOptions</a></code>
</td>
</tr>
<tr>
<td><code>result_watcher</code></td>
<td>
<code>server_end&lt;<a class='link' href='#ScanResultWatcher'>ScanResultWatcher</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Central.Scan_Response}
&lt;EMPTY&gt;
### StartScan {#Central.StartScan}
<p>Initiates a scan session for nearby peripherals and broadcasters. Discovered devices will be
reported via CentralDelegate.OnDeviceDiscovered(). If a scan session is already in progress,
<code>filter</code> will replace the existing session's filter.</p>
<p>If <code>filter</code> is null or empty (i.e. none of its fields has been populated) then the delegate
will be notified for all discoverable devices that are found. This is not recommended; clients
should generally filter results by at least one of <code>filter.service_uuids</code>,
<code>filter.service_data</code>, and/or <code>filter.manufacturer_identifier</code>.</p>
<p><b>DEPRECATED </b>- Use Scan instead</p>
#### Request {#Central.StartScan_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>filter</code></td>
<td>
<code><a class='link' href='#ScanFilter'>ScanFilter</a>?</code>
</td>
</tr>
</table>
#### Response {#Central.StartScan_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>status</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Status'>Status</a></code>
</td>
</tr>
</table>
### StopScan {#Central.StopScan}
<p>Terminate a previously started scan session.</p>
<p><b>DEPRECATED </b></p>
#### Request {#Central.StopScan_Request}
&lt;EMPTY&gt;
## Connection {#Connection}
*Defined in [fuchsia.bluetooth.le/peer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peer.fidl;l=92)*
<p>Protocol that represents the connection to a peer. This can be used to interact with GATT
services and establish L2CAP channels.</p>
<p>This lifetime of this capability is tied to that of the LE connection it represents. Closing the
channel results in a disconnection if no other clients hold a Connection to the same peer.</p>
### RequestGattClient {#Connection.RequestGattClient}
<p>The following epitaphs may be sent by the server on error:
+ <code>ZX_ERR_ALREADY_BOUND</code>: A Client server has already been bound in this Connection
protocol. The existing Client should be used.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
#### Request {#Connection.RequestGattClient_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>client</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.bluetooth.gatt2/'>fuchsia.bluetooth.gatt2</a>/<a class='link' href='../fuchsia.bluetooth.gatt2/#Client'>Client</a>&gt;</code>
</td>
</tr>
</table>
## Peripheral {#Peripheral}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=114)*
### Advertise {#Peripheral.Advertise}
<p>Start advertising continuously as a LE peripheral. If advertising cannot
be initiated then <code>advertised_peripheral</code> will be closed and an error
will be returned.</p>
<p>This method may be called any number of times. To reconfigure an
advertisement, first close the original advertisement and then initiate
a new advertisement after an empty response is returned.</p>
<p>If the client closes its end of the
<a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisedPeripheral'>AdvertisedPeripheral</a> channel,
advertising will be stopped. If the handle is closed before the request
is fulfilled, advertising may be briefly enabled before it is
terminated. AdvertisedPeripheral lifetime is bounded by the lifetime of
the Peripheral protocol, but this may be changed in the future
(fxbug.dev/77644).</p>
<ul>
<li>request <code>parameters</code> Parameters used while configuring the advertising
instance.</li>
<li>request <code>advertised_peripheral</code> Protocol that remains valid for the
duration of this advertising session.</li>
</ul>
<ul>
<li>response An empty response will be sent when the advertisement is
successfully stopped (due to release of the <code>advertised_peripheral</code>
protocol). To prevent overlapping similar advertisements and transient
errors with limited advertising resources, waiting for a response is
recommended before calling <code>Advertise</code> again.</li>
</ul>
<ul>
<li>error If an error occurs, <code>advertised_peripheral</code> will be closed and a
<code>PeripheralError</code> will be returned.</li>
</ul>
#### Request {#Peripheral.Advertise_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>parameters</code></td>
<td>
<code><a class='link' href='#AdvertisingParameters'>AdvertisingParameters</a></code>
</td>
</tr>
<tr>
<td><code>advertised_peripheral</code></td>
<td>
<code><a class='link' href='#AdvertisedPeripheral'>AdvertisedPeripheral</a></code>
</td>
</tr>
</table>
#### Response {#Peripheral.Advertise_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Peripheral_Advertise_Result'>Peripheral_Advertise_Result</a></code>
</td>
</tr>
</table>
### OnPeerConnected {#Peripheral.OnPeerConnected}
<p>Event delivered when a remote LE central initiates a connection to this Peripheral when
connectable advertising is enabled via
<a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Peripheral.StartAdvertising'>Peripheral.StartAdvertising</a>.</p>
<p>The returned <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Connection'>Connection</a> handle can be used to interact with the
peer. It also represents a peripheral's ownership over the connection: the client can drop
the handle to request a disconnection. Similarly, the handle is closed by the system to
indicate that the connection to the peer has been lost.</p>
<ul>
<li>request <code>peer</code> Information about the central that initiated the connection.</li>
<li>request <code>connection</code> Represents the connection.</li>
</ul>
<p><b>DEPRECATED </b></p>
#### Response {#Peripheral.OnPeerConnected_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>peer</code></td>
<td>
<code><a class='link' href='#Peer'>Peer</a></code>
</td>
</tr>
<tr>
<td><code>connection</code></td>
<td>
<code><a class='link' href='#Connection'>Connection</a></code>
</td>
</tr>
</table>
### StartAdvertising {#Peripheral.StartAdvertising}
<p>Start advertising as a LE peripheral. An empty response is sent to indicate when advertising
has successfully initiated. If advertising cannot be initiated, then the response will
contain a <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#PeripheralError'>PeripheralError</a>.</p>
<p>This method can get called any number of times and successive calls can be made to
reconfigure the advertising parameters. However only the most recent
<a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingHandle'>AdvertisingHandle</a> will remain valid.</p>
<p>An instance of <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#Peripheral'>Peripheral</a> can only have one active advertisement at
a time. Clients must obtain multiple Peripheral instances for multiple simultaneous
advertisements.</p>
<p>If the client closes its end of the <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingHandle'>AdvertisingHandle</a> channel,
advertising will be stopped. If the handle is closed before the request is fulfilled,
advertising will be briefly enabled before it is terminated.</p>
<ul>
<li>request <code>parameters</code> Parameters used while configuring the advertising instance.</li>
<li>request <code>handle</code> Handle that remains valid for the duration of this advertising session.</li>
</ul>
<ul>
<li>error Returns a <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#PeripheralError'>PeripheralError</a> if advertising cannot be
initiated. In this case the <code>handle</code> will be closed.</li>
</ul>
<p><b>DEPRECATED </b></p>
#### Request {#Peripheral.StartAdvertising_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>parameters</code></td>
<td>
<code><a class='link' href='#AdvertisingParameters'>AdvertisingParameters</a></code>
</td>
</tr>
<tr>
<td><code>handle</code></td>
<td>
<code>server_end&lt;<a class='link' href='#AdvertisingHandle'>AdvertisingHandle</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Peripheral.StartAdvertising_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Peripheral_StartAdvertising_Result'>Peripheral_StartAdvertising_Result</a></code>
</td>
</tr>
</table>
## ScanResultWatcher {#ScanResultWatcher}
*Defined in [fuchsia.bluetooth.le/central.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/central.fidl;l=77)*
<p>Represents an active scan procedure. This protocol remains valid for the
duration of a scan and can be used to obtain scan results. The client can
close the protocol to stop scanning. If a scan is stopped by the system, the
protocol will be closed with the epitaph <code>CANCELED</code> to communicate this to
the client.</p>
### Watch {#ScanResultWatcher.Watch}
<p>Returns a list of all LE peers that satisfy the filters indicated in
<code>ScanOptions</code>. The first response(s) will return matching discovered
peers immediately. Subsequent calls receive a response only when peers
have been scanned or updated since the last call. If a second call to
<code>Watch</code> is erronously sent while one call is already pending, the scan
will be canceled and the protocol will be closed.</p>
<ul>
<li>response <code>updated</code> Peers that were added or updated since the last
call to Watch().</li>
</ul>
#### Request {#ScanResultWatcher.Watch_Request}
&lt;EMPTY&gt;
#### Response {#ScanResultWatcher.Watch_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>updated</code></td>
<td>
<code>vector&lt;<a class='link' href='#Peer'>Peer</a>&gt;</code>
</td>
</tr>
</table>
## **STRUCTS**
### AdvertisingDataDeprecated {#AdvertisingDataDeprecated data-text="AdvertisingDataDeprecated"}
*Defined in [fuchsia.bluetooth.le/types_deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/types_deprecated.fidl;l=22)*
<p>Represents advertising and scan response data advertised by a broadcaster or peripheral.</p>
<p><b>DEPRECATED </b>- Use AdvertisingData instead</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="AdvertisingDataDeprecated.name">
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#DeviceName'>DeviceName</a></code>
</td>
<td><p>Name of the device.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.tx_power_level">
<td><code>tx_power_level</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Int8'>Int8</a>?</code>
</td>
<td><p>The radio transmission power level reported in the advertisement.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.appearance">
<td><code>appearance</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UInt16'>UInt16</a>?</code>
</td>
<td><p>The appearance reported in the advertisemet.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.service_uuids">
<td><code>service_uuids</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>List of service UUIDs reported in the advertisement.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.service_data">
<td><code>service_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ServiceDataEntry'>ServiceDataEntry</a>&gt;?</code>
</td>
<td><p>Service data included in the advertisement.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.manufacturer_specific_data">
<td><code>manufacturer_specific_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ManufacturerSpecificDataEntry'>ManufacturerSpecificDataEntry</a>&gt;?</code>
</td>
<td><p>Manufacturer specific data entries.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.solicited_service_uuids">
<td><code>solicited_service_uuids</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>Service UUIDs that were solicited in the advertisement. Peripherals can invite centrals that
expose certain services to connect to them using service solicitation.</p>
</td>
<td>No default</td>
</tr>
<tr id="AdvertisingDataDeprecated.uris">
<td><code>uris</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>URIs included in the advertising packet.
These are full URIs (they are encoded/decoded automatically)</p>
</td>
<td>No default</td>
</tr>
</table>
### ManufacturerData {#ManufacturerData data-text="ManufacturerData"}
*Defined in [fuchsia.bluetooth.le/advertising_data.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=30)*
<p>Entry in the <code>manufacturer_data</code> field of a <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingData'>AdvertisingData</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ManufacturerData.company_id">
<td><code>company_id</code></td>
<td>
<code>uint16</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ManufacturerData.data">
<td><code>data</code></td>
<td>
<code>vector&lt;uint8&gt;[252]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### ManufacturerSpecificDataEntry {#ManufacturerSpecificDataEntry data-text="ManufacturerSpecificDataEntry"}
*Defined in [fuchsia.bluetooth.le/types_deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/types_deprecated.fidl;l=15)*
<p><b>DEPRECATED </b>- Use ManufacturerData instead</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ManufacturerSpecificDataEntry.company_id">
<td><code>company_id</code></td>
<td>
<code>uint16</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ManufacturerSpecificDataEntry.data">
<td><code>data</code></td>
<td>
<code>vector&lt;uint8&gt;</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Peripheral_Advertise_Response {#Peripheral_Advertise_Response data-text="Peripheral_Advertise_Response"}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=145)*
&lt;EMPTY&gt;
### Peripheral_StartAdvertising_Response {#Peripheral_StartAdvertising_Response data-text="Peripheral_StartAdvertising_Response"}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=171)*
&lt;EMPTY&gt;
### RemoteDevice {#RemoteDevice data-text="RemoteDevice"}
*Defined in [fuchsia.bluetooth.le/types_deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/types_deprecated.fidl;l=53)*
<p>Represents a remote Bluetooth Low Energy device. A RemoteDevice can represent a central,
broadcaster, or peripheral based on the API from which it was received.</p>
<p><b>DEPRECATED </b>- Use Peer instead</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RemoteDevice.identifier">
<td><code>identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerIdString'>PeerIdString</a></code>
</td>
<td><p>Identifier that uniquely identifies this device on the current system.</p>
</td>
<td>No default</td>
</tr>
<tr id="RemoteDevice.connectable">
<td><code>connectable</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether or not this device is connectable. Non-connectable devices are typically acting in the
LE broadcaster role.</p>
</td>
<td>No default</td>
</tr>
<tr id="RemoteDevice.rssi">
<td><code>rssi</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Int8'>Int8</a>?</code>
</td>
<td><p>The last known RSSI of this device, if known.</p>
</td>
<td>No default</td>
</tr>
<tr id="RemoteDevice.advertising_data">
<td><code>advertising_data</code></td>
<td>
<code><a class='link' href='#AdvertisingDataDeprecated'>AdvertisingDataDeprecated</a>?</code>
</td>
<td><p>Advertising data broadcast by this device if this device is a broadcaster or peripheral.</p>
</td>
<td>No default</td>
</tr>
</table>
### ScanFilter {#ScanFilter data-text="ScanFilter"}
*Defined in [fuchsia.bluetooth.le/types_deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/types_deprecated.fidl;l=72)*
<p>Filter parameters for use during a scan. A discovered peripheral or broadcaster will be reported
to applications only if it satisfies all of the provided filter parameters. Null fields will be
ignored.</p>
<p><b>DEPRECATED </b>- Use Filter instead</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ScanFilter.service_uuids">
<td><code>service_uuids</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>Filter based on advertised service UUIDs. A peripheral that advertises at least one of the
entries in <code>service_uuids</code> will satisfy this filter.</p>
</td>
<td>No default</td>
</tr>
<tr id="ScanFilter.service_data_uuids">
<td><code>service_data_uuids</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>Filter based on service data containing one of the given UUIDs.</p>
</td>
<td>No default</td>
</tr>
<tr id="ScanFilter.manufacturer_identifier">
<td><code>manufacturer_identifier</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UInt16'>UInt16</a>?</code>
</td>
<td><p>Filter based on a company identifier present in the manufacturer data. If this filter parameter
is set, then the advertising payload must contain manufacturer specific data with the provided
company identifier to satisfy this filter.</p>
</td>
<td>No default</td>
</tr>
<tr id="ScanFilter.connectable">
<td><code>connectable</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Bool'>Bool</a>?</code>
</td>
<td><p>Filter based on whether or not a device is connectable. For example, a client that is only
interested in peripherals that it can connect to can set this to true. Similarly a client can
scan only for braodcasters by setting this to false.</p>
</td>
<td>No default</td>
</tr>
<tr id="ScanFilter.name_substring">
<td><code>name_substring</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#DeviceName'>DeviceName</a></code>
</td>
<td><p>Filter results based on a portion of the advertised device name.</p>
</td>
<td>No default</td>
</tr>
<tr id="ScanFilter.max_path_loss">
<td><code>max_path_loss</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Int8'>Int8</a>?</code>
</td>
<td><p>Filter results based on the path loss of the radio wave. A device that matches this filter must
satisfy the following:</p>
<ol>
<li>Radio transmission power level and received signal strength must be available for the path
loss calculation;</li>
<li>The calculated path loss value must be less than, or equal to, <code>max_path_loss</code>.</li>
</ol>
</td>
<td>No default</td>
</tr>
</table>
### ServiceData {#ServiceData data-text="ServiceData"}
*Defined in [fuchsia.bluetooth.le/advertising_data.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=24)*
<p>Entry in the <code>service_data</code> field of a <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingData'>AdvertisingData</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ServiceData.uuid">
<td><code>uuid</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ServiceData.data">
<td><code>data</code></td>
<td>
<code>vector&lt;uint8&gt;[252]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### ServiceDataEntry {#ServiceDataEntry data-text="ServiceDataEntry"}
*Defined in [fuchsia.bluetooth.le/types_deprecated.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/types_deprecated.fidl;l=9)*
<p><b>DEPRECATED </b>- Use ServiceData instead</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ServiceDataEntry.uuid">
<td><code>uuid</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#UuidString'>UuidString</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ServiceDataEntry.data">
<td><code>data</code></td>
<td>
<code>vector&lt;uint8&gt;</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### AdvertisingModeHint [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#AdvertisingModeHint data-text="AdvertisingModeHint"}
Type: <code>uint8</code>
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=34)*
<p>A client can indicate the transmission rate of advertising packets by specifying a mode. The
mode provides a hint to the system when configuring the controller with advertising interval and
window parameters.</p>
<p>The mode affects how quickly a scanner or central is able to discover the peripheral; however it
can have an adverse effect on power consumption. While the system will try to honor a client's
request, it is not guaranteed to do so.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="AdvertisingModeHint.VERY_FAST">
<td><h3 id="AdvertisingModeHint.VERY_FAST" class="add-link hide-from-toc">VERY_FAST</h3></td>
<td><code>1</code></td>
<td><p>Advertise with a very short interval and window for fast discovery at the cost of higher
power consumption. This corresponds to a 30-60ms interval on the 1M PHYs and 90-180ms on the
coded PHY.</p>
</td>
</tr>
<tr id="AdvertisingModeHint.FAST">
<td><h3 id="AdvertisingModeHint.FAST" class="add-link hide-from-toc">FAST</h3></td>
<td><code>2</code></td>
<td><p>Advertise with a short interval and window that uses less power than <code>VERY_FAST</code>.
This corresponds to a 100-150ms interval on the 1M PHYs and 300-450ms on the coded PHY.</p>
</td>
</tr>
<tr id="AdvertisingModeHint.SLOW">
<td><h3 id="AdvertisingModeHint.SLOW" class="add-link hide-from-toc">SLOW</h3></td>
<td><code>3</code></td>
<td><p>Advertise with a moderate interval and window. This corresponds to 1-1.2s on the 1M PHYs and 3s
on the coded PHY.</p>
</td>
</tr>
</table>
### CentralError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#CentralError data-text="CentralError"}
Type: <code>uint32</code>
*Defined in [fuchsia.bluetooth.le/central.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/central.fidl;l=9)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="CentralError.ABORTED">
<td><h3 id="CentralError.ABORTED" class="add-link hide-from-toc">ABORTED</h3></td>
<td><code>1</code></td>
<td><p>The request was aborted.</p>
</td>
</tr>
<tr id="CentralError.IN_PROGRESS">
<td><h3 id="CentralError.IN_PROGRESS" class="add-link hide-from-toc">IN_PROGRESS</h3></td>
<td><code>2</code></td>
<td><p>The request is already in progress.</p>
</td>
</tr>
<tr id="CentralError.INVALID_PARAMETERS">
<td><h3 id="CentralError.INVALID_PARAMETERS" class="add-link hide-from-toc">INVALID_PARAMETERS</h3></td>
<td><code>3</code></td>
<td><p>The provided parameters are invalid.</p>
</td>
</tr>
<tr id="CentralError.FAILED">
<td><h3 id="CentralError.FAILED" class="add-link hide-from-toc">FAILED</h3></td>
<td><code>4</code></td>
<td><p>Advertising could not be initiated due to a hardware or system error.</p>
</td>
</tr>
</table>
### PeripheralError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PeripheralError data-text="PeripheralError"}
Type: <code>uint32</code>
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=6)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PeripheralError.NOT_SUPPORTED">
<td><h3 id="PeripheralError.NOT_SUPPORTED" class="add-link hide-from-toc">NOT_SUPPORTED</h3></td>
<td><code>1</code></td>
<td><p>The operation or parameters requested are not supported on the current hardware.</p>
</td>
</tr>
<tr id="PeripheralError.ADVERTISING_DATA_TOO_LONG">
<td><h3 id="PeripheralError.ADVERTISING_DATA_TOO_LONG" class="add-link hide-from-toc">ADVERTISING_DATA_TOO_LONG</h3></td>
<td><code>2</code></td>
<td><p>The provided advertising data exceeds the maximum allowed length when encoded.</p>
</td>
</tr>
<tr id="PeripheralError.SCAN_RESPONSE_DATA_TOO_LONG">
<td><h3 id="PeripheralError.SCAN_RESPONSE_DATA_TOO_LONG" class="add-link hide-from-toc">SCAN_RESPONSE_DATA_TOO_LONG</h3></td>
<td><code>3</code></td>
<td><p>The provided scan response data exceeds the maximum allowed length when encoded.</p>
</td>
</tr>
<tr id="PeripheralError.INVALID_PARAMETERS">
<td><h3 id="PeripheralError.INVALID_PARAMETERS" class="add-link hide-from-toc">INVALID_PARAMETERS</h3></td>
<td><code>4</code></td>
<td><p>The requested parameters are invalid.</p>
</td>
</tr>
<tr id="PeripheralError.ABORTED">
<td><h3 id="PeripheralError.ABORTED" class="add-link hide-from-toc">ABORTED</h3></td>
<td><code>5</code></td>
<td><p>The request to start advertising was aborted, for example by issuing a new request with new
parameters.</p>
</td>
</tr>
<tr id="PeripheralError.FAILED">
<td><h3 id="PeripheralError.FAILED" class="add-link hide-from-toc">FAILED</h3></td>
<td><code>6</code></td>
<td><p>Advertising could not be initiated due to a hardware or system error.</p>
</td>
</tr>
</table>
## **TABLES**
### AdvertisingData {#AdvertisingData data-text="AdvertisingData"}
*Defined in [fuchsia.bluetooth.le/advertising_data.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=37)*
<p>Represents advertising and scan response data that are transmitted by a LE peripheral or
broadcaster.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="AdvertisingData.name">
<td><h3 id="AdvertisingData.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#DeviceName'>DeviceName</a></code>
</td>
<td><p>Long or short name of the device.</p>
</td>
</tr>
<tr id="AdvertisingData.appearance">
<td><h3 id="AdvertisingData.appearance" class="add-link hide-from-toc">2</h3></td>
<td><code>appearance</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Appearance'>Appearance</a></code>
</td>
<td><p>The appearance of the device.</p>
</td>
</tr>
<tr id="AdvertisingData.tx_power_level">
<td><h3 id="AdvertisingData.tx_power_level" class="add-link hide-from-toc">3</h3></td>
<td><code>tx_power_level</code></td>
<td>
<code>int8</code>
</td>
<td><p><b>DEPRECATED </b>- Use include_tx_power_level instead. This value will be ignored.</p></td>
</tr>
<tr id="AdvertisingData.service_uuids">
<td><h3 id="AdvertisingData.service_uuids" class="add-link hide-from-toc">4</h3></td>
<td><code>service_uuids</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a>&gt;</code>
</td>
<td><p>Service UUIDs.</p>
</td>
</tr>
<tr id="AdvertisingData.service_data">
<td><h3 id="AdvertisingData.service_data" class="add-link hide-from-toc">5</h3></td>
<td><code>service_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ServiceData'>ServiceData</a>&gt;</code>
</td>
<td><p>Service data entries.</p>
</td>
</tr>
<tr id="AdvertisingData.manufacturer_data">
<td><h3 id="AdvertisingData.manufacturer_data" class="add-link hide-from-toc">6</h3></td>
<td><code>manufacturer_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ManufacturerData'>ManufacturerData</a>&gt;</code>
</td>
<td><p>Manufacturer-specific data entries.</p>
</td>
</tr>
<tr id="AdvertisingData.uris">
<td><h3 id="AdvertisingData.uris" class="add-link hide-from-toc">7</h3></td>
<td><code>uris</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
<td><p>String representing a URI to be advertised, as defined in <a href="https://tools.ietf.org/html/std66">IETF STD 66</a>.
Each entry should be a UTF-8 string including the scheme. For more information, see:</p>
<ul>
<li>https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml for allowed schemes;</li>
<li>https://www.bluetooth.com/specifications/assigned-numbers/uri-scheme-name-string-mapping
for code-points used by the system to compress the scheme to save space in the payload.</li>
</ul>
</td>
</tr>
<tr id="AdvertisingData.include_tx_power_level">
<td><h3 id="AdvertisingData.include_tx_power_level" class="add-link hide-from-toc">8</h3></td>
<td><code>include_tx_power_level</code></td>
<td>
<code>bool</code>
</td>
<td><p>Indicates whether the current TX power level should be included in the advertising data.</p>
</td>
</tr>
</table>
### AdvertisingParameters {#AdvertisingParameters data-text="AdvertisingParameters"}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=50)*
<p>Represents the parameters for configuring advertisements.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="AdvertisingParameters.data">
<td><h3 id="AdvertisingParameters.data" class="add-link hide-from-toc">1</h3></td>
<td><code>data</code></td>
<td>
<code><a class='link' href='#AdvertisingData'>AdvertisingData</a></code>
</td>
<td><p>The fields that will be encoded in the data section of advertising packets.</p>
<p>This field is required.</p>
</td>
</tr>
<tr id="AdvertisingParameters.scan_response">
<td><h3 id="AdvertisingParameters.scan_response" class="add-link hide-from-toc">2</h3></td>
<td><code>scan_response</code></td>
<td>
<code><a class='link' href='#AdvertisingData'>AdvertisingData</a></code>
</td>
<td><p>The fields that are to be sent in a scan response packet. Clients may use this to send
additional data that does not fit inside an advertising packet on platforms that do not
support the advertising data length extensions.</p>
<p>If present advertisements will be configured to be scannable.</p>
</td>
</tr>
<tr id="AdvertisingParameters.mode_hint">
<td><h3 id="AdvertisingParameters.mode_hint" class="add-link hide-from-toc">3</h3></td>
<td><code>mode_hint</code></td>
<td>
<code><a class='link' href='#AdvertisingModeHint'>AdvertisingModeHint</a></code>
</td>
<td><p>The desired advertising frequency. See <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingModeHint'>AdvertisingModeHint</a>.
Defaults to <a class='link' href='../fuchsia.bluetooth.le/'>fuchsia.bluetooth.le</a>/<a class='link' href='../fuchsia.bluetooth.le/#AdvertisingModeHint.SLOW'>AdvertisingModeHint.SLOW</a> if not present.</p>
</td>
</tr>
<tr id="AdvertisingParameters.connectable">
<td><h3 id="AdvertisingParameters.connectable" class="add-link hide-from-toc">4</h3></td>
<td><code>connectable</code></td>
<td>
<code>bool</code>
</td>
<td><p>If present and true then the controller will broadcast connectable advertisements which
allows remote LE centrals to initiate a connection to the Peripheral. If false or otherwise
not present then the advertisements will be non-connectable.</p>
<p><b>DEPRECATED </b>- Prefer to use the connection_options field for new code.</p></td>
</tr>
<tr id="AdvertisingParameters.connection_options">
<td><h3 id="AdvertisingParameters.connection_options" class="add-link hide-from-toc">5</h3></td>
<td><code>connection_options</code></td>
<td>
<code><a class='link' href='#ConnectionOptions'>ConnectionOptions</a></code>
</td>
<td><p>If present, the controller will broadcast connectable advertisements
which allow peers to initiate connections to the Peripheral. The fields
of <code>ConnectionOptions</code> will configure any connections set up from
advertising.</p>
</td>
</tr>
</table>
### ConnectionOptions {#ConnectionOptions data-text="ConnectionOptions"}
*Defined in [fuchsia.bluetooth.le/connection_options.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/connection_options.fidl;l=10)*
<p>Represents parameters that are set on a per-connection basis by FIDL protocols that create
Low Energy connections.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ConnectionOptions.bondable_mode">
<td><h3 id="ConnectionOptions.bondable_mode" class="add-link hide-from-toc">1</h3></td>
<td><code>bondable_mode</code></td>
<td>
<code>bool</code>
</td>
<td><p>When true, the connection operates in bondable mode. This means pairing will form a bond,
or persist across disconnections, if the peer is also in bondable mode. When not present,
the connection defaults to bondable mode. When false, the connection operates in non-
bondable mode, which means the local device only allows pairing that does not form a bond.</p>
</td>
</tr>
<tr id="ConnectionOptions.service_filter">
<td><h3 id="ConnectionOptions.service_filter" class="add-link hide-from-toc">2</h3></td>
<td><code>service_filter</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code>
</td>
<td><p>When present, service discovery performed following the connection is restricted to primary
services that match this field. Otherwise, by default all available services are discovered.</p>
</td>
</tr>
</table>
### Filter {#Filter data-text="Filter"}
*Defined in [fuchsia.bluetooth.le/central.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/central.fidl;l=25)*
<p>Filter parameters for use during a scan. A discovered peer only matches the
filter if it satisfies all of the present filter parameters.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Filter.service_uuid">
<td><h3 id="Filter.service_uuid" class="add-link hide-from-toc">1</h3></td>
<td><code>service_uuid</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code>
</td>
<td><p>Filter based on advertised service UUID.</p>
</td>
</tr>
<tr id="Filter.service_data_uuid">
<td><h3 id="Filter.service_data_uuid" class="add-link hide-from-toc">2</h3></td>
<td><code>service_data_uuid</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a></code>
</td>
<td><p>Filter based on service data containing the given UUID.</p>
</td>
</tr>
<tr id="Filter.manufacturer_id">
<td><h3 id="Filter.manufacturer_id" class="add-link hide-from-toc">3</h3></td>
<td><code>manufacturer_id</code></td>
<td>
<code>uint16</code>
</td>
<td><p>Filter based on a manufacturer identifier present in the manufacturer
data. If this filter parameter is set, then the advertising payload must
contain manufacturer specific data with the provided company identifier
to satisfy this filter. Manufacturer identifiers can be found at
https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/</p>
</td>
</tr>
<tr id="Filter.connectable">
<td><h3 id="Filter.connectable" class="add-link hide-from-toc">4</h3></td>
<td><code>connectable</code></td>
<td>
<code>bool</code>
</td>
<td><p>Filter based on whether or not a device is connectable. For example, a
client that is only interested in peripherals that it can connect to can
set this to true. Similarly a client can scan only for broadcasters by
setting this to false.</p>
</td>
</tr>
<tr id="Filter.name">
<td><h3 id="Filter.name" class="add-link hide-from-toc">5</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#DeviceName'>DeviceName</a></code>
</td>
<td><p>Filter results based on a portion of the advertised device name.
Substring matches are allowed.</p>
</td>
</tr>
<tr id="Filter.max_path_loss">
<td><h3 id="Filter.max_path_loss" class="add-link hide-from-toc">6</h3></td>
<td><code>max_path_loss</code></td>
<td>
<code>int8</code>
</td>
<td><p>Filter results based on the path loss of the radio wave. A device that
matches this filter must satisfy the following:</p>
<ol>
<li>Radio transmission power level and received signal strength must be
available for the path loss calculation;</li>
<li>The calculated path loss value must be less than, or equal to,
<code>max_path_loss</code>.</li>
</ol>
<p>NOTE: This field is calculated using the RSSI and TX Power information
obtained from advertising and scan response data during a scan procedure.
It should NOT be confused with information for an active connection
obtained using the &quot;Path Loss Reporting&quot; feature.</p>
</td>
</tr>
</table>
### Peer {#Peer data-text="Peer"}
*Defined in [fuchsia.bluetooth.le/peer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peer.fidl;l=43)*
<p>Represents a Bluetooth Low Energy peer that may act in the broadcaster, peripheral, or central
role. The peer's role depends on whether it is obtained from the Central or Peripheral protocol.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Peer.id">
<td><h3 id="Peer.id" class="add-link hide-from-toc">1</h3></td>
<td><code>id</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#PeerId'>PeerId</a></code>
</td>
<td><p>Uniquely identifies this peer on the current system.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="Peer.connectable">
<td><h3 id="Peer.connectable" class="add-link hide-from-toc">2</h3></td>
<td><code>connectable</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether or not this peer is connectable. Non-connectable peers are typically in the LE
broadcaster role.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="Peer.rssi">
<td><h3 id="Peer.rssi" class="add-link hide-from-toc">3</h3></td>
<td><code>rssi</code></td>
<td>
<code>int8</code>
</td>
<td><p>The last observed signal strength of this peer. This field is only present for a peer that
is broadcasting. The RSSI can be stale if the peer has not been advertising.</p>
<p>NOTE: This field should NOT be confused with the &quot;connection RSSI&quot; of a peer that is currently
connected to the system.</p>
</td>
</tr>
<tr id="Peer.advertising_data">
<td><h3 id="Peer.advertising_data" class="add-link hide-from-toc">4</h3></td>
<td><code>advertising_data</code></td>
<td>
<code><a class='link' href='#AdvertisingData'>AdvertisingData</a></code>
</td>
<td><p><b>DEPRECATED </b>- Use &#x60;data&#x60; instead</p></td>
</tr>
<tr id="Peer.name">
<td><h3 id="Peer.name" class="add-link hide-from-toc">5</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#DeviceName'>DeviceName</a></code>
</td>
<td><p>The name of this peer. The name is often obtained during a scan procedure and can get
updated during the name discovery procedure following a connection.</p>
<p>This field is present if the name is known.</p>
</td>
</tr>
<tr id="Peer.data">
<td><h3 id="Peer.data" class="add-link hide-from-toc">6</h3></td>
<td><code>data</code></td>
<td>
<code><a class='link' href='#ScanData'>ScanData</a></code>
</td>
<td><p>Information from advertising and scan response data broadcast by this peer. When present,
this contains the advertising data last received from the peer.</p>
</td>
</tr>
<tr id="Peer.bonded">
<td><h3 id="Peer.bonded" class="add-link hide-from-toc">7</h3></td>
<td><code>bonded</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether or not this peer is bonded.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="Peer.last_updated">
<td><h3 id="Peer.last_updated" class="add-link hide-from-toc">8</h3></td>
<td><code>last_updated</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
<td><p>The value of the system monotonic clock, measured at the time this peer
was last updated (e.g. due to reception of an advertisement).</p>
<p>This field is always present.</p>
</td>
</tr>
</table>
### ScanData {#ScanData data-text="ScanData"}
*Defined in [fuchsia.bluetooth.le/peer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peer.fidl;l=11)*
<p>Information obtained from advertising and scan response data broadcast by a peer.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ScanData.tx_power">
<td><h3 id="ScanData.tx_power" class="add-link hide-from-toc">1</h3></td>
<td><code>tx_power</code></td>
<td>
<code>int8</code>
</td>
<td><p>The radio transmit power level reported by an advertising and/or scannable peer.</p>
<p>NOTE: This field should NOT be confused with the &quot;connection TX Power Level&quot; of a peer that
is currently connected to the system obtained via the &quot;Transmit Power reporting&quot; feature.</p>
</td>
</tr>
<tr id="ScanData.appearance">
<td><h3 id="ScanData.appearance" class="add-link hide-from-toc">2</h3></td>
<td><code>appearance</code></td>
<td>
<code><a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Appearance'>Appearance</a></code>
</td>
<td><p>The appearance of the device.</p>
</td>
</tr>
<tr id="ScanData.service_uuids">
<td><h3 id="ScanData.service_uuids" class="add-link hide-from-toc">3</h3></td>
<td><code>service_uuids</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.bluetooth/'>fuchsia.bluetooth</a>/<a class='link' href='../fuchsia.bluetooth/#Uuid'>Uuid</a>&gt;</code>
</td>
<td><p>Service UUIDs.</p>
</td>
</tr>
<tr id="ScanData.service_data">
<td><h3 id="ScanData.service_data" class="add-link hide-from-toc">4</h3></td>
<td><code>service_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ServiceData'>ServiceData</a>&gt;</code>
</td>
<td><p>Service data entries.</p>
</td>
</tr>
<tr id="ScanData.manufacturer_data">
<td><h3 id="ScanData.manufacturer_data" class="add-link hide-from-toc">5</h3></td>
<td><code>manufacturer_data</code></td>
<td>
<code>vector&lt;<a class='link' href='#ManufacturerData'>ManufacturerData</a>&gt;</code>
</td>
<td><p>Manufacturer-specific data entries.</p>
</td>
</tr>
<tr id="ScanData.uris">
<td><h3 id="ScanData.uris" class="add-link hide-from-toc">6</h3></td>
<td><code>uris</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
<td><p>String representing a URI to be advertised, as defined in <a href="https://tools.ietf.org/html/std66">IETF STD 66</a>.
Each entry should be a UTF-8 string including the scheme. For more information, see
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml for allowed schemes;
NOTE: Bluetooth advertising compresses schemas over the air to save space. See
https://www.bluetooth.com/specifications/assigned-numbers/uri-scheme-name-string-mapping.</p>
</td>
</tr>
<tr id="ScanData.timestamp">
<td><h3 id="ScanData.timestamp" class="add-link hide-from-toc">7</h3></td>
<td><code>timestamp</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
<td><p>The monotonic time when this scan data was received.</p>
</td>
</tr>
</table>
### ScanOptions {#ScanOptions data-text="ScanOptions"}
*Defined in [fuchsia.bluetooth.le/central.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/central.fidl;l=64)*
<p>Parameters used during a scan.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ScanOptions.filters">
<td><h3 id="ScanOptions.filters" class="add-link hide-from-toc">1</h3></td>
<td><code>filters</code></td>
<td>
<code>vector&lt;<a class='link' href='#Filter'>Filter</a>&gt;</code>
</td>
<td><p>List of filters for use during a scan. A peripheral that satisfies any
of these filters will be reported. At least 1 filter must be specified.
While not recommended, clients that require that all peripherals be
reported can specify an empty filter.</p>
</td>
</tr>
</table>
## **UNIONS**
### Peripheral_Advertise_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Peripheral_Advertise_Result data-text="Peripheral_Advertise_Result"}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=145)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Peripheral_Advertise_Result.response">
<td><h3 id="Peripheral_Advertise_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Peripheral_Advertise_Response'>Peripheral_Advertise_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Peripheral_Advertise_Result.err">
<td><h3 id="Peripheral_Advertise_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#PeripheralError'>PeripheralError</a></code>
</td>
<td></td>
</tr>
</table>
### Peripheral_StartAdvertising_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Peripheral_StartAdvertising_Result data-text="Peripheral_StartAdvertising_Result"}
*Defined in [fuchsia.bluetooth.le/peripheral.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/peripheral.fidl;l=171)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Peripheral_StartAdvertising_Result.response">
<td><h3 id="Peripheral_StartAdvertising_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Peripheral_StartAdvertising_Response'>Peripheral_StartAdvertising_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Peripheral_StartAdvertising_Result.err">
<td><h3 id="Peripheral_StartAdvertising_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#PeripheralError'>PeripheralError</a></code>
</td>
<td></td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_MANUFACTURER_DATA_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=14">MAX_MANUFACTURER_DATA_LENGTH</a></td>
<td>
<code>252</code>
</td>
<td><code>uint8</code></td>
<td></td>
</tr>
<tr id="MAX_SERVICE_DATA_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=10">MAX_SERVICE_DATA_LENGTH</a></td>
<td>
<code>252</code>
</td>
<td><code>uint8</code></td>
<td></td>
</tr>
<tr id="MAX_URI_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.le/advertising_data.fidl;l=21">MAX_URI_LENGTH</a></td>
<td>
<code>278</code>
</td>
<td><code>uint16</code></td>
<td></td>
</tr>
</table>