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
And should it also work with the pairing of the xiaomi mi 11 lite 5g ne smartphone? That in the past was wrong. |
@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. |
|
this works man!! for me, I am excluding the intelBluetoothInjector, I used bluetoolfixup v2.6.8 instead |
when I type quickly on the keyboard, it turns out that letters are skipped and in general the keyboard works as if it slows down, please tell me how to fix it? there was no such suspension on the native module from broadcom, where the keyboard prints quickly and does not skip letters. |
Solution 1: Write slowly 🙈 |
MX Keys keyboard does not connect to Sonoma :( |
My keyboard mx keys connects great to sonoma with bt. I use the kext I posted above. |
@williambj1 would you consider this fix only for Ventura? For some reason @qhuyduong never came back to us with a reply 😞 and closing this ticket would be great progress, after so many weeks. Thank you 🙏 EDIT: @Lorys89 would this kext be needed only on NUC8 BTLE chipsets? What about newer BTLE controllers like e.g. AX201, would your kext work there, respectively? |
@Lorys89, @qhuyduong Got this working today on Ventura on an Intel AX200 card. Both the Microsoft Designer Keyboard and Microsoft Ergonomic Mouse are working fine. Thanks for your work. |
I'm just a tester, but the dev was good at fixing it. |
Hi @Lorys89 why don't you suggest your fix to @williambj1 so that this can be integrated officially in the kext, even if it is only for Ventura? Did you recompile your kext with latest codebase @Lorys89 ? Thanks |
@Lorys89 @qhuyduong While the issue with pairing was fixed after using the compiled Kext from this PR, I am unable to automatically pair the devices after they sleep or on boot. I have to 'Forget' the device, then pair it again in order to use them.
@ctopher7 Do your devices automatically connect on boot or after sleep (ie: The Mouse/Keyboard itself goes to sleep) after using BluetoolFixup v2.6.8? |
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. |
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.