HARDWARE ipw3945
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
Contents |
[edit] Intel Corporation PRO/Wireless 3945 Compatible Projects
ipw3945
Note, this project is deprecated. The development is switched to the iwlwifi project (no binary daemon required!).
iwlwifi
IWLWIFI is now _included_ in the gentoo-sources-2.6.24 kernel. If you upgraded to 2.6.24 and decided to use iwl3945, then here is all you need.
First of all configure your kernel to use iwlwifi, pick your driver modules and protocols like TKIP.
| Linux Kernel Configuration: |
Networking ---> [*] Networking support Wireless ---> [*] Improved wireless configuration API [*] nl80211 new netlink interface support <*> Generic IEEE 802.11 Networking Stack (mac80211) Device Drivers ---> [*] Network device support ---> [*] Wireless LAN ---> [*] Wireless LAN (IEEE 802.11) <*> Intel PRO/Wireless 3945AGB/BG Network Connection [*] Enable Wireless QoS in iwl3945 driver |
[edit] For Kernel versions before 2.6.24
You have to emerge iwl3945-ucode, which installs the firmware in /lib/firmware. You should unmerge everything that belonged to ipw3945.
Now you need to clean up your device names. Problems occur here because some drivers refer to your wireless interface as wlan0, some as ethX. You need to reconfigure /etc/udev/rules.d/70-persistent-net or recreate the rules there (simple).
With that, wpa_supplicant should be able to manage your preferred SSIDs!
[edit] Downloads and Status
| Project | Daemon/Blob Free | Driver Version | Kernel Requirement | Driver Locations | IEEE 802.11 Subsystem Requirements | IEEE 802.11 Subsystem Location | Known Issues | |||||||
| Ebuild | Vanilla Kernel | Kernel Patch | Subsystem | Version | Ebuild | Vanilla Kernel | Kernel Patch | |||||||
| Portage | Layman (iwlwifi) | Portage | Layman (iwlwifi) | |||||||||||
| ipw3945 | | 1.2.0 | 2.6.13+ | | | | 2.6.19 2.6.20 | ieee80211 | >=1.2.16 | | | | — | — |
| ipw3945 | | 1.1.3 | 2.6.13+ | | | | 2.6.19 2.6.20 | ieee80211 | >=1.1.14 | | | | — | — |
| ipw3945 | | 1.1.2 | 2.6.13+ | | | | 2.6.17 2.6.18 2.6.19 | ieee80211 | >=1.1.14 | | | | — | — |
| ipw3945 | | 1.0.5 | 2.6.13+ | | | | 2.6.17 2.6.18 2.6.19 | ieee80211 | >=1.1.12 | | | | — | — |
| iwlwifi | | 1.0.0.1 | 2.6.18+ | | | | [] | mac80211 | >=2.0.0 | | | | 2.6.20 | |
| iwlwifi | | 0.0.11 | 2.6.18+ | | | | [] | mac80211 | >=2.0.0 | | | | 2.6.20 | 2,3 |
| iwlwifi | | 0.0.9 | 2.6.18+ | | | | 2.6.20 | d80211 | >=2.0.0 | | | | 2.6.20 | 2,3 |
| iwlwifi | | 0.0.8 | 2.6.18+ | | | | — | mac80211 | >=1.0.0 | | | | 2.6.20 | 2,3 |
| iwlwifi | | 0.0.7 | 2.6.18+ | | | | — | mac80211 | >=1.0.0 | | | | 2.6.20 | 2,3 |
| iwlwifi | | 0.0.6 | 2.6.18+ | | | | 2.6.20 | mac80211 | >=1.0.0 | | | | 2.6.20 | 2,3 |
- 2 Must specify MAC address of access point in order to associate.
- 3 Rate drops to 1Mbs upon association with an access point.
- 4 Needs kernel patch.
- 5 Requires portage version of ieee80211.
- 6 Requires kernel version of ieee80211.
- 7 Doesn't require a kernel patch for kernels >=2.6.22
[edit] Kernel configuration
[edit] ipw3945
When you want to install ipw3945 you need to select the following options.
| Linux Kernel Configuration: |
|
In kernels before 2.6.22: Networking --->
<*> Generic IEEE 802.11 Networking Stack
[ ] Enable full debugging output
<M> IEEE 802.11 WEP encryption (802.1x)
<M> IEEE 802.11i CCMP support
<M> IEEE 802.11i TKIP encryption
< > Software MAC add-on to the IEEE 802.11 networking stack
In kernels 2.6.22 and higher: Networking --->
Wireless -->
<*> Generic IEEE 802.11 Networking Stack
[ ] Enable full debugging output
<M> IEEE 802.11 WEP encryption (802.1x)
<M> IEEE 802.11i CCMP support
<M> IEEE 802.11i TKIP encryption
< > Software MAC add-on to the IEEE 802.11 networking stack
|
(Then make sure you add them to /etc/modules.autoload.d/kernel-2.6 so they are loaded at startup)
If you have a kernel older than gentoo-sources-2.6.19-r5 or ipw3945 older than 1.2.0, ipw3945 will pull in a separate IEEE networking stack, so it must be disabled in the kernel. Make sure that the following kernel options are set (I'm using kernel 2.6.17):
Networking --->
[ ] Generic IEEE 802.11 Networking Stack
Device Drivers --->
Network Device support --->
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
Cryptographic options --->
[*] Cryptographic API
<*> AES cipher algorithms
<*> ARC4 cipher algorithm
<*> Michael MIC keyed digest algorithm
In case you are unable to deselect the Generic IEEE 802.11 Networking Stack option, deselect all WLAN drivers (everything) under
Device Drivers -->
Network device support -->
Wireless LAN (non-hamradio) -->
Wireless LAN drivers (non-hamradio) & Wireless Extensions -->
(remove everything on this menu EXCEPT Wireless Extensions)
As some selected options there depend on "Generic IEEE 802.11 Networking Stack
[edit] iwlwifi
For iwlwifi you need the mac80211 stack to be enabled. This stack is only included in kernels >=2.6.22, the people at Intel do package the mac80211 stack into a package available here http://intellinuxwireless.org/?p=mac80211
| Linux Kernel Configuration: |
Networking --->
Wireless --->
<M> Generic IEEE 802.11 Networking Stack (mac80211)
[ ] Enable LED triggers
[ ] Enable debugging output
|
You need to enable the Intel Wireless WiFi Link Drivers and then depending on your hardware either the 4965 or the 3945 module.
| Linux Kernel Configuration: |
Device Drivers --->
Network device Support --->
Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
[*] Intel Wireless WiFi Link Drivers
...
<M> Intel Wireless WiFi 4965AGN
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
|
Networking --->
Networking support --->
Networking options --->
QoS and/or fair queueing --->
[*] QoS and/or fair queueing
At startup you must make sure that the mac80211 ratescaling modules do not get loaded. You
do not need them for iwlwifi and they interfere with it. I just delete them.
rm $(modprobe -l rc80211_*)
This will "force" mac80211 to use the iwlwifi specific rate scaling algorithm. This is why you can't build mac80211 in the kernel.
[edit] Installation
[edit] ipw3945
Be sure to follow the kernel configuration instructions above (and reboot using the new kernel) before you continue.
Install the drivers:
# emerge ipw3945 ipw3945d
Now load the ipw3945 module:
# modprobe ipw3945
This should create the device for the wireless card (usually eth0). The module will automatically load the next time you boot.
At this point, you can move on to HOWTO Wireless Configuration and Startup.
[edit] Old procedure for ipw3945
since version ipw3945-1.1.3-r1 ipw3945 uses inkernel ieee80211 drivers so this procedeure is no longer valid.
Make sure that the symbolic link /usr/src/linux points to the correct source.
At present there appears to be an incompatibility between udev and the "stable" drivers. This was fixed for me by unmasking the relevant packages:
| File: /etc/portage/package.keywords |
|
net-wireless/ipw3945 ~x86 |
Assuming your arch is x86.
The installation is then very simple:
emerge -av ipw3945 wireless-tools wpa_supplicant
You should now be able to insert the module called ipw3945 in the kernel:
modprobe ipw3945
If you want to use encrypted wireless you have to load the following modules:
- ieee80211_crypt_wep for WEP
- ieee80211_crypt_tkip for WPA with TKIP encryption
- ieee80211_crypt_ccmp for WPA with CCMP encryption
The easiest thing is to simply load all of them:
modprobe ieee80211_crypt_wep ieee80211_crypt_tkip ieee80211_crypt_ccmp
Additionally you can add the modules you need to /etc/modules.autoload.d/kernel-2.x (where x stands for your kernel's minor version) to automatically load the modules when booting (or better yet, use sys-apps/coldplug), for example:
| File: /etc/modules.autoload.d/kernel-2.6 |
ipw3945 ieee80211_crypt_tkip |
The card should now work.
On many newer laptops there is a 'wireless radio kill switch', sometimes a dedicated button, sometimes a function key (fn+f[1-9]). Make sure it is turned on.
In some laptops the wireless has to be enabled in the bios, especially if you have the wireless builtin - if it's not enabled, the button/fn key won't work anyway - Make sure you have the internal wireless enabled.
[edit] iwlwifi
The big advantage of iwlwifi, besides it using the new mac80211 stack is that you don't need a binary "regulatory daemon".
Since 2.6.23 iwlwifi is in the kernel. So you only need to emerge the ucode.
emerge iwl3945-ucode
or
emerge iwl4965-ucode
Now you need to load the mac80211 which you had compiled in as a module in the kernel:
modprobe mac80211
finally load the module with
modprobe iwl3945
or
modprobe iwl4965
[edit] Configuration
ipw3945 only In order to use the ipw3945 device, you need to have the ipw3945d daemon running. In versions of ipw3945d >=1.7.22, this is controlled by an init script, /etc/init.d/ipw3945d.
To launch the daemon, do
/etc/init.d/ipw3945d start
Now, to add this script to the default runlevel, so that the daemon will be automatically launched on every boot, do
rc-update add ipw3945d boot
If you are using a version of ipw3945d <1.7.22, then you will have to start the daemon yourself
ipw3945d
Once the daemon is running, with the command
iwconfig
you can find out which network device is your wireless card, mine is eth1 and I will use eth1 for the following examples, please make sure you replace the eth1 in the examples with what you have got.
[edit] Network
ipw3945 You have to update your /etc/conf.d/net:
| File: /etc/conf.d/net |
modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
config_eth1=( "dhcp" )
dhcp_eth1="nontp nonis"
depend_eth1() {
need ipw3945d
}
|
You can modify the eth1 configuration if you don't want dhcp for example.
iwl3945 You have to update your /etc/conf.d/net:
| File: /etc/conf.d/net |
modules_eth1=( "dhcpcd" "iwconfig" )
config_eth1=( "dhcp" )
dhcpcd_eth1="-t 5 -A"
essid_eth1="any"
pre-up(){
ifconfig eth1 up
}
|
If you want your interface to be named eth1 then edit /etc/udev/rules.d/70-persistent-net.rules
Editing of /etc/udev/rules.d/70-persistent-net.rules is also necessary if you're upgrading from the older ipw-driver to the iwl-driver. You *must* remove (comment out) the rule created by the ipw3945-driver earlier or else the iwl-driver will fail on load. In this case, udev will add a new rule to the file when you restart your computer, from which you can find the name of your wireless interface. (upgrading can in fact change the name of the interface, i.e. from eth1 to wlan0)
[edit] Init script
Simply create a symbolic link from /etc/init.d/net.lo to /etc/init.d/net.eth1 or what ever you have.
ln -s /etc/init.d/net.lo /etc/init.d/net.eth1
You can also add the startup script to the default runlevel:
rc-update add net.eth1 default
If you are upgrading from ipw* to iwl* and your interface name has changed (say, from wlan0 to eth1), you can delete the symlink corresponding to the old interface name:
rc-update del net.wlan0 rm /etc/init.d/net.wlan0
[edit] wpa_supplicant
To configure wpa_supplicant you have to edit the file /etc/wpa_supplicant/wpa_supplicant.conf:
| File: /etc/wpa_supplicant/wpa_supplicant.conf |
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel update_config=0 fast_reauth=1 |
This is a sample configuration which configures an wpa enabled access point with TKIP encryption.
[edit] More information
If you want to learn how to use and configure your wireless card how you want, especially how to setup wpa_supplicant, you should take a look at Gentoo Linux Documentation - Wireless Networking.
[edit] Tips and tricks
- If you have a problem suspending your laptop, because wireless card won't respond due to "Radio Frequency Kill Switch is On" you should try to execute something like "echo 0 > /sys/bus/pci/drivers/ipw3945/0000\:0c\:00.0/rf_kill" which will bring your card up and allow it to suspend.
- When using mac80211 stack you cannot change mode (iwconfig mode monitor/managed/...) while the interface is up. It was argued that it's a short coming from wireless extensions to have allowed it before.
- There are a few things you can play with through the sysfs interface./sys/bus/pci/drivers/iwl3945/00*/*
- You can add interfaces by doing echo "mon0" >> /sys/class/ieee80211/phy0/add_iface
- If you want to play with the wireless card, you can also checkout the "ipwraw" driver. This is infact an early prototype of iwlwifi, but it's relativily small. This driver also allows you to inject packages into the network.
- "iwl4965: iwlwifi-4965-1.ucode firmware file req failed: Reason -2" and similar for iwl3945 indicate a firmware version/filename mismatch
just rename the file to whatever iwlwif displays in this case: iwlwifi-4965-1.ucode
- if using wpa_supplicant with iwlwifi/3945 and the AP SSID is hidden, be sure that 'ap_scan' does not exist or is commented out in wpa_supplicant.conf (otherwise association will fail)
