You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Wireless N and County Code mess with SL

It took me a while to find out what was causing my Wireless N connection problems using 10.5.8 Leopard, and now with Snow Leopard. It seems that somehow the Airport Card Country code (and therefore the supported channels and frequencies) changes with the associated MAC Address (or some other serial number that Apple can tell where the AP should be from) of the Connected Access Point. I know this because when my Airport is disconnected it shows me no Coutry Code. When I connect in my wi-fi college it shows me US country code, and at home (using a WRT610N), a different one that's unable to use wireless N frequencies. Am I the only one having this problem? I don't want to use Wireless G, and I have no idea how to fix this!

Here's what appears in my 17" mid-2009 MBP info:

PS: My WRT-610N is set to work with .N connections only, both 2.4 and 5GHz. So my MBP won't connect at home because the Country Code it sets doesn't support .N.

@ Home (WRT610N)

Software Versions:
Menu Extra: 6.0 (600.22)
configd plug-in: 6.0 (600.27)
System Profiler: 6.0 (600.9)
Network Preference: 6.0 (600.22)
AirPort Utility: 5.4.2 (542.23)
IO80211 Family: 3.0 (300.20)
Interfaces:
en1:
Card Type: AirPort Extreme (0x14E4, 0x8D)
Firmware Version: Broadcom BCM43xx 1.0 (5.10.91.19)
Locale: FCC
Country Code: ZW
Supported PHY Modes: 802.11 a/b/g
Supported Channels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
Wake On Wireless: Supported
Status: Not Associated

@ Airport without any wi-fi connection

Software Versions:
Menu Extra: 6.0 (600.22)
configd plug-in: 6.0 (600.27)
System Profiler: 6.0 (600.9)
Network Preference: 6.0 (600.22)
AirPort Utility: 5.4.2 (542.23)
IO80211 Family: 3.0 (300.20)
Interfaces:
en1:
Card Type: AirPort Extreme (0x14E4, 0x8D)
Firmware Version: Broadcom BCM43xx 1.0 (5.10.91.19)
Locale: FCC
Country Code: X0
Supported PHY Modes: 802.11 a/b/g/n
Supported Channels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165
Wake On Wireless: Supported
Status: Off

@ College

Software Versions:
Menu Extra: 6.0 (600.22)
configd plug-in: 6.0 (600.27)
System Profiler: 6.0 (600.9)
Network Preference: 6.0 (600.22)
AirPort Utility: 5.4.2 (542.23)
IO80211 Family: 3.0 (300.20)
Interfaces:
en1:
Card Type: AirPort Extreme (0x14E4, 0x8D)
Firmware Version: Broadcom BCM43xx 1.0 (5.10.91.19)
Locale: FCC
Country Code: US
Supported PHY Modes: 802.11 a/b/g/n
Supported Channels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165
Wake On Wireless: Supported
Status: Connected
Current Network Information:
USPnet:
PHY Mode: 802.11g
BSSID: 0:5:9e:8c:b4:ed
Channel: 6
Network Type: Infrastructure
Security: None
Signal / Noise: -72 dBm / -89 dBm

Message was edited by: andre.mengatti

17" 2.88 Ghz MBP 5.2 500GB 5.4K Hitachi, Mac OS X (10.5.7)

Posted on Aug 31, 2009 10:59 AM

Reply
58 replies

Sep 11, 2009 2:16 PM in response to andre.mengatti

Maybe off-topic but here goes: with verbose mode enabled at startup, lines such as this are noticeable

11/09/2009 19:47:00 kernel en1: 802.11d country code set to 'TW'.
11/09/2009 19:47:00 kernel en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165

The country code seems to vary depending on whether I'm at home in the UK or at work in the UK. Maybe the country code during startup is set based upon the country code of the nearest available Wi-Fi router?

Sep 28, 2009 1:50 AM in response to andre.mengatti

I'm having the exact same problem. My AirPort Extreme is set to Australia and is using channel 149, but searching for "en1" in console reveals that the card is jumping to various country codes - probably as I switch it on and off.

Sep 28 18:13:54 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:13:54 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:14:13 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:14:16 Omena kernel[0]: AirPort: Link Down on en1. Reason 2 (Previous authentication no longer valid).
Sep 28 18:15:01 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:15:01 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:15:20 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:15:23 Omena kernel[0]: AirPort: Link Down on en1. Reason 2 (Previous authentication no longer valid).
Sep 28 18:15:33 Omena kernel[0]: en1: 802.11d country code set to 'X1'.
Sep 28 18:15:33 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 149 153 157 161 165
Sep 28 18:15:34 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:15:34 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:15:36 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:15:36 Omena kernel[0]: AirPort: RSN handshake complete on en1
Sep 28 18:15:41 Omena kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
Sep 28 18:15:53 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:15:53 Omena kernel[0]: AirPort: RSN handshake complete on en1
Sep 28 18:16:00 Omena kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
Sep 28 18:16:40 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:16:40 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:16:59 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:17:02 Omena kernel[0]: AirPort: Link Down on en1. Reason 2 (Previous authentication no longer valid).
Sep 28 18:17:19 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:17:19 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:17:38 Omena kernel[0]: AirPort: Link Up on en1
Sep 28 18:17:41 Omena kernel[0]: AirPort: Link Down on en1. Reason 2 (Previous authentication no longer valid).
Sep 28 18:18:14 Omena kernel[0]: en1: 802.11d country code set to 'X1'.
Sep 28 18:18:14 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 149 153 157 161 165
Sep 28 18:18:16 Omena kernel[0]: en1: 802.11d country code set to 'FR'.
Sep 28 18:18:16 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Sep 28 18:25:16 Omena kernel[0]: en1: 802.11d country code set to 'X1'.
Sep 28 18:25:16 Omena kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 149 153 157 161 165


