Skip to content

how can we know which BT devices are connected? #1

@gearhead

Description

@gearhead

This looks awesome! We have been trying to do this via shell scripts and I think we will try to put this in our UI to connect and pair and such. I will play with it in the near term and see how far I/we get.

One question, though... How can we know what BT devices are not just known, but connected? I have been struggling with this and the BT dev group on kernel.org says 'query the dbus' which does not appear to be what you are going here. 'bluetoothctl info' does not report all connected devices. On my machine, if there is only one connected device it reports that device. If there are 2 connected, it always reports my keyboard but nothing else.
To get the MAC address of all connected devices I need to use 'btmgmt con' which cannot be run 'non-interactively' for some reason. Once I have the MAC addresses I can then run 'bluetoothctl info' on each MAC to get its capabilities and continue to process.

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