daliansky / XiaoMi-Pro-Hackintosh

XiaoMi NoteBook Pro Hackintosh
BSD Zero Clause License
2.61k stars 474 forks source link

activate the handoff and continuity feature? #29

Closed macguru341 closed 6 years ago

macguru341 commented 6 years ago

Finally my Bluetooth is working fine and I have my Magic Mouse 2 works but I don’t have the handoff and continuity feature in the settings , why is that? I’m using a 4.0 Bluetooth dongle that was recommended for hackinrosh .

stevezhengshiqi commented 6 years ago

To open Handoff and continuity feature, you need an internal wireless card + Bluetooth dongle. A USB Wireless card is not supported though you have a Bluetooth dongle. This is a screenshot of my device which has handoff function. screen shot 2018-05-20 at 01 38 11

ghost commented 6 years ago

Well this may be fixed with custom low-profile M.2 Key M > Key A adapter with additional USB cable, but as far as I know they're not exist. More information on tonymacx86 or hackintosh-forum.de. For now I'm not buying internal wifi + adapter as I hope there will be new adapter with Broadcom bluetooth working

influenist commented 6 years ago

Hi,

Internal wifi is fixed for Xiaomi Pro and probably also Notebook Air 12.5 / 13.3. I'll update during one of these days the forum post on HF.de. Are you located in Poland @PavelLJ if so PM me for Skype or QQ.

@daliansky I'm building a similar ACHI hotpatch build work is 75% done. Might you be able to add it to your clover configurator to widen XioaMi support?

ghost commented 6 years ago

@influenist I'm from Belarus, BTW less than 100km from Poland. Did you meant Broadcom Key M > A/E stuff or Intel wireless? Dialinsky is quite busy now, I think you should contact with @stevezhengshiqi for pull requests.

stevezhengshiqi commented 6 years ago

@influenist Please see my screenshot. I am a living example of people who have handoff open. This is my notebook internal structure. As I said, you need an internal wifi adapter to let handoff work. img_0488

ghost commented 6 years ago

@stevezhengshiqi what kind of port is under WLAN_LTE? I'm pretty sure it's pinned and can be used for WiFi+BT, but I can't understand is it key B, or A, or E?

stevezhengshiqi commented 6 years ago

@PavelLJ I really know a little about WLAN_LTE port. Staffs at here said the port is not opened in BIOS. However, some people successfully soldered the bluetooth on that port.

influenist commented 6 years ago

Hey @stevezhengshiqi this is the adapter from our friends Wxxtfu, correct? Did you solder the BT ports on the LTE slot pin 4 and 6 like below?

e6b2a1bbf46b818129eeaedd88e889fb

I currently have M.2 key to key B with an A+B key, which looks like below. Hence I didn't test it with my current clover build for Mi NB Air 12.5. Only issue is form height size.

img_20180524_155558_hht

I received the Mi NB Pro yesterday. Need to see if the Webcam header (pinout) is the same, to see if we can USB lanes an exclude soldering.

influenist commented 6 years ago

@stevezhengshiqi see my message on Gitter.

stevezhengshiqi commented 6 years ago

@influenist The one I said

some people successfully soldered the bluetooth on that port.

is exactly the guy who solder the BT ports on the LTE slot pin 4 and 6 in your picture. What's more, the screenshot you give is shotted by him. We discussed a lot and I found that it's high-risky and skill-required to solder the BT. So I give up and use USB BT.

influenist commented 6 years ago

@stevezhengshiqi true, hence I got in touch with them for the following less-risky option: Theoretically the webcam port offers the needed USB lanes. Hence a splitter cable for this port could work. Do you have a picture from the webcam port on NB Pro? Is it identical to the on below?

img_20180524_165124

img_20180524_165156

influenist commented 6 years ago

@PavelLJ you live in Lviv perhaps? Regarding your comment, if there is a soldered port there at the LTE location, it would be a KEY B. And from second rev. the blanked out this port. Also till this moment I haven't seen any M.2 key B to Key M.2 A+E converter cards. The one @stevezhengshiqi is using is a Key M to an for me unknown form factor.