How do I set the country code of our laptops to AU? Presumably this will allow it to use channel 149?

Sep 30, 2009 6:18 PM in response to dkam

It seems that Snow Leopard configures the country code by itself when it searches for available routers.

When i'm home, it changes from BR to ZW frequently, and I do nothing but wake my lap from sleep when this happens...

This is REALLY annoying me.

I bought one of the best consumer Wireless N router available, changed 3 Desktops wi-fi PCI cards from G to N to increase my network speed and now my "superb" new 17" MBP behaves as a 5 years old laptop when transfering files over my network.

This is clearly a bug, and I think most people don't know about this issue because N wi-fi isn't exactly popular right now...

Oct 1, 2009 8:52 PM in response to micp

The country code should be set according to the router you associate with.

So for example, if you had two routers, one set to a country code of Brazil and one set to a country code of France, the country code should be set to BR when talking to the one purchased in Brazil and FR when talking to the French one.

"X1" is a pseudo-default country code that is used while the software is determining which country code to use.

So if the country code is changing when connected to the same router, there's something weird going on.

If it's changing when on the same network, but when talking to different routers (say on a campus-wide Wi-Fi network or even an in-home network with different routers but the same SSID, say with an AirPort Extreme Base Station and an AirPort Express in WDS mode) it may be due to a misconfigured router or a router purchased in a different country.

(Some routers allow you to change the country code, others are locked to the country in which they were purchased or where they were intended for sale.)

Oct 2, 2009 5:49 AM in response to Dogcow-Moof

OK, I've found out a little more information on this:

When an AirPort-enabled Mac awakens from sleep, it listens for 802.11d beacons to determine which country it is operating in, and the first beacon received, regardless of the access point you're associating with, sets the Mac's country code.

So those of you who are seeing your Mac set to the "wrong" country code are, for better or worse, in reception range of someone who is either illegally using a router purchased in another country (all home Wi-Fi routers) or are in range of a misconfigured router (some professional routers, like Ciscos, or routers with third-party software, like DD-WRT, allow the country code to be set manually.)

Unfortunately the 802.11d spec is fuzzy on what is the proper thing to do if the system receives beacons from multiple routers indicating multiple country codes, but most current implementations do what Mac OS X does - the first packet in wins.

This is why some of you are seeing the code alternate - whether your "local" country code is set depends on whether the illegal router or a good router transmits the first beacon seen by your machine when the interface awakens.

So Andre, when you're at home your country code is being set to Zimbabwe. Any idea why? Do you perhaps have a neighbor from Zimbabwe who brought their router with them? Did you perhaps purchase your WRT610 from a vendor in Zimbabwe?

For anyone interested, the country codes can be decoded here:

http://www.iso.org/iso/englishcountry_names_and_codeelements

Oct 2, 2009 12:28 PM in response to MosziNet

William

Based in your information, I conducted a few test to determine wether the problem was with my WRT610N router or someone else's router interfering in my Airport Country Code setting.

I have an old DI-524 D-Link router bought in Brazil as well, that used to work without problems in my network. So I turned of my WRT610N and configured my DI-524.

As I expected, I got ZW Country code.

So I asked a friend that's a few blocks away from me if I could bring my router and make some tests.

Using the same DI-524 that got me ZW in my house, changed to BR Country Code when connected at my friends house.

I guess you're right. Someone is using a misconfigured router or one that's improper to my country specified settings in my neighborhood.

But that doesn't change the fact that as long as I was using 10.5.7 Leopard I NEVER had those problems, with my MBP staying all the time with US country code settings using Wi-fi.

Why Apple changed this with SL? I don't know. But I do know this is a HUGE bug, not an improvement.

Here in Brazil people mostly buy electronics consumer abroad (or buy imported ones) because it's way cheaper than getting it here (We have one of the world's highest taxes rates).

So I'll have to just accept that my wi-fi card is going to behave erratically everytime it finds a different country signal before the one of the router it's going to connected to?

If that's really the case, this is unacceptable. There's nothing I can do to solve this. I can't ask my neighbors to stop using their imported router so my "state-of-the-art" country code selector in Snow Leopard get things right...

Oct 2, 2009 8:50 PM in response to andre.mengatti

andre.mengatti wrote:
Why Apple changed this with SL? I don't know. But I do know this is a HUGE bug, not an improvement.


Unfortunately it's not a bug, it's the way the 802.11d standard dictates things should work (at least initially; as I said in the case of conflicting country codes the resolution is still fuzzy.) I suspect Apple either found their earlier implementation was non-compliant or simply didn't fully support 802.11d.

As such, I unfortunately don't think they'll be "fixing" this, as using a router with a different country's country code is generally a violation of your country's laws - whatever agency serves the same purpose as the Federal Communications Commission does in the US.

The individual country codes determine which frequencies are legal to use in each country, and if they're incorrect, as you can imagine, those other routers are using illegal frequencies, likely raising all kinds of other havoc with other communication, typically things like fire and police radios.

Oct 2, 2009 9:27 PM in response to Dogcow-Moof

I just read the entire 802.11d standard. I don't know much about this, but if, as you said, things aren't clear when multiple beacons are available, the reading should be made from the beacon frame information of the router I'm establishing my connection to decide the Country Code.

As you said, they're implementing the IEEE standard, and they don't say anything about which one from many available beacon frames to use. And if Apple implemented that the first beacon wins, I do expect them to fix it properly so I won't have call the police every time someone might use inadvertently a router that doesn't comply with my country wi-fi regulatory domain.

I'm not at home right now, and I don't know if that'll do any good, but I'll try to reduce the beacon interval in my router to see what happens.

Wireless N and County Code mess with SL

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.