pub struct BluetoothConfig {Show 22 fields
pub enabled: bool,
pub interface: String,
pub radio_discovery_enabled: bool,
pub device_name_prefix: String,
pub local_alias: String,
pub connect_pan: bool,
pub serve_nap: bool,
pub nap_bridge: String,
pub nap_bridge_addr: String,
pub dhcp_enabled: bool,
pub dhcp_range: Option<String>,
pub dhcp_lease_time: String,
pub dhcp_dns: Option<String>,
pub request_dhcp: bool,
pub auto_discover_peers: bool,
pub poll_interval_ms: u64,
pub scan_interval_ms: u64,
pub peer_discovery_interval_ms: u64,
pub bluetoothctl_timeout_s: u64,
pub discoverable_timeout_s: u64,
pub startup_timeout_ms: u64,
pub peer_cleanup: PeerCleanupConfig,
}Expand description
Bluetooth PAN link-establishment configuration.
This mechanism is intentionally narrow: it does not replace the transport
layer and it does not manage pairing. Instead, it waits for a Bluetooth PAN
interface to appear, then learns peer IPs from the PAN neighbor table and
hands them to the daemon so the existing TCP transport and handshake logic
can connect normally. Static Bluetooth peers are configured under
[[peers]] with mechanism = "bluetooth".
Fields§
§enabled: boolEnable Bluetooth PAN link monitoring. Defaults to false (opt-in).
interface: StringPreferred PAN-facing interface name or "auto" for runtime resolution.
radio_discovery_enabled: boolEnable radio-level Bluetooth discovery and pairing for new peers.
device_name_prefix: StringPrefix used to identify PIM peers by Bluetooth device name.
local_alias: StringLocal Bluetooth controller alias to advertise. Empty means derived from node name.
connect_pan: boolAllow outbound PAN/NAP connection attempts to discovered peers.
serve_nap: boolStart and supervise a local Linux NAP server process.
nap_bridge: StringLinux bridge/interface to expose through the local NAP server.
nap_bridge_addr: StringIPv4 address/CIDR assigned to nap_bridge when the daemon manages it.
dhcp_enabled: boolRun a daemon-supervised DHCP server on nap_bridge when serving NAP.
dhcp_range: Option<String>Explicit DHCP range (start,end). When unset, derived from nap_bridge_addr.
dhcp_lease_time: StringDHCP lease time passed to dnsmasq (e.g. "12h", "infinite").
dhcp_dns: Option<String>Comma-separated DNS server list advertised to DHCP clients. When unset,
inherited from the host’s /etc/resolv.conf at runtime.
request_dhcp: boolAutomatically request DHCP on the resolved PAN interface when acting as a
Linux PAN client (connect_pan = true, serve_nap = false).
auto_discover_peers: boolAutomatically discover peer IPs from the PAN interface neighbor table.
poll_interval_ms: u64Poll interval used while waiting for the PAN interface to become ready.
scan_interval_ms: u64Poll interval used for radio-level device scans.
peer_discovery_interval_ms: u64Poll interval used for automatic peer discovery after the interface is ready.
bluetoothctl_timeout_s: u64Timeout for bluetoothctl operations, in seconds.
discoverable_timeout_s: u64How long the controller remains discoverable after startup.
startup_timeout_ms: u64Maximum time to wait for the PAN interface to appear before giving up.
peer_cleanup: PeerCleanupConfigPeriodic cleanup of unreachable PAN-paired peers — see
PeerCleanupConfig. Bluetooth-flavoured defaults (2 h /
1 h). The destructive action is bluetoothctl remove <bd_addr>. Coordinates with [bluetooth_rfcomm.peer_cleanup]
via the BlueZ Connected check so an active session in
either subsystem suppresses the unpair.
Trait Implementations§
Source§impl Clone for BluetoothConfig
impl Clone for BluetoothConfig
Source§fn clone(&self) -> BluetoothConfig
fn clone(&self) -> BluetoothConfig
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 BluetoothConfig
impl Debug for BluetoothConfig
Source§impl Default for BluetoothConfig
impl Default for BluetoothConfig
Source§impl<'de> Deserialize<'de> for BluetoothConfig
impl<'de> Deserialize<'de> for BluetoothConfig
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 BluetoothConfig
impl PartialEq for BluetoothConfig
Source§fn eq(&self, other: &BluetoothConfig) -> bool
fn eq(&self, other: &BluetoothConfig) -> bool
self and other values to be equal, and is used by ==.