Gentoo Wiki ArchivesGentoo Wiki

Ipw3945

Contents

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.

Note: There is new guide only dedicated to iwlwifi making this guide for iwlwifi obsolete.


First of all configure your kernel to use iwlwifi, pick your driver modules and protocols like TKIP.

Linux Kernel Configuration:
General setup  --->
	[*] Prompt for development and/or incomplete code/drivers 
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

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!

Downloads and Status

ProjectDaemon/Blob FreeDriver
Version
Kernel
Requirement
Driver LocationsIEEE 802.11 Subsystem RequirementsIEEE 802.11
Subsystem Location
Known Issues
EbuildVanilla
Kernel
Kernel
Patch
SubsystemVersionEbuildVanilla
Kernel
Kernel
Patch
Portage Layman
(iwlwifi)
Portage Layman
(iwlwifi)
ipw3945 Image:Cross.png 1.2.0 2.6.13+ Image:Tick.png Image:Cross.png Image:Tick.png4,6 2.6.19
2.6.20
ieee80211 >=1.2.16 Image:Tick.png Image:Cross.png Image:Tick.png
ipw3945 Image:Cross.png 1.1.3 2.6.13+ Image:Cross.png Image:Cross.png Image:Tick.png4,6 2.6.19
2.6.20
ieee80211 >=1.1.14 Image:Tick.png Image:Cross.png Image:Tick.png
ipw3945 Image:Cross.png 1.1.2 2.6.13+ Image:Cross.png Image:Cross.png Image:Tick.png4,6 2.6.17
2.6.18
2.6.19
ieee80211 >=1.1.14 Image:Tick.png Image:Cross.png Image:Tick.png
ipw3945 Image:Cross.png 1.0.5 2.6.13+ Image:Tick.png5 Image:Cross.png Image:Tick.png4,6 2.6.17
2.6.18
2.6.19
ieee80211 >=1.1.12 Image:Tick.png Image:Cross.png Image:Cross.png
iwlwifi Image:Tick.png 1.0.0.1 2.6.18+ Image:Tick.png Image:Tick.png Image:Tick.png4,7 [] mac80211 >=2.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20
iwlwifi Image:Tick.png 0.0.11 2.6.18+ Image:Cross.png Image:Tick.png Image:Tick.png4 [] mac80211 >=2.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20 2,3
iwlwifi Image:Tick.png 0.0.9 2.6.18+ Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20 d80211 >=2.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20 2,3
iwlwifi Image:Tick.png 0.0.8 2.6.18+ Image:Cross.png Image:Tick.png Image:Cross.png mac80211 >=1.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20 2,3
iwlwifi Image:Tick.png 0.0.7 2.6.18+ Image:Cross.png Image:Tick.png Image:Cross.png mac80211 >=1.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 2.6.20 2,3
iwlwifi Image:Tick.png 0.0.6 2.6.18+ Image:Cross.png Image:Cross.png Image:Tick.png4 2.6.20 mac80211 >=1.0.0 Image:Cross.png Image:Tick.png Image:Tick.png4 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

Kernel configuration

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


Note: sometimes IEEE 802.11 WEP encryption as a module can cause problems and it is better to build it in to the kernel.


(Then make sure you add them to /etc/modules.autoload.d/kernel-2.6 so they are loaded at startup)

Note:

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



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


Warning: Do Not build mac80211 into the kernel. There are outstanding issues regarding the rate scaling, which will cause the iwlwifi driver to fail!


Note: No matter what you select for the LED triggers, the led will not work for iwlwifi yet


Note: When you patch the kernel with the latest package from the intellinuxwireless page, you also need to select the following option, or compilation will fail. In other cases you also might want to enable this option:
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.

Installation

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 Wireless/Configuration.

Old procedure for ipw3945

Note:

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
net-wireless/ipw3945-ucode ~x86
net-wireless/ipw3945d ~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:

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.

Note:

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.


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

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.

