Expand description
Common Bluetooth type extensions
Re-exports§
pub use bonding_data::*;
pub use host_info::*;
Modules§
- Types related to bonding data. This module defines helper functions for unit tests that utilize proptest.
- Bluetooth Low Energy types This module declares native Rust encodings equivalent to FIDL structs for the Bluetooth LowEnergy interfaces. These structs use standard Rust primitives rather than the default mapping from FIDL, and derive the
Clone
trait for a more ergonomic api than those exposed in thefidl_fuchsia_bluetooth_le
crate. - Options for pairing commands
Structs§
- A data channel to a remote Peer. Channels are the primary data transfer mechanism for Bluetooth profiles and protocols. Channel currently implements Deref<Target = Socket> to easily access the underlying socket, and also implements AsyncWrite using a forwarding implementation.
- A Bluetooth Host Adapter id. Uniquely identifiers a bluetooth Host on this system.
HostId
can be converted to/from a FIDL Bluetooth HostId type. - A Fuchsia-generated unique Identifier for a remote Peer that has been observed by the system Identifiers are currently guaranteed to be stable for the duration of system uptime, including if the peer is lost and then re-observed. Identifiers are not guaranteed to be stable between reboots.
Enums§
- A Bluetooth device address can either be public or private. The controller device address used in BR/EDR (aka BD_ADDR) and LE have the “public” address type. A private address is one that is randomly generated by the controller or the host and can only be used in LE. The identity address can be random (often “static random”) but is not typically considered private.
- The Channel mode in use for a L2CAP channel.
- A struct indicating either A or B or Both, but not neither - at least one must be present Useful when indicating support for Le or BrEdr, where dual mode is also supported but we require at least one. This avoids extra error checking that would be required if two options were used.
Functions§
- Combines a list of addresses with the provided
separator
. - Generate a unique ID to use with audio_core, given the
peer_id
and whether it will be an input device. Current format is: [ 0x42, 0x54, - Prefix reserved for Bluetooth Audio devices 0xUU, 0xID, - UUID for the service being provided locally on this device: - 0x11, 0x1E Handsfree (for input devices) - 0x11, 0x1F Handsfree Audio Gateway (for output devices) - 0x11, 0x0A A2DP AudioSource - 0x11, 0x0B A2DP AudioSink (unused for now) 0x00, 0x00, 0x00, 0x00 - Reserved for Future Use (PeerId in big endian, 8 bytes) ]