# Iwlwifi doesn't works with Intel 3945!!

## CheatCat

I have this Wireless network card:

```
# lspci | grep Wirel

06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
```

and followed the guide on http://en.gentoo-wiki.com/wiki/Iwlwifi .

But I still not see any wlan device when typing ifconfig or iwconfig!

```
# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:16:d4:3c:59:2f  

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::216:d4ff:fe3c:592f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1491 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2103 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1258507 (1.2 MiB)  TX bytes:231976 (226.5 KiB)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# iwconfig   

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

vboxnet0  no wireless extensions.
```

If any iwlwifi ḿodule is supposed to load, it isn't!

```
# lsmod

Module                  Size  Used by

vboxnetadp              6584  0 

vboxnetflt             12744  0 

ext2                   54924  1 

vboxdrv               138416  2 vboxnetadp,vboxnetflt

nvidia               9576240  29
```

Please help me!  :Sad: 

And this card works on other Linux dists.Last edited by CheatCat on Sat Dec 26, 2009 4:25 pm; edited 1 time in total

----------

## Gef

Hi

Please post the ouput of :

```

zcat /proc/config.gz | grep IWL

cat /etc/udev/rules.d/70-persistent-net.rules

modprobe -v iwl3945

ifconfig wlan0 up

iwconfig wlan0

```

----------

## zlomek

Show: 

```
cat /usr/src/linux/.config

```

----------

## CheatCat

Okey, here we go!

zcat /proc/config.gz | grep IWL:

```
gzip: /proc/config.gz: No such file or directory
```

cat /etc/udev/rules.d/70-persistent-net.rules:

```
# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x1092 (e100)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:d4:3c:59:2f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

modprobe -v iwl3945:

```
FATAL: Module iwl3945 not found.
```

ifconfig wlan0 up:

```
wlan0: ERROR while getting interface flags: No such device
```

iwconfig wlan0:

```
wlan0     No such device
```

And cat /usr/src/linux/.config gives a big wall of text so I put it here: http://pastebin.com/f37af6fd0

----------

## Gef

Ok ; your curent running kernel does not have a iwl3945.ko module, but your current /usr/src/linux kernel source tree states that you actually did compile a kernel with support for iwl3945 (your wifi network adaptater). Did you forget to reboot after building the kernel ?

Please also post the output of :

```

$ uname -a

$ ls -alh /lib/modules/

$ find /lib/modules/ -iname iwl*.ko

```

On another subject : next time you build a custom kernel, you may select CONFIG_IKCONFIG_PROC.

 *Quote:*   

> 
> 
>   │   Location: 
> 
>   │     -> General setup
> ...

 

----------

## d2_racing

After compiling your kernel, you will need to install the firmware too :

```

# emerge -av iwl3945-ucode

```

----------

## CheatCat

Yeah.. I have reboot alot of times..

```
# uname -a

Linux Hot 2.6.30-gentoo-r8 #1 SMP Mon Nov 30 22:06:22 CET 2009 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz GenuineIntel GNU/Linux

# ls -alh /lib/modules/

total 12K

drwxr-xr-x 3 root root 4.0K Nov 30 22:06 .

drwxr-xr-x 9 root root 4.0K Dec 21 18:40 ..

drwxr-xr-x 5 root root 4.0K Dec 13 18:52 2.6.30-gentoo-r8

# find /lib/modules -iname iwl*.ko
```

There is no iwl*.ko files anywhere.. I begin to understand what is wrong.

Yeah.. I have reboot alot of times..

```
# uname -a

Linux Hot 2.6.30-gentoo-r8 #1 SMP Mon Nov 30 22:06:22 CET 2009 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz GenuineIntel GNU/Linux

# ls -alh /lib/modules/

total 12K

drwxr-xr-x 3 root root 4.0K Nov 30 22:06 .

drwxr-xr-x 9 root root 4.0K Dec 21 18:40 ..

drwxr-xr-x 5 root root 4.0K Dec 13 18:52 2.6.30-gentoo-r8

# find /lib/modules -iname iwl*.ko
```

There is no iwl*.ko modules anywhere... I begin to understand what is wrong.

And yes, I have also emerge the ucode thing. Maybe I need to re-emerge network tools then because I emerged it before the ucode and installed the modules.

It can also have something to do with the switch that turn on/off the wlan, now it was on whole the time and maybe it should be off before everything is installed.

EDIT: Maybe you mean this when you say ls -alh /lib/modules/:

```
# ls -lah /lib/modules/2.6.30-gentoo-r8/           

total 100K

drwxr-xr-x 5 root root 4.0K Dec 13 18:52 .

drwxr-xr-x 3 root root 4.0K Nov 30 22:06 ..

lrwxrwxrwx 1 root root   31 Nov 30 22:06 build -> /usr/src/linux-2.6.30-gentoo-r

8

drwxr-xr-x 5 root root 4.0K Nov 30 22:06 kernel

drwxr-xr-x 2 root root 4.0K Dec 13 18:52 misc

-rw-r--r-- 1 root root  682 Dec 13 18:52 modules.alias

-rw-r--r-- 1 root root  680 Dec 13 18:52 modules.alias.bin

-rw-r--r-- 1 root root   69 Dec 13 18:52 modules.ccwmap

-rw-r--r-- 1 root root  926 Dec 13 18:52 modules.dep

-rw-r--r-- 1 root root 1.5K Dec 13 18:52 modules.dep.bin

-rw-r--r-- 1 root root   73 Dec 13 18:52 modules.ieee1394map

-rw-r--r-- 1 root root  141 Dec 13 18:52 modules.inputmap

-rw-r--r-- 1 root root   81 Dec 13 18:52 modules.isapnpmap

-rw-r--r-- 1 root root   74 Dec 13 18:52 modules.ofmap

-rw-r--r-- 1 root root   95 Nov 30 22:06 modules.order

-rw-r--r-- 1 root root  281 Dec 13 18:52 modules.pcimap

-rw-r--r-- 1 root root   43 Dec 13 18:52 modules.seriomap

-rw-r--r-- 1 root root 8.4K Dec 13 18:52 modules.symbols

-rw-r--r-- 1 root root  15K Dec 13 18:52 modules.symbols.bin

-rw-r--r-- 1 root root 1.8K Dec 13 18:52 modules.usbmap

lrwxrwxrwx 1 root root   31 Nov 30 22:06 source -> /usr/src/linux-2.6.30-gentoo-

r8

drwxr-xr-x 2 root root 4.0K Dec 13 00:16 video
```

EDIT2: There is iwl*.ko files here:

```
# find / -name iwl*.ko

/usr/src/linux-2.6.30-gentoo-r8/drivers/net/wireless/iwlwifi/iwlcore.ko

/usr/src/linux-2.6.30-gentoo-r8/drivers/net/wireless/iwlwifi/iwl3945.ko
```

Last edited by CheatCat on Sat Dec 26, 2009 4:13 pm; edited 3 times in total

----------

## d2_racing

Ok, can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i 802

# cat .config | grep -i kill

# cat .config | grep -i iwl

```

----------

## CheatCat

You was fast! :O

cat .config | grep -i 802:

```
# CONFIG_VLAN_8021Q is not set

CONFIG_CFG80211=y

# CONFIG_CFG80211_REG_DEBUG is not set

CONFIG_LIB80211=y

CONFIG_LIB80211_DEBUG=y

CONFIG_MAC80211=y

CONFIG_MAC80211_RC_MINSTREL=y

# CONFIG_MAC80211_RC_DEFAULT_PID is not set

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_MAC80211_HWSIM is not set

# CONFIG_LEDS_BD2802 is not set

# CONFIG_RTC_DRV_BQ4802 is not set
```

cat .config | grep -i kill:

```
CONFIG_RFKILL=y

# CONFIG_RFKILL_INPUT is not set

CONFIG_RFKILL_LEDS=y

CONFIG_IWLWIFI_RFKILL=y
```

cat .config | grep -i iwl:

```
CONFIG_IWLWIFI=m

CONFIG_IWLWIFI_LEDS=y

CONFIG_IWLWIFI_RFKILL=y

# CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT is not set

# CONFIG_IWLWIFI_DEBUG is not set

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m

CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
```

----------

## zlomek

Maybe: 

 *Quote:*   

> 
> 
> CONFIG_IWLWIFI=y
> 
> CONFIG_IWL3945=y
> ...

 

----------

## CheatCat

But it stands on the wiki that the things should be build as modules (m).   :Confused: 

----------

## cach0rr0

 *CheatCat wrote:*   

> But it stands on the wiki that the things should be build as modules (m).  

 

and the wiki is correct - keep it as a module

So the fact that modprobe doesn't find it, but it exists at 

```
/usr/src/linux-2.6.30-gentoo-r8/drivers/net/wireless/iwlwifi/iwl3945.ko
```

would strongly hint at the notion that you need to cd into /usr/src/linux and type "make modules_install"

then:

```

modprobe -v iwl3945

```

and show is the output

if for some reason after doing that, the assuming you've already merged the ucode, then try loading the module by hand with:

```

insmod /usr/src/linux-2.6.30-gentoo-r8/drivers/net/wireless/iwlwifi/iwl3945.ko

```

and post back if it errors out with what you saw.

----------

## CheatCat

 *cach0rr0 wrote:*   

> 
> 
> and the wiki is correct - keep it as a module
> 
> So the fact that modprobe doesn't find it, but it exists at 
> ...

 

THANK YOU! That actually do the trick!  :Very Happy: 

Now I have the wlan0 driver in the list when typing ifconfig or iwconfig and everything seems to works.

I haven't manged to connect on boot yet and get errors that some commands doesn't exist! Here is my /etc/conf.d/net file:

```
modules=("iwconfig")

auto lo

iface lo inet loopback

auto eth0

auto wlan0

iface wlan0 inet dhcp

 wireless-essid NETGEAR
```

----------

## cach0rr0

no idea, i never configure wireless by hand

I always use wicd, which makes things much easier - if you have X working and all that, should check it out, and avoid the pain of having to configure things like wpa_supplicant.conf by hand

----------

## d2_racing

In fact, you should use WICD, because wpa_supplicant is hard to configure the first time.

But, for the record, can you post this :

```

# ifconfig -a

# iwconfig

# iwlist scan

```

----------

## Zeerak

Hmm I use wpa-supplicant, and it was hard to do the first time, but more so because the explanation in the handbook was hard to understand (for me) and it seemed to leave out some things that are relevant.

However, here's my wpa_supplicant.conf and /etc/conf.d/net

conf.d/net:

```
 This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

preferred_aps=("ESSID1" "ESSID2")

essid_wlan0="any"
```

and wpa_supplicant.conf:

```
# The below line mustn't be changed, otherwise the wireless won't work

ctrl_interface=/var/run/wpa_supplicant

# Allowing users to acces the WPA config

ctrl_interface_group=wheel

# Letting wpa_supplicant scan and select AccessPoint (AP)

ap_scan=1

# Network Specific information:

# Home - Aalborg

network={

  ssid="Foobar1"

  key_mgmt=WPA-PSK

  psk="XXXXXXXXXXXXX"

  priority=5

}

# Home - Copenhagen

network={

  ssid="Foo"

  key_mgmt=WPA-PSK

  psk="XXXXXXXXXXX"

  priority=2

}

# Uni - Basis

network={

  ssid="bar"

  key_mgmt=NONE

  priority=4

}

# Train: Aarhus - Copenhagen

network={

  ssid="TDC"

  key_mgmt=NONE

  priority=1

}
```

and her's a site to help configure: http://manual.sidux.com/en/internet-connecting-wpa-en.htm

I used WICD for a while (before configuring wpa_supplicant mind you) but I found that it ran rather unstable and would disconnect me from accesspoints (amongst these my home network that has three computers on it and can support 40) and reconnect me randomly, I'm pretty sure I'm the only one/one of the few, but I decided it was easier just to remove WICD and configure wpa_supplicant. And I haven't experienced anything remotely kin to an error since.  :Smile: 

----------

## CheatCat

I rather like to use network tools (iwconfig) than wpa-supplicant because I have no encryption.

ifconfig -a:

```
eth0      Link encap:Ethernet  HWaddr 00:16:d4:3c:59:2f  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:10 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:568 (568.0 B)  TX bytes:568 (568.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:13:02:54:84:be  

          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::213:2ff:fe54:84be/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:23915 errors:0 dropped:0 overruns:0 frame:0

          TX packets:24541 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:23206879 (22.1 MiB)  TX bytes:4941518 (4.7 MiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-54-84-BE-00-00-00-00-00-00-00-00-00

-00  

          UP RUNNING  MTU:0  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

iwconfig:

```
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:"NETGEAR"  

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:18:4D:83:97:AA   

          Bit Rate=54 Mb/s   Tx-Power=15 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=50/70  Signal level=-60 dBm  Noise level=-127 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

vboxnet0  no wireless extensions.
```

iwlist scan: 

```
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     Scan completed :

          Cell 01 - Address: 00:18:4D:83:97:AA

                    Channel:11

                    Frequency:2.462 GHz (Channel 11)

                    Quality=55/70  Signal level=-55 dBm  

                    Encryption key:off

                    ESSID:"NETGEAR"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=0000004ee4649187

                    Extra: Last beacon: 4ms ago

                    IE: Unknown: 00074E455447454152

                    IE: Unknown: 010882848B962430486C

                    IE: Unknown: 03010B

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: Unknown: 32040C121860

                    IE: Unknown: DD06001018020000

vboxnet0  Interface doesn't support scanning.
```

I think that I need a net script thing.

----------

