Skip to content

Failed to connect when device is already connected #29

@jlsjonas

Description

@jlsjonas

As per the Prerequisites

The desk should be connected and paired to the computer.

However, I was unable to execute a command until I specifically DISCONNECTED the device.

My theory: When f.e. executing bluetoothctl I'm directly on the desk already, so the script is likely trying to connect the desk with another device; instead of just doing its thing

As being connected already would avoid scanning & connecting; thus significantly reducing execution time (especially for simple commands) I'd propose to actually check if we're already connected, and just communicate directly in that case, instead of trying to scan & connect

OS: Ubuntu 20.04
bleak is using bluez as backend (in my case)
edit: regarding timing, a no-op (simple read) takes 4-5 seconds currently

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions