pub struct Profile {
pub uuid: Uuid,
pub name: Option<String>,
pub service: Option<Uuid>,
pub role: Option<Role>,
pub channel: Option<u16>,
pub psm: Option<u16>,
pub require_authentication: Option<bool>,
pub require_authorization: Option<bool>,
pub auto_connect: Option<bool>,
pub service_record: Option<String>,
pub version: Option<u16>,
pub features: Option<u16>,
/* private fields */
}
rfcomm
only.Expand description
Bluetooth RFCOMM profile definition.
Use Session::register_profile to register a profile.
Some predefined services:
-
HFP AG UUID:
0000111f-0000-1000-8000-00805f9b34fb
Default profile Version is 1.7, profile Features is 0b001001 and RFCOMM channel is 13. Authentication is required. -
HFP HS UUID:
0000111e-0000-1000-8000-00805f9b34fb
Default profile Version is 1.7, profile Features is 0b000000 and RFCOMM channel is 7. Authentication is required. -
HSP AG UUID:
00001112-0000-1000-8000-00805f9b34fb
Default profile Version is 1.2, RFCOMM channel is 12 and Authentication is required. Does not support any Features, option is ignored. -
HSP HS UUID:
00001108-0000-1000-8000-00805f9b34fb
Default profile Version is 1.2, profile features is 0b0 and RFCOMM channel is 6. Authentication is required. Features is one bit value, specify capability of Remote Audio Volume Control (by default turned off).
Fields§
§uuid: Uuid
Profile UUID.
name: Option<String>
Human readable name for the profile.
service: Option<Uuid>
The primary service class UUID (if different from the actual profile UUID).
role: Option<Role>
For asymmetric profiles that do not have UUIDs available to uniquely identify each side this parameter allows specifying the precise local role.
channel: Option<u16>
RFCOMM channel number that is used for client and server UUIDs.
If applicable it will be used in the SDP record as well.
psm: Option<u16>
PSM number that is used for client and server UUIDs.
If applicable it will be used in the SDP record as well.
require_authentication: Option<bool>
Pairing is required before connections will be established. No devices will be connected if not paired.
Request authorization before any connection will be established.
auto_connect: Option<bool>
In case of a client UUID this will force connection of the RFCOMM or L2CAP channels when a remote device is connected.
service_record: Option<String>
Provide a manual SDP record.
version: Option<u16>
Profile version (for SDP record).
features: Option<u16>
Profile features (for SDP record).
Trait Implementations§
source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Ord for Profile
impl Ord for Profile
source§impl PartialEq for Profile
impl PartialEq for Profile
source§impl PartialOrd for Profile
impl PartialOrd for Profile
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more