Note: As of 1.7.22-r10 there is no need to start the daemon manually or add it to the startup. This is done automatically using udev.

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.

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"


preup(){
 ifconfig eth1 up
}

If you want your interface to be named eth1 then edit /etc/udev/rules.d/70-persistent-net.rules

Warning: 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)


Note: The mac80211 ratescaling modules are reported to interfere with iwlwifi, and you don't need them. rm $(modprobe -l rc80211_*) to get rid of them.

If you are using encryption on your connection, you will also have to ensure that the following kernel modules are loaded depending on your encryption algorithm:

Suspend to disk

If you are using Intel 3945 wireless card, add:

File: /etc/hibernate/common.conf (ipw3945)
	 
UnloadModules ipw3945	 
DownInterfaces eth1	 
# UpInterfaces auto	 
StopServices ipw3945d	 

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

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

network={ ssid="MySSID" psk="MyPassword" pairwise=TKIP group=TKIP priority=5 }

This is a sample configuration which configures an wpa enabled access point with TKIP encryption.

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.

Tips and tricks





just rename the file to whatever iwlwif displays in this case: iwlwifi-4965-1.ucode

Monitor mode

To set your card into monitor mode, you need to patch the driver. See the guide at aircrack-ng.org. You may also try the ipwraw-ng module which, although cannot use the card in no other than monitor mode, supports packet injection. You'll need the current development version of aircrack-ng (1.0x) for that.

Troubleshooting

If the AP SSID is hidden, be sure that ap_scan does not exist or is commented out in /etc/wpa_supplicant/wpa_supplicant.conf.
File: /etc/init.d/ipw3945d
 #!/sbin/runscript
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945d/files/ipw3945d-init.d,v 1.2 2006/09/09 07:53:40 phreak Exp $

 depend() {
         before net
 }

 start() {
         ebegin "Starting ipw3945d"
         /sbin/ipw3945 > /dev/null
         eend ${?}
 }

 stop() {
         ebegin "Stopping ipw3945d"
         /sbin/ipw3945 --kill > /dev/null
         eend ${?}
 }
If module ipw3945 fails to unload add to /etc/hibernate/common.conf:
RestartServices ipw3945d

When one wants to restart the wireless connection, this error message comes up (i.e. if the device was off a normal start would not encounter this issue):

/etc/init.d/net.eth1 restart
* Starting eth1
* Starting wpa_supplicant on eth1 ...
ioctl[SIOCSIWMODE]: Resource temporarily unavailable
Could not configure driver to use managed mode
ioctl[SIOCGIWRANGE]: Resource temporarily unavailable
ioctl[SIOCSIWAUTH]: Resource temporarily unavailable
WEXT auth param 7 value 0x1 - ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable
ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable
ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable
ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable
ioctl[SIOCSIWAUTH]: Resource temporarily unavailable
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Resource temporarily unavailable [ ok ]th param 5 value 0x1 -
* Starting wpa_cli on eth1 ... [ ok ]
* Backgrounding ... 
You need to execute the following command: modprobe -r ipw3945 && sleep 3 && modprobe ipw3945.
Note that you need the ipw3945d "regulatory demon" to start after the modules is loaded. In theory, udev is supposed to take care of that for you. The most recent version of ipw3945d, ipw3945d-1.7.22-r10 from the sabayon overlay, actually does work. Earlier verions didn't and I was forced to resort to an initscript. However, this caused another problem namely that netmount started too early and then crapped out because the network was not ready. The solution, from this gentoo-user post is to edit /etc/conf.d/rc so that the Wifi is not started by udev, e.g., RC_PLUG_SERVICES="!net.wlan"
The problem is that the ipw3945 module doesn't restore properly. However, the workaround, from this bug report is:
OnSuspend 20 modprobe -r ipw3945	 
OnResume 20 modprobe ipw3945
Retrieved from "http://www.gentoo-wiki.info/Ipw3945"

Last modified: Sun, 24 Aug 2008 19:13:00 +1000 Hits: 72,258

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.