@stevezhengshiqi did you need to use a PCI hotpatch (acpi) to enable the card? Seen there is a SSDT-PCIList.aml?

ghost commented 6 years ago

@influenist 1) Belarus isn't Ukraine, btw I'm in Minsk but sometimes I can be at Dnepr or Kiev. 2) Are you sure it's key A? Quite unsure about that, there are LTE modems with Key B, but if it's key A it would be very easy to make this work on BCM84352Z

3)Stevezhengshiqi uses Key M > Key A or Key E 4) PCIList is just for beauty purposes and not actually injecting anything.

influenist commented 6 years ago

@PavelLJ updated my comment just before. Sorry about the country mixup. Im from NL (Amsterdam) myself but live now 5 years in Warsaw. LTE is m.2 key B. offers all the lanes which we need, and if you are lucky, the port is still there in your NB Pro. Newer rev do not have the port.

I'm sure the port is not M.2 as you can see here. Also not mini pci-e. See: 11c0694433e7a38fde53b08e0a62ee47

ghost commented 6 years ago

and if you are lucky, the port is still there in your NB Pro.

God, don't know about that. Still didn't disassembled mine as there is no need for that at the moment. I'm afraid I should check LTE port before I actually buy something.

Sorry about the country mixup. Im from NL (Amsterdam) myself but live now 5 years in Warsaw

Hey, all is ok :) Warsaw is great!

I'm sure the port is not M.2 as you can see here. Also not mini pci-e. See:

What the hell that port is then? My guess it's mPCIe, but idk, you should check that under Linux. I'm very interested in key B as of PCI-SIG specs (search m.2 on page) there is PCIe and USB, logic ports that are needed for WiFi+BT. There is a problem, PCIe lanes on laptops are not infinite, and Key B port specs is up to vendor as documentation says, so maybe it was disabled to give M.2 key M 4xPCIe logic lanes. We need investigate that a lot deeper, it's very interesting! P.S am I understanding all right, these photos you posted is Mi Notebook Pro, not Air? P.P.S we need to investigate on BIOS, I guess we can change rewrite bit in NVRAM as it was with Mi Air 12,5, check XDA for that.

stevezhengshiqi commented 6 years ago

@influenist That will be really nice if a splitter cable can work. I will check my computer 8 hours later since I left it home.

ghost commented 6 years ago

@influenist Found that strange type of connector, it's 12+6 (also known as 18pin), here's the adapter. Now I hope I got 18pin and not WLAN_LTE lol

influenist commented 6 years ago

@PavelLJ please see @stevezhengshiqi his post.

In NB Pro and NB Air there is a M.2 key M PCI slot, which is intended to use for NVME SSD. Seen Key M.2 uses PCI lanes you could use it to connect a module. The adapter from Wdxxfu transforms this to the (18 pin) form factor (Apple module I guess) shown in my previous picture. Hence there is one problem. M.2 Key M does not have USB lanes which is needed BT. Therefor the adapter needs to connect on a different port. Some people did successfully used the port M.2 Key B (NB Pro second revision does come without this slot but lanes n.b. USB are still connected to the bus) to solder the module from Wdxxfu to have internal BT working.

@daliansky could we setup a Gitter room for talks like these?

ghost commented 6 years ago

@influenist I knew that, there was misunderstood about second revision, I thought there is 18pin in second revision but as you declared that's an adapter, now I understand. I try to find the way to fully use WLAN_LTE port, even without knowing about presence of it in my laptop. If there wouldn't be one, I'll buy Key M > Key A and will play around splitter for internal BT, but now I hope I have WLAN_LTE (Key B) with USB and PCIe, and then I'll try to make an adapter Key B > Key A/E

stevezhengshiqi commented 6 years ago

@influenist It’s exactly the same. Could you sent me the link of the splitter cable? I want a relaible one. Thank you for giving us this idea.

influenist commented 6 years ago

@PavelLJ the M.2 Key M to M.2 Key A+E does not work. So save your money

@stevezhengshiqi there is not just a "splitter cable" available. We need to make a pin-out of this connector to determine which pins we need to use.

