Contribute
Register

[WIP-Guide] HP ENVY x360 13-y013cl - i7-7500U Kaby Lake

Status
Not open for further replies.
I was trying to see if there was a way to make the device spoof as the CORRECT controller that is shown in my bios. but I guess I just have to deal for now. thanks for your help


@Mrgeque,

The USB port that the bluetooth device is attached to (HS07) not being set as Internal was the only thing I could see with your config ... but if you have resolved that and the issue remains then I not sure what else to suggest.

Its very strange that the BT controller type changes on a warm reboot ...

When the BT device is working correctly check the VID & PID of the device with hackintool's PCI List feature and make a note of it. Then when the device type changes after a reboot check again and see if the PID has changed ...

Since MacOS (and @RehabMan's kext) attach drivers via VID & PID matching I find it hard to believe that the either could be changing as these are usually baked into a device ... its a very odd situation and one that I've never heard of before.

Unfortunately Clover does not support spoofing a BT device .. but you should be able to do it with a custom SSDT ...
But I think it would be better to try and figure out why the device type is changing if at all possible.

Another thing you could try is to check your system log after booting ... see what @rehabmans BT kexts are reporting it may give you a clue ...

Cheers
Jay
 
thanks for your help again. I found in system log the dw1830 was loading firmware for bcm20703a1.

2019-09-15 13:49:11.195849-0700 localhost kernel[0]: (BrcmFirmwareRepo) <BrcmFirmwareRepo`BrcmFirmwareStore::loadFirmwareFile(char const*, char const*)> BrcmPatchRAM: Loaded firmware "BCM20703A1_001.001.005.0214.0422_v4518.zhx" from resources.

Now, is it possible to manually load a firmware for bcm2045a0? I've looked in resources for BrcmFirmwareRepo.kext and could not find a firmware for this controller
 
I found in system log the dw1830 was loading firmware for bcm20703a1.... now, is it possible to manually load a firmware for bcm2045a0? I've looked in resources for BrcmFirmwareRepo.kext and could not find a firmware for this controller


@Mrgeque,

You do not need to change or add anything as the BCM2045A0 controller uses the BCM20703A1 Firmware pkg.

If you look at the info.plist for the BrcmPatchRAM2 kext and find the matching VID|PID for the BCM2045A0 controller (VID=0A5C, PID=6410) you can see that it is configured to use the BCM20703A1 firmware pkg.

Code:
        <key>0a5c_6410</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.no-one.BrcmPatchRAM2</string>
            <key>DisplayName</key>
            <string>Dell Wireless 1830 Bluetooth 4.1 LE</string>
            <key>FirmwareKey</key>
            <string>BCM20703A1_001.001.005.0214.0422_v4518</string>
            <key>IOClass</key>
            <string>BrcmPatchRAM2</string>
            <key>IOMatchCategory</key>
            <string>BrcmPatchRAM2</string>
            <key>IOProviderClass</key>
            <string>IOUSBHostDevice</string>
            <key>idProduct</key>
            <integer>25616</integer>
            <key>idVendor</key>
            <integer>2652</integer>
        </dict>


To confirm I checked on my HP Spectre X360 which has DW 18030 Combo card installed
Checking the output of the BrcmFirmwareRepo kext I get the same message as you :-

kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Loaded firmware "BCM20703A1_001.001.005.0214.0422_v4518.zhx" from resources.
kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Decompressed firmware (43444 bytes --> 109080 bytes).
kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Firmware is valid IntelHex firmware.


And Checking the output of the BrcmPatchRAM2 kext shows that the BCM20703A1 firmware loaded ok

kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Version 2.2.10 starting on OS X Darwin 18.7.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Unknown new Darwin version 18.7, using possible compatible personality.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Published new IOKit personality for BrcmFirmwareStore.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Published new IOKit personality for BrcmPatchRAMResidency.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: USB [48E244F4CA5C v274] "BCM2045A0" by "Broadcom Corp"
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade completed successfully.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: Published new IOKit personality.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Processing time 1.819 seconds.


You can use the following terminal commands to check the output of the BT kexts like above :-

Code:
log show --predicate "processID == 0" --last boot | grep "BrcmFirmwareRepo"
log show --predicate "processID == 0" --last boot | grep "BrcmPatchRAM2"


On a Cold Boot (Power On) you should see the BT kexts upload the BT firmware into the device as can be seen with the message "BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade completed successfully." in the output of BrcmPatchRAM2,

On a Warm Boot (Reboot) the BT kexts will not load the BT firmware as it should already be loaded, in this case you should see "BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade not needed." in the output for BrcmPatchRAM2.

Usually the BT firmware is only cleared when the laptop/PC is powered down, this can be confirmed by running the above commands after a cold boot and a reboot.

So I hope you can now see that the issue is not with the BT kexts, they have the correct PID|VID definition and associated Firmware for DW 1830. I'm not sure what your issue is but running the above commands for a cold boot and a warm boot and comparing the output would be where I would start.

See @RehabMan's git project page for full details of the BT firmware upload kexts :-



There are a few boot arguments that you could try ....

Cheers
Jay
 
Last edited:
@Mrgeque,

You do not need to change or add anything as the BCM2045A0 controller uses the BCM20703A1 Firmware pkg.

If you look at the info.plist for the BrcmPatchRAM2 kext and find the matching VID|PID for the BCM2045A0 controller (VID=0A5C, PID=6410) you can see that it is configured to use the BCM20703A1 firmware pkg.

Code:
        <key>0a5c_6410</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.no-one.BrcmPatchRAM2</string>
            <key>DisplayName</key>
            <string>Dell Wireless 1830 Bluetooth 4.1 LE</string>
            <key>FirmwareKey</key>
            <string>BCM20703A1_001.001.005.0214.0422_v4518</string>
            <key>IOClass</key>
            <string>BrcmPatchRAM2</string>
            <key>IOMatchCategory</key>
            <string>BrcmPatchRAM2</string>
            <key>IOProviderClass</key>
            <string>IOUSBHostDevice</string>
            <key>idProduct</key>
            <integer>25616</integer>
            <key>idVendor</key>
            <integer>2652</integer>
        </dict>


To confirm I checked on my HP Spectre X360 which has DW 18030 Combo card installed
Checking the output of the BrcmFirmwareRepo kext I get the same message as you :-

kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Loaded firmware "BCM20703A1_001.001.005.0214.0422_v4518.zhx" from resources.
kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Decompressed firmware (43444 bytes --> 109080 bytes).
kernel: (BrcmFirmwareRepo) BrcmPatchRAM: Firmware is valid IntelHex firmware.


And Checking the output of the BrcmPatchRAM2 kext shows that the BCM20703A1 firmware loaded ok

kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Version 2.2.10 starting on OS X Darwin 18.7.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Unknown new Darwin version 18.7, using possible compatible personality.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Published new IOKit personality for BrcmFirmwareStore.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Published new IOKit personality for BrcmPatchRAMResidency.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: USB [48E244F4CA5C v274] "BCM2045A0" by "Broadcom Corp"
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade completed successfully.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: [0a5c:6410]: Published new IOKit personality.
kernel: (BrcmPatchRAM2) BrcmPatchRAM2: Processing time 1.819 seconds.


You can use the following terminal commands to check the output of the BT kexts like above :-

Code:
log show --predicate "processID == 0" --last boot | grep "BrcmFirmwareRepo"
log show --predicate "processID == 0" --last boot | grep "BrcmPatchRAM2"


On a Cold Boot (Power On) you should see the BT kexts upload the BT firmware into the device as can be seen with the message "BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade completed successfully." in the output of BrcmPatchRAM2,

On a Warm Boot (Reboot) the BT kexts will not load the BT firmware as it should already be loaded, in this case you should see "BrcmPatchRAM2: [0a5c:6410]: Firmware upgrade not needed." in the output for BrcmPatchRAM2.

Usually the BT firmware is only cleared when the laptop/PC is powered down, this can be confirmed by running the above commands after a cold boot and a reboot.

So I hope you can now see that the issue is not with the BT kexts, they have the correct PID|VID definition and associated Firmware for DW 1830. I'm not sure what your issue is but running the above commands for a cold boot and a warm boot and comparing the output would be where I would start.

See @RehabMan's git project page for full details of the BT firmware upload kexts :-



There are a few boot arguments that you could try ....

Cheers
Jay
thanks for all of your USEFUL info as always my friend. after looking further into the issue, I noticed that the piece of tape I had covering wifi/bt disable lines had shifted so I replaced. problem solved. although the controller sometimes changes, only after restart. from cold boot good to go. but the actual bluetooth is working flawlessly even if the controller changes.
 
Hi Guys,

An update on WiFi & BT experiments ...

As i already posted i swapped out the intel WiFi/bT card in my 2017 15" HP Spectre X360 for BCM94352Z ... WiFi in OSX and linux worked perfect but in windows 10 the laptop would lock up as soon as i attempted to connect to a network .. it seems to be a very common issue with this card and windows 10 ...

Searching the internet results in lots of suggestions (mainly trying different driver versions) but after several attempts and god knows how many different driver versions .. i've given up trying to get the BCM94352Z card working in windows ... and yes i did try another BCM94352Z card but it resulted in the same issues.

So I dug deeper into the issue, after examining the ini install files it became clear that the driver is actually a repackaged BCM95342 mini PCIe Windows 7 driver and is not specific to the M.2 BCM95342Z version of the card or Windows 10. Examining the Windows event logs showed that the driver file bcmwl63a.sys was crashing when ever a badly timed interrupt occurred, I confirmed this using an oscilloscope on the interrupt line ... needless to say this is not good.

Additionally as i reported in the same post (and by others elsewhere) the BT USB device on the BCM94352Z would not always initialise correctly during POST resulting in it not being seen in windows or osx ... it was possible to get it to work but required a random number of reboots/sleep/wakes ... once it was seen by osx it worked fine ... even after sleep/wake ... but for me the BCM94352Z has not been an ideal solution especially with the windows wifi issues.

So time to look for a different solution ...

Despite warnings about it not being suitable for Lenovo and HP laptops I bought a Dell DW1830 on ebay for $25 ... this card has a BCM43602 PCI WiFi chipset and a BCM20450 USB bluetooth controller ... both of these chipsets (a variant of) are used on genuine Apple WiFi/BT cards so it should be much compatible if i can get it t work. Since this card is a 3x3 MIMO and supports three antenna's and the Spectre only has two i also purchased a suitable MHF-4 antenna ...

Its very important that if you install a wifi card that has more antenna connections than your system has physically that you install additional antenna's even if you can not locate the new antenna's in the same location as the original ones. Running a wifi card without all antennas connected could result in you burning out the radio transmitter on the card due to not enough load being placed and the transmitters radio amplifier thus causing it to run hot.

In my case i was unable to install an additional antenna in the laptops lid as the screen is bonded and i did not want to go through the potentially dangerous procedure of un-bonding and re-bonding the screen. The 15" X360 has some air inlet grills either side of the keyboard so i mounted mine in that area. Its not a perfect location as only a small amount of the antenna is able to access free air and thus effects its ability to pull in a signal but its better than nothing and ensures that the radio on the wifi card will not burn out.

Once the card and antenna was delivered i installed them in the X360, powered up and was disappointed to see that the WiFi (pci) part of the card was not detected in any OS (Windows/OSX/Linux) ....

Then i remembered an old trick some users have to do with the BCM94352Z so i masked pins 56 & 54 (BT & WiFi disable lines) .. and tried again ... booting into windows and checking device manager showed that the card was now detected so I went ahead and installed the latest Dell DW1830 WiFi and BT drivers, both installed fine and the card came on-line with no crashes or lock ups ... I gave it a good test for an hour or so and all was good.

Note: the DW1830 is missing pin 50 unlike the BCM94352Z so its a group of three pins not four as shown in the linked guide.

Reading up on the DW1830 on this site seems to state that it should work OOB .... so i booted into OSX (10.12.6) in safe mode and removed all the fixes for the BCM94352Z (fakepciXXX, BCMpatchram, clover patches .. etc) and rebooted ..

Sure enough WiFI was detected (both 2.4Ghz & 5Ghz) and i was able to connect to my 5Ghz wireless network ... all be it at a slower speed of 450mbs compared to the 878Mbs i got with the BCM94352Z ... also no BT.

So I reinstalled BCMPatchRam2 & the repo kexts ... rebooted and BT was detected and working. Having now tested BT extensively i can say that this is the best BT support i've seen in a hackingtosh ... the BCM20450 BT controller supports LMP4.1 which is natively supported by OSX 10.12.XX .. i've seen no problems so far with handoff or airdrop.

Checking sys info showed that the WiFi card was being identified as 3rd party ... i checked the info.plist in RehabMans FakePCIID_Broadcom_WiFi.kext which indeed showed that it supports my cards id's (14E4/43BA) so i reinstalled it along with FakePCIID.kext .. once the kext cache sorted itself out the card was identified as Apple AirPort Extreme (0x14E4, 0x24)

The speed cap of 450Mbs indicated to me that that the card was probably only running in the 20/40 frequency band and not using the full 20/40/80 range of the card .. I've seen this issue before with my old Sony Vaio Hackingtosh which was resolved by changing the county code to '#a' (see the airport guide) so i applied the patch via Clover and rebooted.

As suspected it worked and my WiFi speed was back to 878Mbs, so now everything was working great in Windows and OSX and it was time to attack Linux.

Booting into Linux (I use Mint 18) the BT was detected straight away .. however it took some digging to get the WiFI working, it turned out the bcm firmware for the DW1830 in my kernel version (4.8) did not support the 14E4/43BA device. The solution was to to update the file brcmfmac43602-pcie.bin in /lib/firmware/brcm with this version and reboot, the new card was detected immediately by the brcmfmac framework and the correct kernel driver automatically loaded without any further intervention.

Summary:

All in all swapping out the BCM94352Z for the DW1830 has been a big step forward for me ... I now have working WiFi (2.4Ghz & 5Ghz 802.11 AC) and BT4.1 in all OS's and i can now put WiFi and BT to bed.

In my opinion the DW1830 ( BCM43602 / BCM20450 combo) is a far superior card to the BCM94352Z ... this might not be true for all cases and will depend largely on if you can get your desktop/laptop to see the card on the PCI bus, but if it does you will see much better WiFi performance and far more stable BT support in any OS.

If your already running a BCM94352Z that is installed correctly you should only need to disable the 'fvco' and BT handoff Clover patches, if your not getting full 5Ghz AC WiFi speeds use the #a country code patch.

Just thought i'd share what i've leant so far with this card.

Cheers
Jay

Update-1: Since posting the above i've now noticed WiFi issues after sleep, please see this thread for more info and workaround.

Update-2: After updating to High Sierra 10.13.6 i had a few issues with Hand Off & Continuity ... turns out this is a known issue as the Clover Continuity binary patch method no longer works in 10.13.6. The Solution that worked for me was as follows:-

1. Remove FakePCIID_Broadcom_WiFi.kext ( also FakePCIID.kext if not using any other of Rehabman's FakeXXXX.kexts)
2. Install AirportBrcmFixup.kext (also requires latest Lilu.kext if not already installed)
3. Remove All Clover WiFi & BT Patches from config.plist
4. Ensure you have BrcmPatchRAM2.kext and BrcmFirmwareRepo.kext kext Installed

As an added bonus using this method I no longer have the issue with poor WiFi bit-rates after Sleep/Wake so no need for the workaround detailed in Update-1. I believe that the AirportBrcmFixup kext does a much better and more complete card initialisation with the DW1830 than other methods as well as patching MacOS.

Note: All Kext's should be installed in /L/E for MacOS 10.12.X and above, see this guide for more info :-


Update-3: As reported by @sparc1234 in this post, it seems that disabling "Wake On Magic Packet" and "Wake on Pattern Match" can resolve the badly timed interrupt that I reported above and stop Windows 10 from crashing when using a DW1560 combo card.

Update-4: If you have issues with Handoff and/or Continuity then install BT4LEContinuityFixup which is another Lilu plugin, for more info on Lilu, AirportBrcmFixup and BT4LEContinuityFixup see this guide :-

Is there any update for BCM94352Z to have wifi on windows?
 
Is there any update for BCM94352Z to have wifi on windows?


@crazyi,

I haven't used BCM94352Z (DW 1560 combo card in a very long time ... however i believe that the Windows 10 crash can be resolved by disabling "Wake On Magic Packet" and "Wake on Pattern Match" as I noted in the Update 3 Note at the very end of my post :-



If you follow the link in that note and read the subsequent posts .. many users confirmed that disabling "Wake On Magic Packet" and "Wake on Pattern Match" resolved the Windows 10 crashes.

Cheers
Jay
 
Last edited:
@crazyi,

I haven't used BCM94352Z (DW 1560 combo card in a very long time ... however i believe that the Windows 10 crash can be resolved by disabling "Wake On Magic Packet" and "Wake on Pattern Match" as I noted in the Update 3 Note at the very end of my post :-



If you follow the link in that note and read the subsequent posts .. many users confirmed that disabling "Wake On Magic Packet" and "Wake on Pattern Match" resolved the Windows 10 crashes.

Cheers
Jay

Thank you very much for your help, I will have a try with you mentionde above

BTW, here is someone solve the problem on Ubuntu (https://www.insanelymac.com/forum/topic/307738-bcm94352-working-in-osx-but-not-in-windowsoo/?page=2), simply add pci=irqpoll in the grub (or you preferred bootloader) kernel line.

Maybe it is the same issue for windows? I have no idea how to confirm this.
 
BTW, here is someone solve the problem on Ubuntu (https://www.insanelymac.com/forum/topic/307738-bcm94352-working-in-osx-but-not-in-windowsoo/?page=2), simply add pci=irqpoll in the grub (or you preferred bootloader) kernel line.

Maybe it is the same issue for windows? I have no idea how to confirm this.


@crazyi,

As I wrote in my article after much debugging I found that the issue was related to an unresolved interrupt that crashes the windows driver for the BCM94352Z (DW1560) combo card.

The linux "irqpoll" configuration parameter is a work around for handling unresolved interrupts on linux due to badly behaved hardware/firmware so it make sense that it would help with the issue.

Try the windows fix i linked you to ... from what i've read it should help as long as you have the right drivers installed.

Cheers
Jay
 
@crazyi,

As I wrote in my article after much debugging I found that the issue was related to an unresolved interrupt that crashes the windows driver for the BCM94352Z (DW1560) combo card.

The linux "irqpoll" configuration parameter is a work around for handling unresolved interrupts on linux due to badly behaved hardware/firmware so it make sense that it would help with the issue.

Try the windows fix i linked you to ... from what i've read it should help as long as you have the right drivers installed.

Cheers
Jay
Thank you very much for your help and I will have a try with your advice.
 
@crazyi,

As I wrote in my article after much debugging I found that the issue was related to an unresolved interrupt that crashes the windows driver for the BCM94352Z (DW1560) combo card.

The linux "irqpoll" configuration parameter is a work around for handling unresolved interrupts on linux due to badly behaved hardware/firmware so it make sense that it would help with the issue.

Try the windows fix i linked you to ... from what i've read it should help as long as you have the right drivers installed.

Cheers
Jay
hey bro can you please share your efi folder for hp spectre x360. Thank you
 
Status
Not open for further replies.
Back
Top