Wi-Fi isn’t the same in every country. Regulatory agencies in countries around the world limit Wi-Fi to different parts of the radio frequency spectrum. Some routers broadcast the countries they think they’re in.
The Wireless Diagnostics utility on Mac OS X shows you an error message if there are “conflicting country codes” nearby. Not every router broadcasts these details, but a misconfigured router can cause problems.
Finding Conflicting Country Codes
To determine whether there are conflicting country codes in an area on your Mac, hold the Option key, click the Wi-Fi icon on the top bar, and select “Open Wireless Diagnostics.” Go through the wizard, which will scan your area and alert you to things you can do to improve your Wi-Fi.
At the end of the process, you’ll see “Conflicting Country Codes” in the summary. This indicates there are wireless routers with two different country codes nearby. Either there’s a misconfigured router, or you’re almost exactly on the border between two different countries!
Why Conflicting Country Codes Are a Problem
Some routers broadcast country codes using the 802.11d standard. This informs nearby Wi-Fi-enabled devices — like your MacBook — which country they’re in and which Wi-Fi settings they should use. For example, in our example below, we have a nearby rogue router with a TW country code, which conflicts with other routers and their US country codes.
This can confuse your Mac. When it wakes up, it scans for nearby Wi-Fi networks and the country code information tells the Mac which Wi-Fi settings it should use for this area. It appears that the Mac uses the country code from the first network it finds broadcasting this information. If you’re in one country and there’s a router with another country’s code nearby, your Mac may think your’e in that country, use those Wi-Fi settings, and have problems connecting to wireless networks using the proper settings for the country you’re actually in.
Apple’s information dialog here indicates that “this may prevent your Mac from automatically re-joining a previously joined Wi-Fi network.” It also says using a wireless router in a country it wasn’t designed for “can result in performance and reliability issues for nearby Wi-Fi clients.” Ideally, you could configure your Mac to ignore these conflicting details and tell it which country you’re in — but you can’t.
Identifying the Problem Network
To identify the router with a conflicting country code, click the Window menu in the Wireless Diagnostics application and select Scan.
You’ll see a list of nearby Wi-Fi networks. Glance at the “Country” column to find the one router broadcasting an incorrect country code. You can get the name of the router’s wireless network from the “Network Name” column, and that will tell you which router is broadcasting the incorrect country code.
Fixing the Problem
Unfortunately, there doesn’t seem to be a way to force your Mac to listen to only a specific country code. There’s no clear way to prefer a particular country code when multiple ones are nearby. The only real solution is to locate the offending wireless router and either change its country code or replace it with a router that’s properly configured to operate in your current country.
This may be a problem. Unless the router belongs to you or someone else you know, there may not be much you can do about this. You could walk around with your laptop or phone, looking for where the signal appears strongest and knocking on your neighbors’ doors to locate the rogue Wi-Fi network and ask your neighbor to fix it. It sounds like a ridiculous solution, but that’s what Apple recommends — as the Wi-Fi Diagnostics app says, you should “contact the network owner to resolve the problem.” It’s not an easy solution, or even a realistic one in many situations, but it’s the only one that will work.
A nearby router broadcasting an incorrect code may be operating on unlicensed frequencies, and this may actually be a violation of applicable regulations and laws. In the US, the person operating the router may be violating federal telecomunications law. But don’t expect the government to come down on your neighbors’ foreign router unless it’s causing serious problems — for example, interfering with emergency communication frequencies.
Routers broadcast this information using the 802.11d standard. It doesn’t seem possible to disable 802.11d on a Mac, so there’s really no way around this short of questionable solutions like modifying your Mac’s network driver file. We didn’t try this particular solution — it’s an example of the lengths you’ve had to go to prevent your Mac from obeying these inaccurate codes.
If you have actual Wi-Fi problems in a given area on your Mac, getting rid of that rogue router may be the only solution that will work. You could also try improving your own Wi-Fi signal, and your Mac may first see your own Wi-Fi network instead of the conflicting one when it powers on.
Image Credit: Alessio Maffels on Flickr