Saturday, July 05, 2008

Finally -- Wireless in openSUSE on MacBook

My MacBook (C2D, 2.16 GHz) has a Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter card.
After I installed openSUSE 11.0 last week, I've made several attempts to get wireless working without success. The madwifi version available in Yast2 don't work for me.
I finally got it working using this guide which actually had helped me out with openSUSE 10.2 some time ago. As the guide hasn't been updated I'm going to outline in step-by-step fashion what's required to get wireless working on the MacBook.

First, make absolutely sure there is no other madwifi stuff on your computer (or more accurately on the partitions associated with openSUSE 11.0). For that do this:
1. Search Yast2 for Madwifi and uninstall everything you find.
2. Run this as root in a terminal

find / -name madwifi

and then
find / -name madwifi*

and delete everything that's found.

Now we can start the compile. Run these commands, one at a time, as root in a terminal:
svn checkout http://svn.madwifi.org/madwifi/trunk madwifi
wget http://people.freebsd.org/~sam/ath_hal-20080528.tgz
tar -xvzf ath_hal-20080528.tgz
rm -rf ./madwifi/hal/
cp ath_hal-20080528 madwifi/hal -R
cd madwifi/
make clean
make
make install


Assuming there have been no errors, you can now load up the module with
modprobe ath_pci

Now if you run iwconfig (as root), you should get something like this:
lo no wireless extensions.

eth0 no wireless extensions.

wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID:"essid-of-your-ap" Nickname:""
Mode:Managed Frequency:2.442 GHz Access Point: 0X:0X:CX:2X:BX:0X
Bit Rate:48 Mb/s Tx-Power:14 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key: Security mode:restricted
Power Management:off
Link Quality=77/70 Signal level=-19 dBm Noise level=-96 dBm
Rx invalid nwid:2984 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

This means everything is ready for your wireless connection.
So, unplug your ethernet cable and start connecting wirelessly through NetworkManager

No comments:

Post a Comment