|
Size: 14365
Comment: varied expansion and cleaning
|
Size: 14472
Comment: ath5k/9k
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 29: | Line 29: |
| Some Atheros models work out-of-the-box with more recent (lenny) kernels; Broadcom chipsets all require non-free firmware, and thus require some user intervention. | Some Atheros models work out-of-the-box with more recent kernels (lenny, and more in squeeze) kernels; Broadcom chipsets all require non-free firmware, and thus require some user intervention. |
| Line 50: | Line 50: |
| * ath9k – preferred, completely free | * ath5k/ath9k – preferred, completely free |
| Line 60: | Line 60: |
| * ath5k is in lenny; ath9k is in squeeze, and in lenny [[backports]]. |
WiFi wireless networking on MacBooks generally works under Debian, sometimes out-of-the-box, but support and configuration depend on the specific hardware (and kernel support for it), and may require some hacking.
If the card is supported by the kernel, then there is nothing special about a MacBook, and one may refer to the common WiFi instructions in case of problems; if the card is not supported by your running kernel, then some hacking may be required.
Initial setup and check
If you’ve installed Debian with the Laptop or Gnome-Desktop installation, you have the basic necessary tools; otherwise install wireless-tools for wireless, and optionally NetworkManager for a user interface (so you can select a network), or use an alternative, as discussed at WiFi.
To start, try running iwconfig.
If iwconfig doesn’t run, please install wireless-tools and then try again (or use the full path, /sbin/iwconfig).
If iwconfig runs and shows a WiFi card, your hardware configuration is probably ok, and you should try to connect to your desired network using NetworkManager, iwconfig, or other tools, as discussed in How to use WiFi; return here if you have reason to believe that you do, in fact, have hardware problems.
If iwconfig runs and does not show a WiFi card, and you do have a WiFi card (as all Intel ?MacBooks do), then you have a hardware configuration problem, and this is the page for you! After you’ve fixed your hardware configuration, you can setup your connection as in How to use WiFi.
Getting packages
It is significantly easier to setup wireless with a working (wired) network connection, for installing packages and finding documentation.
If you do not have access to a wired connection, you can boot into Mac OS X (if you are dual-booting) and download required packages, or else obtain them from a separate computer with working wireless connection, but these both may involve multiple back-and-forth cycles and using dpkg manually instead of aptitude/apt-get.
Identify wireless card
The first step is to identify your network card; "AirPort" and "AirPort Extreme" are Apple product names for varying hardware, with "AirPort Extreme" meaning "IEEE 802.11g" (and for more recent cards, /n (802.11n)). Different cards require different configuration.
Under GNOME or KDE, one can use a graphical application, as described at How to Identify PCI. Alternatively, one can check manually via:
update-pciids # if necessary; run as root, to update PCI database lspci | grep -E "Atheros|Broadcom" # Finds card
MacBooks before the late 2008 models use Atheros chipsets, while late 2008 are now using Broadcom 4322 chipset.
Some Atheros models work out-of-the-box with more recent kernels (lenny, and more in squeeze) kernels; Broadcom chipsets all require non-free firmware, and thus require some user intervention.
Broadcom chipset
Broadcom has developed a driver, which contained a closed part.
the driver can be downloaded from here:
http://www.broadcom.com/support/802.11/linux_sta.php
Note: I'm using Debian Lenny with kernel 2.6.26-1-amd64on a new unibody MacBook Pro. I found that an earlier version of the Broadcom driver (hybrid-portsrc-x86-64_5_10_27_6.tar.gz) could provide "iwlist eth1 scan" results and could send DHCP requests. However, this version never received an address, even though my router was handing out IPs to my other machine. But when I upgraded to the latest version (hybrid-portsrc-x86-64_5_10_27_11.tar.gz) I got wireless working both unencrypted and with 64-bit WEP.
Note: After following the Broadcom README, you need to 'cp wl.ko /lib/modules/2.6.26-1-amd64/kernel/net/wireless' and run 'depmod -a'.
For >= 2.6.27 kernels, you need a patch to compile the driver, see:
http://ubuntuforums.org/showthread.php?t=896713&page=5
[Richard Shore: I have only been able to get the Broadcom wireless working following this slightly more detailed guide. It's written for a Macbook Pro using Etch, but it's the only thing that's worked for my late 2007 Macbook, for Lenny, both i386 and amd64. [javascript:void(0);/*1236686532710*/ http://dendiz.verisux.com/2008/11/27/installing-debian-on-a-macbook-pro-part-2/]]
Atheros chipset
There are three possibilities for Atheros chipset:
- ath5k/ath9k – preferred, completely free
- madwifi – mostly free
- ndiswrapper – mostly closed
ath9k is a completely free driver, without any firmware, which make it the preferred version for users of lenny and more recent releases. madwifi and ndiswrapper are still mentioned for people not having a kernel recent enough, notably etch users.
ath5k/ath9k
The ath9k supports 802.11n (faster); ath5k is for earlier protocols and card; see ath5k: Supported Devices and ath9k: Supported Devices for supported devices. Atheros is now providing support for (>=) AR5416 cards with the ath9k driver.
ath5k is in lenny; ath9k is in squeeze, and in lenny ?backports.
If you’ve previously used madwifi, some care is needed in switching.
User reports
At least in the initial black MacBook, ath5k works fine. WPA does not seem to work on white ?MacBook1,1. Use madwifi.
- Ath9k is now part of linux 2.6.27, and this version appears to work pretty well on my black macbook with an Atheros AR5418. There are a few bugs but it doesn't affect my traffic. This is tested using open and WPA.
- There are drivers backported to 2.6.26 and earlier by the linux-wireless project, however I couldn't get these to work. Looking through the changelogs shows that they haven't had as much attention lately, however this is probably due to 2.6.27. This is the compat-wireless branch.
- I now run a custom 2.6.27 kernel on lenny as the madwifi drivers were not reliable. There were no issues with the installation.
- 802.11n is also supported but I haven't tried that yet.
Madwifi
Madwifi is the earlier, partly non-free series of Atheros drivers; development has moved to the free ath5k/ath9k drivers (above), but madwifi remains useful for earlier kernel users, notably on etch and installations of lenny.
Madwifi has been removed from squeeze, and squeeze users should instead use ath5k/ath9k; see Bug #519446, which reports that madwifi is apparently also "dead upstream" (i.e., no longer being developed).
In addition to being non-free, madwifi:
- sometimes stops working, as discussed below, and
- has some issues with WPA, as discussed below, and
To use this, you will need to build kernel modules.
For some cards, this can be largely automated via module-assistant, but for some cards, notably the AR5008 (PCI-ID 168c:0023/168c:0024), the current Debian package does not support it, so you must instead install the current development snapshot of madwifi-hal manually (this madwifi-hal is the the non-free part of madwifi – it’s the HAL (Hardware Abstraction Layer)).
Reference
* MadWifi: Debian * ath_pci – the relevant kernel module * madwifi – Linux wireless (small page)
Most cards
Reference: Debian MadWifi Packages
Add 'contrib' and 'non-free' to your main Debian repository then update your packages list with
aptitude update
Install the madwifi kernel module source and the ability to compile it
aptitude install module-assistant aptitude install madwifi-source madwifi-tools madwifi-doc
Compile it
m-a prepare m-a a-i madwifi modprobe ath_pci
See http://madwifi-project.org/wiki/UserDocs/Distro/Debian/MadWifi for more details.
AR5008
The AR5008 card (PCI-ID 168c:0023/168c:0024), used in some MacBooks, is not supported by the current stable release of madwifi (0.9.4), nor in the current Debian packages for madwifi-source (currently 0.9.2/r1842 for etch, 0.9.4/r3772 for lenny).
However, it is supported (with WPA support) in the current development branch, or “trunk”, and thus works if you download, compile, and manually install the current development version.
It appears to be supported by ath5k and supported by ath9k (in /n = 802.11n = faster mode), so on future upgrades (to squeeze, or lenny+backports), you should likely move to ath9k.
Installation
Reference: Getting Madwifi
First, install madwifi-source via module-assistant, as described above – you are only replacing one component, but the rest work.
Second, install the development madwifi-hal package manually.
The madwifi-hal package is available at MadWifi snapshots; the current release is 0.10.5.6, available at madwifi-hal-0.10.5.6-current.tar.gz.
Simply download the package, then, as root, unzip, compile, and install it:
su # become root tar zxfv madwifi-hal-0.10.5.6-current.tar.gz # unzip cd madwifi-hal-0.10.5.6/ make # compile make install # install
Alternatively, if you know the release number, you can use subversion:
svn checkout http://svn.madwifi-project.org/trunk madwifi-hal-0.10.5.6 cd madwifi-hal-0.10.5.6/ make make install
or wget:
apt-get install wget wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz tar zxfv madwifi-hal-0.10.5.6-current.tar.gz cd madwifi-hal-0.10.5.6/ make make install
Support details
Details on the exact status of AR5008 support in madwifi:
The madwifi bug for AR5008 support is MadWifi Ticket #1001.
Support was added in branch madwifi-hal-0.9.30.13, which was then merged back into the trunk (specifically release 2360/r2360), as noted in comment 194.
As per comment 195, the milestone (target release) of this fix is 0.9.5, which is not out as of 2009–Sep, and the fix is not in 0.9.4 (it’s a known issue with 0.9.4).
- If and when madwifi release 0.9.5 occurs, and is packaged into Debian, these manual installation instructions will no longer be necessary.
Driver stops working: rx FIFO overrun
In some cases, the madwifi driver stops working after a while. If so, check the kernel messages (via dmesg); if you get the following error:
$ dmesg | grep wifi | uniq | tail -n 1
wifi0: rx FIFO overrun; resettingthen you have the “rx FIFO overrun” error, ticket #1017.
Solutions discussed in:
are:
sometimes suspend and resume fix matters (i.e., power management)
turn off bgscan (background scanning)
To turn off bgscan, one of the following should work:
iwpriv ath0 bgscan 0 iwpriv wifi0 bgscan 0 iwpriv bgscan 0
You can put whichever line works in /etc/rc.local so that it will run at boot.
WPA
If you use WPA,
- the wpa_supplicant from squeeze does not support the madwifi private interface, and
- the wext interface of the madwifi driver does not go along well with wpa_supplicant.
You will need to recompile wpa_supplicant to use WPA with a madwifi driver.
Common setup
Reference: How to use WiFi
As discussed in How to use WiFi, you can use NetworkManager to configure your wireless network.
Alternatively, you can add the following to /etc/network/interfaces
# Starts the wireless card on boot auto ath0 iface ath0 inet dhcp
After making this change, restart networking:
/etc/init.d/networking restart
Ndiswrapper
Ndiswrapper takes a Windows driver, and wraps it for use by Linux. It is thus mostly closed, and hard to debug.
AR5008
The following procedure worked on etch/i386 with card AR5008 (PCI-ID 168c:0024).
Get the D-link DWA645 card drivers for Windows XP from somewhere (for example from http://www.dlink.com/products/support.asp?pid=489&sec=0 as suggested in http://madwifi-project.org/ticket/1001#comment:13)
This is a zip file: dwa645_drivers_102.zip Unzip it. You will need the files ar5416.sys and net5416.inf from the Driver subdirectory.
The D-link driver not permit to scan wireless networks around. Is possible get this feature using the driver of ThinkPad 802.11abgn wireless LAN driver, avaliable in http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 . You need to get the file 7iwc28ww.exe, and extract with cabextract. Are the same files, but in a newer version. Run the following: The last command has to be run in the "Driver" directory, it copies the driver into /etc/ndiswrapper and does some additional setup. Proceed to the "Common setup" subsection. Just make sure you add the following right after the "iface ath0 inet dhcp" line. aptitude install module-assistant
m-a prepare
m-a a-i ndiswrapper
ndiswrapper -i net4516.inf
pre-up modprobe ndiswrapper
post-down rmmod ndiswrapper
