-
Notifications
You must be signed in to change notification settings - Fork 266
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
Fix LE devices not working on Ventura #446
base: master
Are you sure you want to change the base?
Conversation
Look like starting from Ventura, the bluetooth daemon expects an LE PHY Update Complete event to be triggered from the controller before starting the connection. However for Intel cards, that event is not sent by the firmware, so we can fake it by issuing an extra LE command and modify its response.
@@ -185,12 +214,15 @@ IOReturn CIntelBTPatcher::newHostDeviceRequest(void *that, IOService *provider, | |||
writeHCIDescriptor->complete(); | |||
const char *randAddressDump = _hexDumpHCIData((uint8_t *)randomAddressHci, 9); | |||
if (randAddressDump) { | |||
SYSLOG(DRV_NAME, "[PATCH] Sending Random Address HCI %lld %s", ret, randAddressDump); | |||
SYSLOG(DRV_NAME, "[PATCH] Sending Random Address HCI %d %s", ret, randAddressDump); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix build warning
IOFree((void *)randAddressDump, 9 * 3 + 1); | ||
} | ||
_randomAddressInit = true; | ||
SYSLOG(DRV_NAME, "[PATCH] Resend LE SCAN PARAM HCI %lld", ret); | ||
SYSLOG(DRV_NAME, "[PATCH] Resend LE SCAN PARAM HCI %d", ret); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix build warning
@zxystd work with this pr |
Hi, sorry for the late reply. Code for patching |
Hi @williambj1 until we wait for the feedback from @qhuyduong can we not restrict this commit to Ventura? |
Hi @williambj1 it doesn't seem that @qhuyduong saw your previous message, is it still safe to use such code patching in the kext? I am on Ventura and thankfully I have had no kernel panics (but with low BTLE use, admittedly). Thanks! |
I use it on ventura and sonoma and I have not found kp, and I always have keyboard and mouse Logitech connected in bt |
Hi @williambj1 it seems I had an OS crash or kernel panic out of nowhere, without changing/adding anything all this time -- when the Intel NUC that I use woke from sleep (or something). There are 2 panic files that I detected in Kernel-2023-07-04-014613.panic.txt (please remove the txt extension) Unfortunately, I am not using this parameter in OpenCore in a permanent way 😞 So not sure if these panic files can offer much information.
What tool or Terminal command do you use to check this type of files? I cannot find any reference anywhere. |
Please @Kaisar870 tell us exactly what you did, what you used, your macOS, setup, OpenCore and specific |
hi there, |
Feedback: After prolonged use, from the release of this patch up until now, my hackintosh has not experienced any crashes due to this kext. |
I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work. Get bluetooth kext from my repo https://github.com/Lorys89/Intel-NUC8-Hackintosh |
I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work. intel ac9260 laptop, ventura 13.5.2, openCore 0.9.5 it is connected, but the indicator on the mouse still on pairing mode (blipping fast) |
I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work. Not working for me intel ax210, ventura 13.5.2, OpenCore 0.9.3 I updated my config.plist based on yours and changed the order of the files (BluetoolFixup, IntelBTPatcher,IntelBluetoothFirmware) My mx keys and mx master 3s still do not work as before. |
I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work. weirdly my logitech mouses (pebble, vertical) could not connect with my hackintosh. 2 of them do not have any problems when connecting to windows PC. but now my logitech keyboard connected via bluetooth to my hackintosh |
I have an MX Keys Mini, and I'm using the most current version of Kext, but I can't connect in any way, could anyone help me? could you help @Lorys89 ? |
don't work in z690i ultra plus ddr4 (AX411). Loading icon that disappears after clicking the button connect. |
@Lorys89 Thank you so much! Your kext version made my MX Keys and MX Anywhere 3 to work again! |
Hello, everyone. I can’t get my HP240 mouse to function on Ventura or Sonoma. Have tried different kexts versions. Is there a workaround ? Thanks ! |
@qhuyduong bạn tuyệt vời bạn 10 điểm!!! Mình fix dc lỗi bluetooth trên bản hackintosh của mình rồi :D/ |
For me, Version 2.4.0, (as the official 2.3.0 Release), is a no go to my Logitech MX Series, (keyboard and mouse). I had to revert to the @Lorys89 version, (2.3.0), to make them work again. Edit: Using macOS Sonoma 14.3.1 |
+1 Sonoma v14.4.1 + Lorys89's version |
Same here. Ventura + @Lorys89 version works for my MX Master 3S. |
Hello, everyone. I'd like to test this IntelBTPatcher/IntelBTPatcher.cpp in my setup. What should I do ? My problem is getting the HP240 mouse to connect. Thanks. |
@MVRL70 Get the compiled files from here. Then follow the instructions from OpenIntelWireless but using the files you got from this PR. |
Thanks, koetchian, but no success. Tried release and debug. |
It works, thanks so much! |
Link seems to have expired, can you re-upload? |
Yes and it is compatible with macOS beta 15 sequoia |
Thanks for that. Unfortunately doesn't seem to fix the issue for me. My Logitech MX Craft keyboard briefly shows as connected in the bluetooth panel, but the keyboard doesn't recognize the connection, then it is dropped by MacOS a few seconds later. |
What model of wifi card? On which version of macos? |
I'm assuming you mean bluetooth card? I'm using MacOS Ventura 13.6.6 |
I want to comment that I was having issues with my Airpods Pro 2 related to the sound, but with this fix now every sound issue has been partially fixed, congrats for the patch :) |
Thank you, my microsoft bluetooth mouse is finally connected to bluetooth, on Sonoma. Hello @zxystd, are there any plans to merge this PR? |
This PR seems mostly the reverse of 350e3a7. |
Did you get the LE on the Sequoia? |
Hi @zxystd any updates on your review? Would you accept this fix? Or reject it? |
Look like starting from Ventura, the bluetooth daemon expects an LE PHY Update Complete event to be triggered from the controller before starting the connection to LE devices (e.g: Logitech MX Master 3S mouse).
For Broadcom cards, that event is triggered automatically on new connection (attached the screenshot of PacketLogger on Macbook Air M1).
However for Intel ones, that event is not sent by the firmware, so pairing these devices will stuck.
One of the solution is to fake the LE PHY Update Complete event by issuing an extra LE command and modify its response.
Tested on macOS Ventura 13.4 with Intel® Wi-Fi 6 AX200 and Logitech MX Master 3S.
Fixes #51 #418 #419 #421 #444
P/S: I'm quite new for Lilu and macOS SDK, so I belive there should be a cleaner way to do this, such faking the event without the need to sending another command. Recommendations are welcome.