// Off topic @daliansky @stevezhengshiqi I just added my Git repo. Which is quiete similar to your build. As my intention is to make an effort for wide MacOS support on Xiaomi Mi laptop series (Notebook and Gaming). Lets discuss on gitter, wechat or skype how we can merge the projects and kick of further to support Air 13.3 and gaming latop? My repo: https://github.com/influenist/Mi-NB-Gaming-Laptop-MacOS

stevezhengshiqi commented 6 years ago

@influenist Good idea. Personally, I recommend to open a new branch for other devices since Air has some different methods and devices in DSDT. For example, in Xiaomi Air 6500u's DSDT, there's an embedded control(EC), which Pro does not have. So in the config.plist, we need to rename EC0 for Air 6500u.

I also prefer "clean install", meaning that all the hotpatches and renames are useful. If more hotpatches are merged, the EFI folder may become "gross". So I think a new branch is better.

influenist commented 6 years ago

Hi @stevezhengshiqi true, yet combining it in one project you would still be able to have separate builds. I was thinking of an EFI per device. This way you will not have "one fits all" yet having all builds from one project source. Thats why I structured my project into device names. E.g. Mi-NB-Pro-156-CPUname / Mi-NB-Air-125-CPUname. This way you could specific target each configuration with a hotpatch build.

ghost commented 6 years ago

Hey guys, today I was bored as I needed to prepare for exams, so I did anything not to prepare for exams. Nevermind. I played around UEFI BIOS today and got interesting results. Here is the list of hidden variables that can be installed via H20 UEFI Variable Editor (H2OVUE), see attachment. Full PCIe settings (the most interesting is about WWAN port settings and Key M port lanes settings), fan control, undervolting and a lot, lot more... Here you go. IFR.txt BTW it's just a list of variables, for successfully change it you need to rewrite NVRAM dump via H2OUVE, for this you need the dump itself. I'll attach the original one. vars.txt P.S Remember, that is HEX value and it should be changed properly. On that step your help is really appreciated as I don't have much time now, so I'll describe some things for better understanding of that experiements. 0) You need to download BIOS file that matches one currently installed on your laptop. 1)Download some utilities from BIOS-MODS H2OUVE, PhoenixTool and UniversalIFRExtractor 2)Unarchive all the stuff in convenient way 3)Open BIOS file (XMAKB5R0P0502.bin in my case) in PhoenixTool, you may close the program after success message as we need only DUMP. 4)Open folder with BIOS, DUMP folder should appear. There is a lot of files (UEFI modules\add-ons), the biggest one (around 4MB) is Setup, the one we need. It have name staring from "FE3542FE-C1D3" 5)Open this file in Universal IFR Extractor and process it, save the data file somewhere. 6)Open command line as Administrator, cd to the H2OUVE folder and type: H2OUVE.exe -gv vars.txt -n Setup 7) You'll get the vocabulary (lol, I mean the file with meaning of every Setup variable), and the NVRAM dump which you can edit and write into NVRAM. It's not as unsafe as BIOS Modding and flashing because you can do EC Reset (disconnect battery and wait for 3-10 mins) to reset the settings to default if something will go wrong. By the way idea was seen in Xiaomi Air 13 XDA thread, one man found the bit that disables rewrite lock so he can modify BIOS as he want (I recommend you to read first post, it's quite interesting). It's not interesting for me now but I need to say their patch is not working for us - BIOS is slightly different. So, as I'll receive the answer about how he found right setting we can mod our BIOS too which opens big possibilities (such as fully disabling NVidia without SSDT crap) P.S I know it's kinda offtopic but lol, who cares. On some parts it's touching WLAN_LTE port so it can live here 🤣

influenist commented 6 years ago

@PavelLJ interesting indeed, yet playing around with BIOS overrides might also brick the laptop. In some cases I can understand people wish to have dual-boot for which you want the onboard Nvidea controller working and not have it disabled.

To all. I updated my post on HF.de. Your input on the pin-out is much appreciated. Please see: https://www.hackintosh-forum.de/index.php/Thread/36796-M-2-key-M-to-M-2-key-A-E-for-WIFI-BT-adapter/?postID=416950#post416950

influenist commented 6 years ago

Update on the wifi module:

At this point we need to figure out which color is D+ and which color is D-. After the module should work by connecting to this interface. Wdxxfu has already the connector in stock, so only the color / pin for D+ and D- are important.

D+ and D- needed to determined by a multimeter.

Has anyone has knowledge on this matter?

ghost commented 6 years ago

@influenist Any updates on this? Maybe I'll disassemble my laptop tomorrow or so, so I can do something you need. What exactly I need to check?

stevezhengshiqi commented 6 years ago

Finally, I successfully solder my BT to WLAN pin 4 and 5. Pin 4 is D+ and Pin 5 is D-. I tried several times; and it is really difficult for a new beginner like me. img_20180531_190259 img_20180531_190317

ghost commented 6 years ago

@stevezhengshiqi impressive! Any thought about Key.A/E+USB low profile adapter? CS2 is 12+6 pin connector WiFi+BT card used in MacBook Air 2013 and may be dropped quite soon... What about performance? Bluetooth on CS2 is working out of the box? Where can I buy Wdxxfu's adapter? UPD: Nevermind, these are the questions: 1) Is this BCM94360CS2 and all is working out of the box? 2) When did you bought the laptop? I'm afraid there is no WLAN_LTE port on mine, still didn't checked. 3) Where can I contact with Wdxxfu? Is his adapter low-profile and fits under case without any problems?

stevezhengshiqi commented 6 years ago

Is this BCM94360CS2 and all is working out of the box?

Yes, it's BCM94360CS2 and Wi-Fi function is working perfectly. Currently, I am struggling with bluetooth because bluetooth won't work after sleep. Maybe it's due to my settings

When did you bought the laptop? I'm afraid there is no WLAN_LTE port on mine, still didn't checked.

I bought my laptop at Nov, 2017. All these laptops should have WLAN_LTE, no need to worry.

Where can I contact with Wdxxfu? Is his adapter low-profile and fits under case without any problems?

I use Taobao(https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6d3b2e8dK7sNkk&id=532197802538&_u=22diegp9f1ed) to connect him. He doesn't have ebay or amazon links. My adaptor have some problems about screw. In order to attach the adaptor reliably, I use one of the screw inside the laptop, which won't cause much negative effects.

UPDATE: @PavelLJ I noticed that I am using a BCM943602CS, not BCM94360CS2, but one of my friends' BCM94360CS2 works fine in High Sierra

ghost commented 6 years ago

Maybe it's due to my settings

My guess it's all about SSDT_UIAC port type, try to change it to internal.

All these laptops should have WLAN_LTE, no need to worry.

Ah okay, i thought there is some revisions of the laptop so i was little upset about it. Thanks for link! As far as I understood (my friend knows Chinese a bit) i need package three but it contains third antenna. Did you connect it and where you placed it?

stevezhengshiqi commented 6 years ago

Actually, when I bought the adaptor, there's no package three. What I am using now is package two. I have to ask seller for more information about third package.

UPDATE: Android File Transfer can also cause bluetooth sleep problems. After I uninstall it, everything is fine.

ghost commented 6 years ago

Android File Transfer can also cause bluetooth sleep problems.

LOL HOW? By the way, ordered the adapter, so I think i'll have native Wi-Fi+BT in three weeks or so.

stevezhengshiqi commented 6 years ago

LOL HOW? By the way, ordered the adapter, so I think i'll have native Wi-Fi+BT in three weeks or so.

Good for you. I corrected my USB settings and the problem didn't gone. Then I searched for a few posts and found this one https://www.tonymacx86.com/threads/bluetooth-bcm20702a0-problem-usb.185785/#post1200910 . So I tried and worked for me.

influenist commented 6 years ago

@stevezhengshiqi you need to DSDT patch ( hotpatch preferable in the acpi build) to disable your intel BT as per recommendations otherwise you will keep having BT issues.

stevezhengshiqi commented 6 years ago

@influenist I am pretty sure that I have done all these basic things. After removing Andriod File Transfer, my BT sleep problems never come back.

ghost commented 6 years ago

@stevezhengshiqi sorry, can I have full photo of how you placed the cables and third antenna (if you have it)? I got the adapter, but now I need to dance around BIOS a bit to rip off that ugly DVMT hack, so I have time to put cables right. Any suggestions?

stevezhengshiqi commented 6 years ago

@PavelLJ Sorry, I don't have a full photo, and I can't take picture of it since I am restricted in campus. I come back home in three weeks.

HINT: To make BT work, you need to solder the red cable to PIN4 and orange cable to PIN5.

stevezhengshiqi commented 6 years ago

@PavelLJ Finally, I have chance to take a photo of my device. Here it is. I know it's a little bit messy, which is not difficult to fix. photo

Delitants commented 6 years ago

If you use adapter like below, soldering BT pins to LTE socket DOESN'T ENABLE BT. Tested using Windows, no hardware detected, besides WiFi part! This adapter is missing something, probably it doesn't power up the BT chip. So don't waste your time. And the adapter from stevezhengshiqi's picture is not available for international buyers, some custom stuff made by some unknown Wdxxfu Studio (P.S: I mean, really? There is some people from US here too, please share the stuff from Amazon or AliExpress so anyone can access to buy it).

40491034-5a4f045a-5f6d-11e8-83fc-5326a100f92c

The only way to get a BT is to solder a separate compatible chip from any USB-nano dongle to LTE socket. So I did. Only low powered NANO BT USB, because LTE pins supply 3.3v only, regular USB requires 5v. I used a cheap dongle for 4 bucks, it has a compatible BT 4.0 BCM207025

ed_ew_7611ulb_3

img_5158

img_5111

img_5163

Delitants commented 6 years ago

However, LTE USB pins not getting detected in OSX, but Windows only. I believe it's something to do with Usbinjectall kext, needs to be customized or something. @stevezhengshiqi, how have you made those pins detected for BT? Is it USB 2.0 controller?

ghost commented 6 years ago

@Neolo LOL, I'm living in Belarus which is far more unreachable from China but I bought it from TaoBao without any problems at all. By the way I still didn't solderied bluetooth, my soldering instruments are too thick for that

Delitants commented 6 years ago

@PavelLJ, they don't ship to US. Yes, such a "lol". http://www.howtotao.com/china-taobao-prohibited-items/

screen shot 2018-08-02 at 6 05 03 am

I have a green M.2 converter from ebay, bought from Taiwan. Though, it does not provide BT even through soldering! >:-| Or it's because it converts to M.2 also and card is M.2. On his picture above, he uses mPCI-E card, could be using USB, but M.2 could be using UART or SDIO or something. Also who knows how that converter from taobao provides those USB pins, probably converts them somehow, not a direct connection from the card.

The only positive side in using green converter is that it takes no extra space and doesn't create a bulge on the lid.

Delitants commented 6 years ago

screen shot 2018-08-02 at 4 10 44 pm

Voila!

ghost commented 6 years ago

@Neolo by the way mine doesn't "make a bulge" too. Also, it uses 12+6(18pin) Apple WiFi card, it's not PCIe

Delitants commented 6 years ago

@PavelLJ it's UX21/UX31 18 pin blade connector. It's not something very apple.

2084800-5

shilch commented 5 years ago

Hey, can somebody give a quick summary of what to do to enable WIFI+BT on Xiaomi Notebook Pro?
I ordered one a few days ago an expect to receive it in a few weeks but would like to order all the pieces that I need to enable WIFI+BT (because shipping this hardware will take some time as well).

@stevezhengshiqi You said that you bought a BCM943602CS instead of a BCM94360CS2. What's the difference between the two? I know that the latter is the older chip but why is it still sold by the merchant on Taobao? Is there any advantage of using BCM94360CS2 over BCM943602CS?

So if I have received the adapter + chip, do I just need to plug it into the second M.2 slot, disconnect the cables from the Intel chip and connect it to the new chip, and solder the Bluetooth wires? Or is there more stuff to do?

Thank you in advance!

Recreabox commented 5 years ago

Like some people i ordered the green adapter like @Neolo and the DW1830A Chip (Wifi + Bluetooth). I don't tested yet cause i don't have the MHF4 cable yet.

But i have a question, if i buy the black adapter of @stevezhengshiqi will i be able to make works the bluetooth of my chip by soldering to the WLAN port ?