-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patching the BlueZ included with HA OS #2285
Comments
Interesting issue and nice you've been able to track it down! We use the upstream buildroot package to build BlueZ. Hence this requires changing our buildroot fork: https://github.com/home-assistant/buildroot/tree/2022.02.x-haos. So in this case the path would be to create a PR for that repository to add the patches, and then bump it in a PR on this repository. Adding two patches is easy enough, so I went ahead and backported them to BlueZ 5.63 (which needed a third patch to make it compile), see home-assistant/buildroot@41bd49d. The bump of the buildroot git submodule is then a PR to this repository, see #2286. With this, the problem should be addressed with the next major and minor release. |
@agners Great, thanks for creating that PR! I was close to figuring out how to apply the patches on my own, but didn't realize patches were stored in a separate repo. |
I believe I've been having a similar issue. What I noticed the most is that "bleak" will freak out. I think the only part that may not be similar is that HA OS after a day or two will no longer see my bluetooth adapter attached to the host. Even after restarting HAOS it still doesn't see it. I've already verified that the host system has the device detected and also in the VM (Synology VM) still shows the device attached. In order for it to have it come back I have to unplug the usb adapter from the host system, re attach to the VM and restart HAOS. |
@Dvalin21 That sounds like it might be a different issue. This issue was related to missing services for a Bluetooth device, I never had an issue where HA OS wasn't seeing the Bluetooth adapter. |
I leave a pin here for Awox HACS I hope this will get released soon =/ |
If I build another 9.x release, it will be sometime in January. You can also try it out by updating to dev builds, it is quite safe.
|
Okay, I got time to test this. BUT! |
HAOS 9.5 contains the BlueZ bugfix. |
Thanks again! |
Describe the issue you are experiencing
BlueZ 5.63, the version included in HA OS, has a bug that causes the Bluetooth GATT services for certain devices to not be visible. I encountered the issue with an Eufy T9148 smart scale, and it might be relevant to other devices as well, like in Jc2k/aiohomekit#135, home-assistant/core#76380, and bluez/bluez#30.
I reported this issue to BlueZ, here is the GitHub issue:
bluez/bluez#438
After I reported the issue, BlueZ fixed it in their latest master branch. These are the two commits which fixed the issue:
bluez/bluez@b91d921
bluez/bluez@da203f5
I backported this change to 5.63, and confirmed that it still fixes the issue in that version. Minor changes were needed in order to make the patch work with 5.63 due to BlueZ having recently changed their approach to debug logging. Here is the patch for the change needed to fix the issue in BlueZ 5.63:
0001-patch.patch
I'd like to create an integration for my smart scale, but currently I can't do that, since most users are using HA OS, and HA OS uses BlueZ 5.63 which has the bug. Would it be possible to apply the above patch to the BlueZ package included in HA OS? This could potentially improve compatibility with several Bluetooth devices. I'm willing to help with the implementation, but would need some guidance since I've never contributed to an OS before.
Any help would be greatly appreciated. Thanks!
What operating system image do you use?
generic-x86-64 (Generic UEFI capable x86-64 systems)
What version of Home Assistant Operating System is installed?
9.4
Did you upgrade the Operating System.
Yes
Steps to reproduce the issue
N/A
Anything in the Supervisor logs that might be useful for us?
Anything in the Host logs that might be useful for us?
System information
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: