Contribute
Register

Country Code Patch for High Sierra

Status
Not open for further replies.
How to understand above?? Would you please tell me in details.

Another question:
I've changed country code successfully, but the location is "Unknown" as fontanero. Is it right value?? If not, how to change it? What is the value for it??

@yekki,

If you changed the country code to #a then there is no location associated with it, hence the reason its listed as unknown, the cc code of #a is a special code that by-passes wifi channel regulation in certain countries and thus it enables you to achieve 5ghz wifi connectivity on miss matched wifi router and wifi radio card.

For example most 3rd party wifi cards purchased from china will usual ship with a wifi cc code that is different to the wifi cc code used by your router. As most countries regulate which wifi channels can be used its quite likely that that you end up with miss matched wifi standards ... A lot depends on the router brand, firmware .. etc .. and since most routers do not allow the end user to change the routers cc code (due to local radio channel regulations) changing it at the client end is one way of negating the problem.

See following post for more information :-

https://www.tonymacx86.com/threads/guide-airport-pcie-half-mini-v2.104850/page-209

Cheers
Jay
 
Hi all. Sorry to come across as completely ignorant but I stumbled upon this thread while trying to solve an incredibly irritating issue with High Sierra and have been having difficulties implementing the suggestions.

I'm using a MBA 2014 model and I have found that in my apartment block there are some people with their routers set to a US country code which I can do nothing about. When the MBA detects their signal it sets itself to a US country code and stops looking for my network which is on CH 13. I have to keep my network on 13 because of congestion in the block. Other channels are just completely unreliable at certain times of the day.

When I found this thread I assumed that it was the answer I was looking for; a way to binary patch the network driver to force it into always thinking that it is in a certain country thereby effectively disabling 802.11d. I disabled SIP and edited the AirPortBrcmNIC driver at the location specified by using HEXFiend (leaving the country code set to #a) and after a restart I had high hopes that my card would always enable CH13 regardless of the channels that were being broadcast around it. To my disappointment I found that nothing had changed.

I then executed the command sudo touch /System/Library/Extensions/ after the HEX edit was done and this seemed to have an impact but just not the desired one. After the next restart the wireless driver changed to Brcm-MFG which I understand to be a debug driver (my understanding may be completely out so please correct me if I'm wrong) and the card still changes its country code to whatever it sees around it. I then decided to change the MFG driver too using the same process only this time no wireless hardware was detected after a restart.

After reverting both drivers back to their original states the WiFi hardware could be detected again but the MFG driver was still being used.

So my questions are these:

1.) Am I even on the right path here? With this patch the country code on my card so that it does not ignore CH12 and 13 even if there are US networks broadcasting around me.

2.) If I am on the right path then does anyone know why it never worked when I replaced 4183FCFF 7435488D 55D0 with 66C70623 61EB348D 55D0? Should I try the kext option? I honestly don't even know where to begin with that and it looks as if it may be more of a hackintosh thing than something for a macbook but if it is the way to go then I'm willing to try and work my way through it.

Thanks to any kind person who has the knowledge and is willing to help.
 
Someone...anyone...
I think you should try any of the two solutions mentioned here: direct patch on kext using clover/kextstopatch or Lilu.kext + AirportBrcmFixup.kext. Setting your country code to #a should enable all the wifi channels you need after sleep.
#a is the "super country code"
 
Comment: Country Code Patch (#a) - Credit PMheart
MatchOS: 10.13.x
Name: com.apple.driver.AirPort.BrcmNIC
Find: <4183FCFF 7435488D 55D0>
Replace: <66C70623 61EB348D 55D0>


Just change 23 61 to your country. Mine is 42 52 for BR.
The default (#a) is a generic one.


Can anybody tell how PMHeart would have gone about finding the patch?

1. how do you decompile an .efi file?
3. what did PMHeart look for in the code?
2. what does the hex change exactly do to the code?


Just out of interest.
 
Can anybody tell how PMHeart would have gone about finding the patch?

1. how do you decompile an .efi file?
3. what did PMHeart look for in the code?
2. what does the hex change exactly do to the code?


Just out of interest.

You can disassemble a kext binary with otool.
Assuming you have Xcode installed...
eg.
Code:
otool -tVj /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortBrcmNIC.kext/Contents/MacOS/AirPortBrcmNIC >AirPortBrcmNIC.s
open AirPortBrcmNIC.s
 
You can disassemble a kext binary with otool.
Assuming you have Xcode installed...
eg.
Code:
otool -tVj /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortBrcmNIC.kext/Contents/MacOS/AirPortBrcmNIC >AirPortBrcmNIC.s
open AirPortBrcmNIC.s
Thanks!

Btw
Sorry was mixing up file extensions.
Was viewing a post somewhere else - also about a patch /hex replacement but for apfs.efi for the verbose log suppress at the start.

And was also wondering how they were able to find out/ and what the hex replacement code stands for in that case.
But will ask question in that particular forum post.

(It is pretty obvious what the hex code replacement does in the country patch LOL ! )





.
 
Sorry for being off-topic , but I have a Broadcom BCM94352hmb card bought from China. The card was using US code and not EU code , so I was not able to connect to channels 12 and 13 in my country.
In High Sierra , I'm using the above suggestions (#a) and it works fine.
Does anyone know if there is such a patch for windows 10 , too (I have double boot) ?
Thanks.
 
There is not such option...
 
Is there a new "Country patch for Mojave?
I'm using a TP-Link TL-WDN4800 (Atheros 9380: 4.0.74.0-P2P) after copying the old AirPortAtheros40.kext in Mojave S/L/E the card is working but "unknow locale".
Looks like the Lilu+AirportBrcmFixup.kext and the boot argument brcmfx-country=FR is not working for my Wifi card.
here's my old "High Sierra" clover AirPort.Atheros40 patches:

Code:
<key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Replace iMac12,2 with iMac13,2</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                aU1hYzEyLDIK
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>com.apple.driver.AirPort.Atheros40</string>
                <key>Replace</key>
                <data>
                aU1hYzEzLDIK
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Change regdomain to US-FCC (1 of 2)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                g7sgCAAABnRk
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x,10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.AirPort.Atheros40</string>
                <key>Replace</key>
                <data>
                g7sgCAAABus2
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Change regdomain to US-FCC (2 of 2)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                ZseDFgkAAEMAZrhDAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>com.apple.driver.AirPort.Atheros40</string>
                <key>Replace</key>
                <data>
                ZseDFgkAAAAAZrgAAA==
                </data>
            </dict>
 
Status
Not open for further replies.
Back
Top