fix(bluetooth): call pair() for unpaired devices before connecting
This commit is contained in:
parent
243d302447
commit
28fb6cc4af
1 changed files with 2 additions and 0 deletions
|
|
@ -240,6 +240,8 @@ pub async fn connect_device(connection: zbus::Connection, device_path: OwnedObje
|
|||
let result = async {
|
||||
if proxy.device.connected().await? {
|
||||
Ok(())
|
||||
} else if !proxy.device.paired().await.unwrap_or(false) {
|
||||
proxy.device.pair().await
|
||||
} else {
|
||||
proxy.device.connect().await
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue