pub struct BluetoothRfcommConfig {
pub enabled: bool,
pub channel: u8,
pub device_name_prefix: String,
pub outbound_enabled: bool,
pub poll_interval_ms: u64,
pub bridge_to_tcp: bool,
pub discovery_enabled: bool,
pub inquiry_interval_ms: u64,
pub peer_cleanup: PeerCleanupConfig,
}Expand description
Bluetooth RFCOMM direct-channel configuration.
RFCOMM is independent from Bluetooth PAN/NAP. It opens a Bluetooth RFCOMM
channel to paired devices whose names match device_name_prefix, exchanges
PIM identity frames, and can bridge the resulting byte stream to the local
TCP transport listener so the rest of the daemon sees a normal peer session.
Fields§
§enabled: boolEnable the Linux RFCOMM service. Defaults to false (opt-in).
channel: u8RFCOMM channel to bind and dial.
device_name_prefix: StringPrefix used to identify paired PIM peers by Bluetooth device name.
outbound_enabled: boolEnable outbound paired-device scanning and dialing.
poll_interval_ms: u64Poll interval for outbound paired-device scans, in milliseconds.
bridge_to_tcp: boolBridge established RFCOMM sessions to the local TCP transport listener.
discovery_enabled: boolEnable the desktop-initiated inquiry loop that scans for nearby
device_name_prefix peers and runs bluetoothctl pair on them.
Mirrors the Android side’s startDiscovery; together they make
either device able to bootstrap the bond without manual pairing
in OS Bluetooth Settings.
inquiry_interval_ms: u64Cadence between bluetoothctl scan on cycles in the inquiry
loop. BR/EDR inquiry runs for ~12 s per cycle then idles —
re-arming too often wastes the BT controller and battery.
peer_cleanup: PeerCleanupConfigPeriodic cleanup of unreachable paired peers — see
PeerCleanupConfig. The destructive action is
bluetoothctl remove <bd_addr>. Bluetooth-flavoured defaults:
enabled, 2 h lifetime, 1 h sweep cadence.
Trait Implementations§
Source§impl Clone for BluetoothRfcommConfig
impl Clone for BluetoothRfcommConfig
Source§fn clone(&self) -> BluetoothRfcommConfig
fn clone(&self) -> BluetoothRfcommConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BluetoothRfcommConfig
impl Debug for BluetoothRfcommConfig
Source§impl Default for BluetoothRfcommConfig
impl Default for BluetoothRfcommConfig
Source§impl<'de> Deserialize<'de> for BluetoothRfcommConfig
impl<'de> Deserialize<'de> for BluetoothRfcommConfig
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 PartialEq for BluetoothRfcommConfig
impl PartialEq for BluetoothRfcommConfig
Source§fn eq(&self, other: &BluetoothRfcommConfig) -> bool
fn eq(&self, other: &BluetoothRfcommConfig) -> bool
self and other values to be equal, and is used by ==.