Project: /_project.yaml Book: /_book.yaml

fuchsia.bluetooth.bredr

PROTOCOLS

Profile {:#Profile}

Defined in fuchsia.bluetooth.bredr/profile.fidl

Profile provides Bluetooth services a way to register a service definition, making that service discoverable by remote peers. Registered services will receive L2CAP connections made to the services advertised in the definition, and can open connections to remote connected devices. To discover possible connected devices, devices should use AddSearch to search any remote devices.

AddService {:#AddService}

Register a service. This service will be registered and discoverable with the Service Discovery Protocol server. The security_level provided here will be required before a connection is established. If devices is true, connections to the service's channels will create a device instead of producing an OnConnected event. Returns status for success or error. If successful, a unique service_id is returned to identify this service.

Request

Response

AddSearch {:#AddSearch}

Register a search for services on remote devices. An OnServiceFound event will be produced each time a device is connected that has a service matching service_uuid with the additional attributes in attr_ids. The ProtocolDescriptor should be requested to obtain information to connect to a service. If attr_ids is empty, all attributes will be requested. See the SDP Specification (Core Spec 5.0, Vol 3, Part B, Section 5) and the relevant profile specification documents.

Request

RemoveService {:#RemoveService}

Removes a previously-registered service, disconnecting all clients.

Request

ConnectL2cap {:#ConnectL2cap}

Connect a channel to the connected remote device peer_id using the protocol and channel listed. For L2CAP, dynamic PSMs can be specified. See the defined PSMs in service.fidl Returns the channel after it has been connected. status will indicate an error if the channel could not be connected.

Request

Response

OnConnected {:#OnConnected}

Produced when a protocol channel is connected for this profile. channel contains the channel connected to, and information about the protocol is provided in protocol. All protocols supported internally will be handled, for example an RFCOMM socket will be provided instead of an L2CAP socket if the services protocol descriptor includes it.

Response

OnServiceFound {:#OnServiceFound}

Produced when a search this client added finds a matching service on a remote device. peer_id is the device the service was found on, and profile includes the Profile Descriptor which matches the service_uuid searched for, with the major and minor version reported by the remote device. attributes contains all attributes retrieved from the remote device. It may include attributes not requested in the search.

Response

STRUCTS

DataElement {:#DataElement}

Defined in fuchsia.bluetooth.bredr/service.fidl

ProtocolDescriptor {:#ProtocolDescriptor}

Defined in fuchsia.bluetooth.bredr/service.fidl

Identifies a communications protocol along with protocol-specific parameters.

ProfileDescriptor {:#ProfileDescriptor}

Defined in fuchsia.bluetooth.bredr/service.fidl

A description of a profile that this service conforms to.

Information {:#Information}

Defined in fuchsia.bluetooth.bredr/service.fidl

Human-readable information about a service. Strings are encoded in UTF-8.

Attribute {:#Attribute}

Defined in fuchsia.bluetooth.bredr/service.fidl

A generic attribute, used for protocol information;

ServiceDefinition {:#ServiceDefinition}

Defined in fuchsia.bluetooth.bredr/service.fidl

ENUMS

SecurityLevel {:#SecurityLevel}

Type: uint32

Defined in fuchsia.bluetooth.bredr/profile.fidl

DataElementType {:#DataElementType}

Type: uint32

Defined in fuchsia.bluetooth.bredr/service.fidl

A building element in SDP. Used for various low-level and custom parameters.

ProtocolIdentifier {:#ProtocolIdentifier}

Type: uint16

Defined in fuchsia.bluetooth.bredr/service.fidl

Defined Protocol Identifiers for the Protocol Descriptor We intentionally omit deprecated profile identifiers. From Bluetooth Assigned Numbers: https://www.bluetooth.com/specifications/assigned-numbers/service-discovery

ServiceClassProfileIdentifier {:#ServiceClassProfileIdentifier}

Type: uint32

Defined in fuchsia.bluetooth.bredr/service.fidl

Identifiers that are valid for Bluetooth Classes / Profiles We intentionally omit classes and profile IDs that are unsupported, deprecated, or reserved for use by Fuchsia Bluetooth. From Bluetooth Assigned Numbers for SDP https://www.bluetooth.com/specifications/assigned-numbers/service-discovery

UNIONS

DataElementData {:#DataElementData}

Defined in fuchsia.bluetooth.bredr/service.fidl

CONSTANTS