Skip to content

Conversation

@tim-gromeyer
Copy link
Contributor

For me the old method with QBluetoothDeviceDiscoveryAgent the connecting was pretty unstable.
It was disconnecting after a short amount of time, always. Since we already rely on BlueZ (only supported backend in Qt for Linux), I use the bluez dbus api to check for connected/disconnected devices.

Our Qt code than only connects to the service, not the device itself.

With this change I noticed a improvement in the time it takes for the app to connect to the airpods.

It's a pretty big change, and I wanna know what you think about it (@kavishdevar). I only noticed improvements.

Upsides I know of:

  • Improved connection speed
  • Improved connection reliability
  • Reduced resource usage (for my debug build, CPU usage not even measurable, RAM 102.4 MiB)

Possible downsides:

  • App doesn't auto-connect to airpods (since the system decides it). We could implement it

@tim-gromeyer tim-gromeyer force-pushed the linux-disconnect-behaviour branch from cdb8f42 to abfbe5e Compare April 16, 2025 20:11
@kavishdevar
Copy link
Owner

I think it's great! Maybe for automatically connecting, we can still use dbus for listening to changes?

@tim-gromeyer
Copy link
Contributor Author

Yeah, of course we can, but I think it should be a option you can turn off

@tim-gromeyer tim-gromeyer merged commit 2fe9724 into kavishdevar:main Apr 17, 2025
@tim-gromeyer tim-gromeyer deleted the linux-disconnect-behaviour branch April 17, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants