As many of you saw, this past week I bought myself a new Macbook and have successfully installed Ubuntu on it via bootcamp. I plan on documenting many of the steps I took to be published this upcoming week, but first I have some great news. I have successfully configured wireless on this machine despite all the talks that it wasn’t available! If you are struggling with wireless on a Core 2 Duo Macbook you might give this a try.
First of all, you’ll need to use ndiswrapper. There is not a free solution (free as in freedom) to this *yet* but from the piles of articles, threads and bugs that I read the madwifi team is working on it. In the meantime we’ll have to use the Windows driver, which I will link to here.
Second, you’ll need to compile ndiswrapper yourself as even the Feisty package is out dated and will not support this hardware. I’ll walk through those few steps as well.
Third, if this works for you, you’ll have to share it with everyone you know because wireless is awesome, of course, and not something that one can easily live without.
Ok, now on to the good stuff.
How to setup wireless on a Macbook (Core 2 Duo) using ndiswrapper.
You’ll need the latest version of ndiswrapper available from their site. I am currently using the v1.38 release. You can find that here. (Feisty still includes the 1.30 version, which was released 2006-11-28!)
Unzip this package to a location you’ll remember. (ie; Desktop)
You’ll want to remove any previous installations or mentions of ndiswrapper. I used the following:
sudo aptitude remove –purge ndiswrapper-common ndiswrapper-utils (make sure you get any other package you’ve installed)
sudo rm -R /etc/ndiswrapper
sudo rm /etc/modprobe.d/ndiswrapper
After you’ve purged any of your previous attempts you can open a terminal and enter the directory where you unzipped the ndiswrapper-1.38 source (which, for this tutorial, will be on your Desktop)
cd ~/Desktop/ndiswrapper-1.38/
You will need the powers of compiling, which is tidily wrapped up in the build-essential package. Simply sudo aptitude install build-essential and you should have what you need for the next few steps.
make uninstall (repeat until it doesn’t find anything)
make
sudo make install
At this point your ndiswrapper version 1.38 should be installed to your system. You’re now ready to download the appropriate driver and unpack its contents. The driver I used is sourced from a Lenovo driver page but it appears to be the same hardware and it’s working so… you can get that here.
Note: if you want to verify that it is the suggested driver for your system you can run the following two commands, and verify that listing suggestion on the supported hardware page of ndiswrapper.
lspci
This is what I get in my output:
02:00.0 Network controller: Atheros Communications, Inc. Unknown device 0024 (rev 01)
You’ll then want to run
lspci -n | grep 02:00.0 (note this is grepping for the information at the beginning of the line above. alter if your information is different)
…the results you get here is the PCI-ID for that card, (mine being: 02:00.0 0280: 168c:0024 (rev 01)
). You’ll want to take the 168c:0024 section of this output and search for it at the ndiswrapper hardware list. (I know it sounds a bit complicated but give it a try, you should catch on to what you’re looking for pretty quickly)
So now that you’ve verified your card ID and downloaded the driver you can install it using the command below:
sudo ndiswrapper -i NET5416.INF
This should give you some output.. and then to verify that the system is happy with that driver:
sudo ndiswrapper -l
Hopefully you see the same thing I did:
net5416 : driver installed
device (168C:0024) present
If this is the case (and notice the device number matches the lspci -n information above, something I had trouble with in previous attempts) you can load the ndiswrapper module and you should be ready to rock.
sudo modprobe ndiswrapper
Take a look to see if the device was created using something like:
iwconfig or check network-manager to see if you’ve got a wireless device listed now.
…and to have it auto-load at each boot
sudo ndiswrapper -m
At this point set up your wireless card information, pull out that leash of a LAN cable and jump for joy! Yeah, it’s ok to dance around the room a little bit if you’ve been fighting this for a while.
If it doesn’t work for you feel free to drop me and email and we’ll see if we can’t get something figured out. Good luck!
As I pretty dedicated Linux user, why would you buy a MAC? Then try to get it to work with Ubuntu?
I can think of a dozen work-arounds.
John J. Macey aka Adler
http://www.jjmacey.net
Phoenix, Arizona
Hey, it’s all good, but what IF feity people decide to bump the kernel revision one up – in my case this broke ndiswrapper, making it take down the kernel with it. And splash neatly hided the fact from me on the next boot up! So beware people! Make a extra ‘make uninstall’ BEFORE you update your kernels!
Re: John J. Macey’s comment (“As [a] pretty dedicated Linux user, why would you buy a MAC?”)
Though I don’t want to go through this particular headache (getting wireless to work by compiling ndiswrapper, finding the right driver, etc), the MacBook has a lot going for it, hardware-wise.
Especially *with* wireless working (which Christer now has, for him), it’s a very nice machine, as are most Apple products. Some of their keyboards are definitely sub-par (I’m thinking now of the ones that came with the original iMac), but the MacBook … well, my mom just chose one to replace her well-aged iBook, and I was very impressed with it as hardware, though I prefer running Linux (usually Ubuntu, lately) to running OS X. Different strokes 🙂
timothy
“As I pretty dedicated Linux user, why would you buy a MAC? Then try to get it to work with Ubuntu?”
Because you get a better OS than OSX in a good piece of hardware (well designed, nice architecture with everything on the USB bus). ;-P
Feisty totally rocks on the MacBook! 😀 Everything works perfectly, it is just lacking wifi support without this workaround and AFAIK the iSight firmware loader built in the kernel module (you need the uvc extract loading it on module insert).
When Gnome (or eventually Ubuntu) gets Elisa in the equation, what would you need OSX for (Front Row is cool, although not essential and the remote works well already on Linux)?
I’ve been using Linux for about 9 years, and acquiring a MacBook was my first real full experience with Mac OS X, I felt almost no learning curve, at least for the normal usage. Even though I use Linux mostly because it is free (as in freedom), I also feel more empowered using it.
Ubuntu developers are doing a wonderful job! People don’t understand what’s the big deal with Ubuntu, I’d say it is all regarding the notion of evolution and motion, a direction, the community friendliness, the good relation of the core developers with the community… 🙂
Cheers! 😉
You’re not exactly right about the version of ndiswrapper included in feisty:
scott@geneva:~$ [0] lsb_release -d
Description: Ubuntu feisty (development branch)
scott@geneva:~$ [0] modprobe -l | grep ndiswrapper | xargs strings | egrep ^version
version=1.38
#John J. Macey: I was asking me the same thing.
#Tim Lord: Can you tell me the difference between a Dell or a Vaio with the same configuration taking apart the Apple logo?
Weeber wrote: “Can you tell me the difference between a Dell or a Vaio with the same configuration taking apart the Apple logo?”
For raw specs (processor / RAM / hard drive speed), probably nothing significant; I bet the MacBook would be somewhere close to a similar priced offering from either of those companies. However:
– I like the MacBook keyboard better than most (but not all) non-Apple laptop keyboards, and since you mention them, I was going to single out Dell and Sony (at least in their compact laptops) as having keyboards I don’t like. My (largish, but low-end) Toshiba has a keyboard I rather like, and I’ve not met a laptop keyboard yet that’s better than that of a ThinkPad. Sadly, my ThinkPad died a week out of warranty. My own iBook took about 6 years to keel over 😉
– Slot-loading drive. I like this a lot.
– Really good hinge. I’m really good at (and therefore bad about) breaking laptops, and hinges are certainly one of the weak points. The MacBook’s super-wide hinge is better than any of the Dell or Sony hinges that I’m familiar with, but I haven’t been serious laptop shopping in a while.
– The power cord connector: it’s genius. I envy it every time the connector on one of my own laptops slides out unbidden, because the cord has no purchase (of necessity), because it can’t safely pull on its connection …
– Better than average touch-pad. Nice and large, sensitive but (in the case of the one example I’ve actually spent some hours playing with) not *over* sensitive. I dunno about Sony, but some Dells really have twitchy touchpads.
– Firewire built in. I think all Sony’s have this (Yes?), but certainly not all Dells.
– Aesthetics. No accounting for taste, but I like the look of the MacBook, in either white or black.
– If you wanted to conveniently run Mac OS X on it, you certainly could. Windows, likewise. That’s not true with a Sony or Dell. (“Possible” isn’t the same as convenient.) Of obvious mainstream source-secret operating systems, I prefer Mac OS X by a long shot.
The last computer I purchased is a low-end Toshiba; it cost me about $600 dollars, or perhaps slightly closer to $700. But I’m a student right now, with a desktop already, and a few run-down laptops (no battery life, and other problems, though). So I’m more budget sensitive than if I was a road warrior, and less problem sensitive than if that laptop were my only computer. In those things weren’t true, I’d probably go with a MacBook, and install Feisty Fawn on it 🙂
Cheers,
timothy
I believe the syntax you listed for removing ndisrwapper is incorrect – you combined apt-get and aptitude.
aptitude takes “purge” as an action (no switches required), while apt-get uses “remove” with a “–purge” switch as you listed to purge the config files. So the easier route would be “aptitude purge .
Isn’t there a free Atheros driver?
@Aled
Not yet. 🙁
There’s a ticket on madwifi regarding it:
http://madwifi.org/ticket/1001
Pingback: Ubuntu@MacVillage » Das Macbook optimal einrichten
Hi,
i installed Ubuntu Feisty 7.04 from a “live DVD” on an Asus laptop, and there it managed to activate the Atheros wireless all on its own, without requiring any additional software — how would the Asus laptop be different from the MacBook in this regard? Why wouldn’t Feisty accomplish the same on the Mac?
Im kinda new to linux and ubuntu and such but i followed your guide step for step and i get this after doing sudo ndiswrapper -l
“7iwc21ww.exe : invalid driver!
net5416 : invalid driver!”
and obviously i get no connection, please email me to tell what i might have did wrong, thanks in advance
How to Configure Ndiswrapper with ubuntu?
My Wireless is SUrecom
Pingback: Linux Live CD on MacBook - MacNN Forums
I tried to follow this with high hopes, when i did sudo ndiswrapper -l, i got driver installed, but i did not see device present. I tried going along anyway, as I do have the same wifi card (I’m using a MacBook Pro Core 2 Duo) and after modprobing ndiswrapper, i did have a device show up. I tried using NetworkManager to connect to my wireless network, which is encrypted with WPA, but it kept asking me over and over for the WPA key.
Hi,
I’m trying to get the wireless card to work on my MacBook. I read your tutorial, and I think I’ve almost got it. I’m stuck on how to extract the .inf file from the driver file. cabextract says it has no cabinets, unzip says that it has no zip structure and unshield says that it’s can’t open it as an unshield file. Installing it on windows seems to bring up an endless terminal window, but never leaves the .inf file behind. How did you do it? Any help would be greatly appreciated.
Thanks.
Sarah
@sarah: try to run the downloaded driver .exe using “wine”. it will ask you for a dir to extract the content to…
but:” sudo ndiswrapper -l
net5416 : invalid driver!
“- again nothing happens twice.
good luck…
Worked like a charm, thanks a ton.
Hi,
i’m a fortunately owner of a C2D black Macbook and i’m in trouble with wireless.
I’m followed your tutorial but…
even if ndiswrapper -l output is:
net5416 : driver installed
device (168C:0024) present
lspci returns:
02:00.0 Network controller: Atheros Communications, Inc. Unknown device 0024 (rev 01)
iwconfig:
lo no wireless extensions.
eth0 no wireless extensions.
and no device is created.
any suggestion?
Some things to note:
– There is no 64-bit Windows driver for this chipset that can be used with ndiswrapper. That means, if you’re using the 64-bit Ubuntu (as I am), this method will not work.
– There is a madwifi driver now that works (even for 64-bit users), although encryption does not function making this somewhat useless for me.
– There older Macbook (non-C2D) works out-of-the-box (apparently)
– For Robert; the Atheros chipset on new MacBooks is actually a newer 802.11N-capable chipset still not fully supported by the madwifi project (but it doen’t look too far off).
I can live without internal wireless at home thanks to my spare Linksys 802.11G Wireless Ethernet Bridge, and the fact that I have a Ethernet cable on my desk at work.
Pingback: update-pciids - download new version of the PCI ID list : Ubuntu Tutorials : Breezy - Dapper - Edgy - Feisty
Hi,
I have the same stuff you have but when I try
sudo ndiswrapper -l
net5416 : invalid driver!
Have you any idea why ?
ciao ciao
P
Thanks a lot! Works like a charm 🙂
(Macbook 2gen refresh)
All I had to do was set authentication to tkip because “auto” did not work.
Pingback: How to setup wireless on a macbook using madwifi : 7.10 “Gutsy” : Ubuntu Tutorials : Breezy - Dapper - Edgy - Feisty
Pingback: unknown device - Linux Forums
Thank you so much!!
This was WONDERFUL!!! You just helped me finish the gap to Triple Booting my Macbook! (Now with OSX, Vista Ultimate, and now Ubuntu 7.10!)
When I choose ‘windows’ from the BootCamp loader, GRUB comes up… and thanks to you wonderful tutorial: Wireless, too!
I had to load ‘wine’ first, to handle the ‘updated’ driver pack from IBM. It now comes in a .exe file…. so…
> wine 7iwc28ww.exe
Now change to the directory where wine places the driver files:
> cd ~/.wine/drive_c/DRIVERS/WIN/WLLANATH/WINXP_2K
Now I could use the command to install the driver like you said:
> ndiswrapper -i NET5416.INF
Works like a champ now!
Steven (bigcheese overat guidedmouse.com)
I am getting
net5416 : invalid driver
after i run the sudo ndiswrapper -l command. i have the same wireless card as you list as well. how can i forcibly remove the existing driver and start fresh with the lenovo driver? I am not real strong with ubuntu/linux but I am pretty good with instructions.
Hey im new to all so bare with me, i installed everything and im connected and everything but i dont have any internet its driving me nuts i tried to reinstall the card drivers but that didnt help…
thanks!!
I really found the tutorial useful! I sat here and got it to work for the first time ever! Thank you very much for your help! Glad you posted this because the only thing stopping me from using Linux was I couldn’t get the wireless to work – it does now! Yay!