AppleBluetooth/IntelBluetoothFamily

Support for 0x8087, 0x0a2b

Opened this issue · 17 comments

Hi, I was monitoring your amazing project for a while and yesterday evening I tried to test it on my two hackintoshes:

Following your instruction (my Bluetooth card is a Gen1...) it is working fine on Intel NUC7i3BNH as you could see in the following image:
NUC7i3BNH

but it is not working on my Huawei Matebook X Pro:
Matebook IntelBluetoothFamily

I attach also my standard Bluetooth HCI on Matebook X Pro:
Matebook Bluetooth HCI

and also my working Bluetooth using IntelBluetoothFirmware project on Matebook X Pro:
Matebook IntelBluetoothFirmware

I would also to underline the following fact: Bluetooth cards on NUC7i3BNH and MatebookXPro are working fine with latest IntelBluetoothFirmware loading ibt-12* firmware

I don't know whether what I reported could be useful for your development...

(my USB mapping ports should be rock solid in both cases...)

Edit:

  • on NUC7i3BNH I loaded the Catalina release for your project (I'm running Catalina 10.15.7 with latest security update)
  • on Matebook X Pro I loaded the Big Sur release for your project (I'm running Big Sur 11.6.2)

Please check if the kext is loaded (use kextstat). If so and Bluetooth is still not working, please upload logs.

Please check if the kext is loaded (use kextstat).

I run in Terminal the command kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' and the following is what I got:

Executing: /usr/bin/kmutil showloaded --no-kernel-components --list-only
No variant specified, falling back to release
as.vit9696.Lilu (1.5.7)
as.vit9696.VirtualSMC (1.2.7)
ru.usrsse2.SMCLightSensor (1.2.7)
ru.usrsse2.SMCBatteryManager (1.2.7)
as.vit9696.WhateverGreen (1.5.5)
as.vit9696.AppleALC (1.6.6)
org.vanilla.driver.CPUFriend (1.2.4)
as.lvs1974.HibernationFixup (1.4.5)
org.acidanthera.NVMeFix (1.0.9)
as.vit9696.RestrictEvents (1.0.5)
com.cjiang.IOBluetoothFixup (1.0.1)
com.alexandred.VoodooI2CServices (1)
com.sicreative.VoltageShift (1.24)
as.vit9696.SMCProcessor (1.2.7)
org.coolstar.VoodooGPIO (1.1)
as.acidanthera.voodoo.driver.PS2Controller (2.2.7)
org.zhen.ThermalSolution (1)
org.rehabman.driver.NullEthernet (1.0.6)
com.alexandred.VoodooI2C (2.6.5)
com.zxystd.AirportItlwm (2.1.0)
as.acidanthera.voodoo.driver.PS2Keyboard (2.2.7)
com.alexandred.VoodooI2CHID (1)
me.kishorprins.VoodooInput (1.1.3)
com.intel.driver.EnergyDriver (3.7.0)
com.rugarciap.DisableTurboBoost (0.0.1)

It is coherent with what I got on NUC7i3BNH i.e.

as.vit9696.Lilu (1.5.6)
as.vit9696.WhateverGreen (1.5.6)
as.vit9696.AppleALC (1.6.8)
org.vanilla.driver.CPUFriend (1.2.4)
as.lvs1974.HibernationFixup (1.4.6)
com.cjiang.IOBluetoothFixup (1.0.1)
org.acidanthera.NVMeFix (1.0.9)
as.vit9696.RestrictEvents (1.0.4)
com.rehabman.driver.USBInjectAll (0.7.7)
as.vit9696.VirtualSMC (1.2.9)
as.vit9696.SMCProcessor (1.2.9)
org.rehabman.driver.FakePCIID (1.3.15)
as.acidanthera.mieze.IntelMausi (1.0.6)
ru.joedm.SMCSuperIO (1.2.7)
com.zxystd.AirportItlwm (2.1.0)
com.intel.driver.EnergyDriver (3.7.0)

Is it right?

If answer is positive, then please what I need to provide as logs?... since I'm not skilled in debugging process, please, could you provide the exact commands I need to run in Terminal?

Those steps really should be documented.

  1. Install DebugEnhancer.kext
  2. Run sudo dmesg | grep -i blue > ~/Desktop/dbg.log
  3. Attach the file

Thanks.

Hi,
Your device 0x8087, 0x0a2b is actually a Gen2 device. Please try the corresponding transport instead.

Hi @CharlieJiangXXX ,
I guessed my device was a Gen1 device using linked reference:
https://openintelwireless.github.io/itlwm/Compat.html#dvm-iwn

I'm very sorry for my mistake... I'll try with Gen2 transport...

Yeah, it is important to note that the Bluetooth and Wireless generations do not really match. I will add the generation classifications in the README.

Hi @CharlieJiangXXX ,
this is quite weird for me:

  • using IntelGen2BluetoothHostControllerUSBTransport.kext is successful for Bluetooth card 0x8087, 0x0a2b on Matebook X Pro 2018
  • while using it for the same device 0x8087, 0x0a2b on NUC7i3BNH results in Bluetooth card not recognised at all... it is working fine using instead IntelGen1BluetoothHostControllerUSBTransport.kext

Could it be related to SMBIOS choice (and therefore some expected hardware limitations)?

  • for NUC7i3BNH I'm using iMac18,1
  • for Matebook X Pro I'm using MacBookPro15,2

or maybe it could be related to some not documented hardware differences since

  • NUC7i3BNH is based on an Intel i3-7100
  • while Matebook X Pro is based on an Intel i7-8550U

Edit:
Surely I'm wrong with my thoughts since running now on Matebook X Pro the command kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' I get:

Executing: /usr/bin/kmutil showloaded --no-kernel-components --list-only
No variant specified, falling back to release
as.vit9696.Lilu (1.5.7)
as.vit9696.VirtualSMC (1.2.7)
ru.usrsse2.SMCLightSensor (1.2.7)
ru.usrsse2.SMCBatteryManager (1.2.7)
as.vit9696.WhateverGreen (1.5.5)
as.vit9696.AppleALC (1.6.6)
org.vanilla.driver.CPUFriend (1.2.4)
as.lvs1974.HibernationFixup (1.4.5)
org.acidanthera.NVMeFix (1.0.9)
as.vit9696.RestrictEvents (1.0.5)
com.cjiang.IOBluetoothFixup (1.0.1)
com.alexandred.VoodooI2CServices (1)
com.sicreative.VoltageShift (1.24)
as.vit9696.SMCProcessor (1.2.7)
org.coolstar.VoodooGPIO (1.1)
org.zhen.ThermalSolution (1)
org.rehabman.driver.NullEthernet (1.0.6)
as.acidanthera.voodoo.driver.PS2Controller (2.2.7)
com.alexandred.VoodooI2C (2.6.5)
com.zxystd.AirportItlwm (2.1.0)
as.acidanthera.voodoo.driver.PS2Keyboard (2.2.7)
com.1Revenger1.VoodooRMI (1.3.5)
com.1Revenger1.RMII2C (1)
me.kishorprins.VoodooInput (1.1.3)
com.cjiang.IntelBluetoothFamily (1.0.0)
com.cjiang.OpenFirmwareManager (1.0.0)
com.cjiang.IntelBluetoothHostControllerUSBTransport (1.0.0)
com.cjiang.IntelGen2BluetoothHostControllerUSBTransport (1.0.0)
com.intel.driver.EnergyDriver (3.7.0)
com.rugarciap.DisableTurboBoost (0.0.1)

which is very different from what I reported previously for NUC7i3BNH

Edit 2:
now NUC7i3BNH seems to be the issue since it doesn't load the following stuff:

com.cjiang.IntelBluetoothFamily (1.0.0)
com.cjiang.OpenFirmwareManager (1.0.0)
com.cjiang.IntelBluetoothHostControllerUSBTransport (1.0.0)
com.cjiang.IntelGen1BluetoothHostControllerUSBTransport (1.0.0)

However its Bluetooth card is currently working fine since my Apple Mouse 2 is working very well!

Thank you for the report.
Yes, it seems that either the device did not match or the setup failed for your NUC7i3BNH. Could you provide the log when using the gen2 transport for that device? Refer to @williambj1's comment for the specifics (I'm no expert either 😂)
By the way, you can simply use the command kextstat | grep cjiang for the debugging of this kext.

If the two devices have the exact same cards, then it is an operating system issue. For the NUC try moving IOBluetoothFixup to L/E.

Referring to @williambj1 's instructions, here are the logs:
dbg_MatebookXPro_Gen2.log (...just for reference?)
plus
dbg_NUC7i3BNH_Gen1.log
dbg_NUC7i3BNH_Gen2.log

I just updated and added a log when SetupController is invoked. Please use the latest alpha and upload the logs again. Thanks.

These are the logs obtained using 0dfad64 latest alpha commit:
dbg_MatebookXPro_Gen2.log
dbg_NUC7i3BNH_Gen2.log
dbg_NUC7i3BNH_Gen1.log

Seems that the IntelBluetoothFamily did not successfully load on Catalina while the transport is loaded (very weird). Needs more investigation. I will do more testing myself.

Hi @profzei, could you please also upload a PacketLogger log? I have provided a copy of that app below. It would really help my development. Thank you!
PacketLogger.app.zip

Hi @CharlieJiangXXX !
I installed on Catalina (NUC7i3BNH) PacketLogger.app you provided...

Now what I need to do or previously set in its Preferences section?

Since it is running, do I only need to click Save As option with (which?) format pklg or btsnoop?

Questions:

  • with NUC7i3BNH and Gen1?
  • with NUC7i3BNH and Gen2?
  • with MatebookXPro and Gen2?

I guess all of them...
Please, let me know

Hi, since Bluetooth is not yet working on Catalina, can you just send the log for Big Sur on the MateBook? No setting is necessary in PacketLogger, in addition. When you open it a request for password will be prompted, after which the logs would show up. Just click command+s to save it. The pklg format would be preferred.
Btw, no need to use Gen1 for your devices anymore, please just use Gen2. Thank you.

Hi @CharlieJiangXXX ,
Sorry for the delay...
MatebookXPro_Gen2.pklg.zip
I'm using your latest commit for each involved kext

Edit:
I also found in my home these pklg files with bigger sizes than my saved one... they seem auto saves... I'll attach also them:
Archive.zip

Now that I've fixed gen1 support, I will try to work on supporting Catalina. From your previous logs, I think IntelBluetoothFamily didn't load properly or it failed at some point after probe() of the usb transport is called. I will look into this with my internal test group and see if I could get it fixed.