Project: /_project.yaml Book: /_book.yaml
Defined in fuchsia.bluetooth.le/central.fidl
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.
This method only returns peripherals (i.e. connectable devices).
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 identifier
is not recognized.
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, filter
will replace the existing session's filter.
If filter
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 filter.service_uuids
, filter.service_data
, and/or filter.manufacturer_identifier
.
Terminate a previously started scan session.
Creates a connection to the peripheral device with the given identifier. Returns the status of the operation in status
.
On success, gatt_client
will be bound and can be used for GATT client role procedures. On failure, gatt_client
will be closed and status
will indicate an error.
Disconnects this Central's connection to the peripheral with the given identifier.
Called when the scan state changes, e.g. when a scan session terminates due to a call to Central.StopScan() or another unexpected condition.
Called for each peripheral/broadcaster that is discovered during a scan session. rssi
contains the received signal strength of the advertising packet that generated this event, if available.
Called when this Central's connection to a peripheral with the given identifier is terminated.
Defined in fuchsia.bluetooth.le/peer.fidl
Protocol that represents the connection to a peer. This can be used to interact with GATT services and establish L2CAP channels.
Defined in fuchsia.bluetooth.le/peripheral.fidl
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.
Defined in fuchsia.bluetooth.le/peripheral.fidl
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 PeripheralError.
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 AdvertisingHandle will remain valid.
An instance of Peripheral can only have one active advertisement at a time. Clients must obtain multiple Peripheral instances for multiple simultaneous advertisements.
If the client closes its end of the AdvertisingHandle channel, advertising will be stopped. If the handle is closed before the request is fulfilled, advertising will be briefly enabled before it is terminated.
parameters
Parameters used while configuring the advertising instance.handle
Handle that remains valid for the duration of this advertising session.handle
will be closed.Event delivered when a remote LE central initiates a connection to this Peripheral when connectable advertising is enabled via Peripheral.StartAdvertising.
The returned Connection 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.
peer
Information about the central that initiated the connection.handle
Represents the connection.[[DEPRECATED]]
Starts sending advertisements based on the given parameters. - advertising_data
: The advertising data that should be included in the payload. - scan_result
: The scan result that will be returned when the advertisement is scanned. Setting this will mark the advertisement set as scannable. - connectable
: when true, this advertisement will be marked as connectable. NOTE: connections can be made to a GATT server even if this is not set. - interval_ms
: The requested interval to advertise this set at in milliseconds. minimum 20, maximum 10,000,000 (almost 3 hours). A reasonable default is 1 second (1000). - anonymous
: if true, the address of this device will not be included
If the tx_power_level
is set in either AdvertisingData, it will be replaced with the actual TX Power level reported by the adapter, or included in the extended header of the Advertising PDU to save advertising space.
If scan_result
and advertising_data
are both set, legacy advertising will be used, which limits the size of the advertising data.
This request will fail if: - The service_uuids
field of advertising_data
contains a UUID that does not match a GATT service that was previously registered by this application; - If the provided advertising data cannot fit within the advertising payload MTU that is supported on the current platform and parameters. - If anonymous
advertising is requested but the controller cannot support it.
[[DEPRECATED]]
Stop an advertising session that was previously started by this application.
[[DEPRECATED]]
Called when a remote central device has connected to a connectable advertisement.
[[DEPRECATED]]
Called when a remote central previously connected to this application is disconnected.
Defined in fuchsia.bluetooth.le/central.fidl
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.
This method only returns peripherals (i.e. connectable devices).
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 identifier
is not recognized.
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, filter
will replace the existing session's filter.
If filter
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 filter.service_uuids
, filter.service_data
, and/or filter.manufacturer_identifier
.
Terminate a previously started scan session.
Creates a connection to the peripheral device with the given identifier. Returns the status of the operation in status
.
On success, gatt_client
will be bound and can be used for GATT client role procedures. On failure, gatt_client
will be closed and status
will indicate an error.
Disconnects this Central's connection to the peripheral with the given identifier.
Called when the scan state changes, e.g. when a scan session terminates due to a call to Central.StopScan() or another unexpected condition.
Called for each peripheral/broadcaster that is discovered during a scan session. rssi
contains the received signal strength of the advertising packet that generated this event, if available.
Called when this Central's connection to a peripheral with the given identifier is terminated.
Defined in fuchsia.bluetooth.le/peer.fidl
Protocol that represents the connection to a peer. This can be used to interact with GATT services and establish L2CAP channels.
Defined in fuchsia.bluetooth.le/peripheral.fidl
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.
Defined in fuchsia.bluetooth.le/peripheral.fidl
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 PeripheralError.
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 AdvertisingHandle will remain valid.
An instance of Peripheral can only have one active advertisement at a time. Clients must obtain multiple Peripheral instances for multiple simultaneous advertisements.
If the client closes its end of the AdvertisingHandle channel, advertising will be stopped. If the handle is closed before the request is fulfilled, advertising will be briefly enabled before it is terminated.
parameters
Parameters used while configuring the advertising instance.handle
Handle that remains valid for the duration of this advertising session.handle
will be closed.Event delivered when a remote LE central initiates a connection to this Peripheral when connectable advertising is enabled via Peripheral.StartAdvertising.
The returned Connection 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.
peer
Information about the central that initiated the connection.handle
Represents the connection.[[DEPRECATED]]
Starts sending advertisements based on the given parameters. - advertising_data
: The advertising data that should be included in the payload. - scan_result
: The scan result that will be returned when the advertisement is scanned. Setting this will mark the advertisement set as scannable. - connectable
: when true, this advertisement will be marked as connectable. NOTE: connections can be made to a GATT server even if this is not set. - interval_ms
: The requested interval to advertise this set at in milliseconds. minimum 20, maximum 10,000,000 (almost 3 hours). A reasonable default is 1 second (1000). - anonymous
: if true, the address of this device will not be included
If the tx_power_level
is set in either AdvertisingData, it will be replaced with the actual TX Power level reported by the adapter, or included in the extended header of the Advertising PDU to save advertising space.
If scan_result
and advertising_data
are both set, legacy advertising will be used, which limits the size of the advertising data.
This request will fail if: - The service_uuids
field of advertising_data
contains a UUID that does not match a GATT service that was previously registered by this application; - If the provided advertising data cannot fit within the advertising payload MTU that is supported on the current platform and parameters. - If anonymous
advertising is requested but the controller cannot support it.
[[DEPRECATED]]
Stop an advertising session that was previously started by this application.
[[DEPRECATED]]
Called when a remote central device has connected to a connectable advertisement.
[[DEPRECATED]]
Called when a remote central previously connected to this application is disconnected.
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Entry in the service_data
field of a AdvertisingData.
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Entry in the manufacturer_data
field of a AdvertisingData.
generated
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
[[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
[[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
Represents advertising and scan response data advertised by a broadcaster or peripheral. [[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
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. [[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
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. [[DEPRECATED]]
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Entry in the service_data
field of a AdvertisingData.
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Entry in the manufacturer_data
field of a AdvertisingData.
generated
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
[[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
[[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
Represents advertising and scan response data advertised by a broadcaster or peripheral. [[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
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. [[DEPRECATED]]
Defined in fuchsia.bluetooth.le/types_deprecated.fidl
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. [[DEPRECATED]]
Type: uint32
Defined in fuchsia.bluetooth.le/peripheral.fidl
Type: uint8
Defined in fuchsia.bluetooth.le/peripheral.fidl
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.
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.
Type: uint32
Defined in fuchsia.bluetooth.le/peripheral.fidl
Type: uint8
Defined in fuchsia.bluetooth.le/peripheral.fidl
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.
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.
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Represents advertising and scan response data that are transmitted by a LE peripheral or broadcaster.
Defined in fuchsia.bluetooth.le/peer.fidl
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.
This field is always present.
This field is always present.
Defined in fuchsia.bluetooth.le/peripheral.fidl
Represents the parameters for configuring advertisements.
This field is required.
If present advertisements will be configured to be scannable.
Defined in fuchsia.bluetooth.le/advertising_data.fidl
Represents advertising and scan response data that are transmitted by a LE peripheral or broadcaster.
Defined in fuchsia.bluetooth.le/peer.fidl
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.
This field is always present.
This field is always present.
Defined in fuchsia.bluetooth.le/peripheral.fidl
Represents the parameters for configuring advertisements.
This field is required.
If present advertisements will be configured to be scannable.
generated
generated