# [SOLVED] MacBook Pro  Broadcom 4322 wifi + wpa_supplicant

## Bitruder

I have a macbook pro unibody with the BCM4322 wireless chip.  My wireless network is WPA2 with AES+TKIP encryption.

I have tried EVERYTHING I've read on these forums to get this to work.  I've tried an endless number of wpa_supplicant.conf configurations.  When I type "iwlist scan" I get "eth1  Failed to read scan data : Invalid argument"

I've tried kernels 2.6.31 up to what I'm presently running, 2.6.34

Has ANYBODY managed to get this working with broadcom-sta?

Solved:  See my post below.Last edited by Bitruder on Sat Jun 05, 2010 2:19 pm; edited 1 time in total

----------

## cach0rr0

broadcom-sta does support 4322, but i will say it is especially finicky about your kernel configuration

Possible to throw your kernel .config up on pastebin? 

Saving myself a bit of typing - I outlined the needed kernel nonsense here: https://forums.gentoo.org/viewtopic-t-816158-highlight-broadcomsta.html

The same options are required for both .33 and .34 (or so says the ebuild!), so that post should still be relevant. 

NB: once the driver issue is sorted, dont know if you've already looked at it and ruled it out, but unless you have a reason for needing/wanting a manual configuration, have a go with wicd.

----------

## Bitruder

Thanks for the help.  In summary, I see posted for 2.6.33+

```

B43=N 

SSB=N 

LIB80211=M 

WIRELESS_EXT=Y 

CFG80211_WEXT=M 

WEXT_PRIV=Y 

MAC80211=N 
```

However, CFG80211_WEXT isn't allowed to be a module in my 2.6.34 gentoo sources.  So I just made it built into the kernel but still I can't get wireless to work.  When I start net.eth1 it sees my access point so the driver SORT of works, but nothing else really works as I mentioned above.

----------

## Bitruder

I turned off all encryption and I can join my network fine, so this seems to be a WPA/WPA2 specific problem (WEP also works fine).

----------

## Bitruder

After playing around with it all day, I'm finally on my WPA2 network!  I wish I knew how I did it, but it seems to have something to do with partially bringing up the the interface first.  I will post back once i get things stable.

----------

## cach0rr0

welcome to Broadcom  :Smile: 

I had one Broadcom rig on an HP DV9605ea back in '07, and never again will I buy a laptop with a Broadcom card. 

I specifically bought my latest laptop because it was an Atheros card. No external firmware needed, no proprietary drivers, known to be probably *the* most linux-compatible wireless out there. 

Now the laptop itself is a cheap piece of junk, but the wireless works just dandy - and that's all I cared about. With a lean OS, a cheap piece of junk laptop can be a stellar performer. And with reliable wireless, you can keep doing what you're doing even when it's time to head to the shitter! 

Anyway, I couldn't tell you what changed either unfortunately, because exactly what you've been through has been what I've seen on the boards time and time again. 

The one thing I will say, is none of the LIB80211 crypto stuff is enabled by default, which is what you need (meaning, i think it's LIB80211_TKIP and some others?). In fact these crypto settings are reasonably well hidden from what I recall. I can't remember if the discussion is in the thread I linked to, or where, but the broadcom-sta ebuild...heh...well, we'll just say it isn't particularly vocal about telling you "hey, your kernel is set like $foo, so you're probably not going to be able to connect to any protected wireless networks" or "you've built in shit we know will break broadcom-sta"

Nono, the ebuild succeeds and installs the driver, rather than loudly failing as it should, because "we don't want to break binpkg support [for a distro that isn't gentoo yet is somehow relevant for a gentoo bug]" whatever the shit that means. It installs the driver, but then well, the driver doesn't fucking work. You see the ebuild just assumes you're an expert. It forces nothing. It checks nothing. It applies no common sense best practice checks that would be beneficial for the majority, because the minority don't like being forced into such a check. 

Anyway, I've had a lot of coffee, and no nicotine yet today, and I'm sure people are sick of seeing me bitch and moan about that. Especially as I don't use broadcom-sta, and only bitch and moan about it because I want to help others enjoy their wireless from the shitter in a secure fashion as I do!

----------

## Bitruder

SOLUTION

Well, it's messy, but for the past few days it has worked every single time so I'm willing to call it a solution.  When I boot and the system brings up the network interfaces, it brings up my wireless card (eth1), sees my access point, but then says no WEP keys are set and it cannot connect (I don't see anything about WPA or wpa_supplicant).

In order to use my wireless, I have to then run 

```
sudo /etc/init.d/net.eth1 start
```

 and wait until it says "Scanning for Access Points".  Then I hit CTRL+C to jump out of that and THEN I can connect just fine.  If I run "iwlist eth1 scan" it sees my access point, running wpa_supplicant successfully does the key exchange and connect, and using wicd to manage it works perfectly.

If I don't start and cancel the net.eth1 service, I get a bunch of errors when I try to do anything about being unable to read the data and such.

So there's my solution.  If anybody has any idea what is actually happening when I start and stop the service midway through, that would be great!

----------

## cach0rr0

wicd should do the scanning and everything else on its own. if not, well...im a touch hungover now, ill have to think of something later.

----------

## Bitruder

wicd cannot see any WPA wireless networks unless I do the stop/start procedure first.

----------

