# iwlagn intel 5100 troubles

## Gecklord

Hi!

I've got an Intel 5100 wifi card inside my notebook but it won't work!

dmesg:

```
[   49.144466] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   49.144562] iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   49.144947] firmware: requesting iwlwifi-5000-1.ucode

[   51.372166] Registered led device: iwl-phy0:radio

[   51.372199] Registered led device: iwl-phy0:assoc

[   51.372229] Registered led device: iwl-phy0:RX

[   51.372267] Registered led device: iwl-phy0:TX

[   51.740996] ADDRCONF(NETDEV_UP): wlan0: link is not ready

```

lsmod:

```
ricoh_mmc              11264  0                                                                                 

iwlagn                 84484  0                                                                                 

mmc_core               47388  1 sdhci                                                                           

snd                    49700  12 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_pcm,snd_timer

iwlcore                75076  1 iwlagn

pcspkr                  9984  0

mac80211              151580  2 iwlagn,iwlcore

uvcvideo               59528  0
```

iwlist scan:

```
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

pan0      Interface doesn't support scanning.
```

neither kernel-2.6.27 nor kernel-2.6.28 work!

Besides, I'm using networkmanager

Any ideas?

Regards,

Georg

----------

## d2_racing

Hi, can you post this :

```

# rmmod iwlagn

# modprobe iwlagn

# ifconfig wlan0 up

# iwlist scan

# dmesg | tail

```

----------

## Gecklord

Here you are:

rmmod iwlagn

```
laptop georg # rmmod iwlagn

laptop georg #

```

modprobe iwlagn

```
laptop georg # modprobe iwlagn

laptop georg #

```

ifconfig wlan0 up

```
laptop georg # ifconfig wlan0 up

laptop georg #
```

iwlist scan

```

laptop georg # iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

pan0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     No scan results

laptop georg #

```

dmesg | tail

```
laptop georg # dmesg | tail

[  228.571736] iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

[  228.601781] iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

[  228.604096] phy1: Selected rate control algorithm 'iwl-agn-rs'

[  233.159163] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[  233.159482] firmware: requesting iwlwifi-5000-1.ucode

[  235.323691] Registered led device: iwl-phy1:radio

[  235.324465] Registered led device: iwl-phy1:assoc

[  235.325109] Registered led device: iwl-phy1:RX

[  235.326250] Registered led device: iwl-phy1:TX

[  235.330613] ADDRCONF(NETDEV_UP): wlan0: link is not ready

laptop georg #

```

----------

## d2_racing

Can you post this :

```

# equery list iwl

```

----------

## Gecklord

```
laptop georg # equery list iwl

[ Searching for package 'iwl' in all categories among: ]

 * installed packages

[I--] [ ~] net-wireless/iwl3945-ucode-15.28.1.6 (0)

[I--] [ ~] net-wireless/iwl4965-ucode-228.57.1.21 (0)

[I--] [ ~] net-wireless/iwl4965-ucode-228.57.2.21 (1)

[I--] [  ] net-wireless/iwl5000-ucode-5.4.0.11 (0)

```

----------

## Gecklord

no ideas?

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

```

----------

## Gecklord

```
laptop georg # emerge --info

Portage 2.2_rc14 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-sabayon i686)

=================================================================                                          

System uname: Linux-2.6.27-sabayon-i686-Intel-R-_Core-TM-2_Duo_CPU_T5870_@_2.00GHz-with-glibc2.0           

Timestamp of tree: Sun, 22 Mar 2009 19:30:01 +0000                                                         

app-shells/bash:     3.2_p48                                                                               

dev-java/java-config: 1.3.7, 2.1.6-r1                                                                      

dev-lang/python:     2.5.2-r8                                                                              

dev-util/cmake:      2.6.3                                                                                 

sys-apps/baselayout: 2.0.0                                                                                 

sys-apps/openrc:     0.3.0-r2                                                                              

sys-apps/sandbox:    1.6                                                                                   

sys-devel/autoconf:  2.63                                                                                  

sys-devel/automake:  1.10.1-r1                                                                             

sys-devel/binutils:  2.18-r4                                                                               

sys-devel/gcc-config: 1.4.0-r4                                                                             

sys-devel/libtool:   2.2.6a                                                                                

virtual/os-headers:  2.6.27-r2                                                                             

ACCEPT_KEYWORDS="x86 ~x86"                                                                                 

CBUILD="i686-pc-linux-gnu"                                                                                 

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"                                                    

CHOST="i686-pc-linux-gnu"                                                                                  

CONFIG_PROTECT="/etc /etc/entropy /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config /usr/share/xbmc/userdata"                                                                                  

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/skel /etc/splash /etc/terminfo /etc/udev/rules.d"       

CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"                                                       

DISTDIR="/usr/portage/distfiles"                                                                                

FEATURES="collision-protect distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                                                              

GENTOO_MIRRORS="http://213.186.33.38/gentoo-distfiles/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://213.186.33.38/gentoo-distfiles/ http://212.219.56.138/sites/www.ibiblio.org/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"                                                                                         

LANG="en_US.UTF-8"                                                                                              

LC_ALL="en_US.UTF-8"                                                                                            

LDFLAGS="-Wl,-O1"

LINGUAS="en"

MAKEOPTS="-j3 -s "

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage/layman/sabayon"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="3dfx 7Zip X a52 aac aalib accessibility acl acpi aiglx aim alsa artswrappersuid audiofile avahi berkdb bidi bluetooth branding bzip2 cairo cdda cddb cdr chm cjk cli config_wizard cpudetection cracklib crypt css cups dbox2 dbus device-mapper dga dri dts dv dvb dvd dvdr dvdread dvi dxr3 emboss encode extramodules fam fame fat ffmpeg fftw firefox flac flash foomatic-db fortran freetype gcj gdbm gif gimpprint gnutls gphoto2 gpm gs gsm gstreamer gtk hal hfs iconv icq ieee1394 imap inotify ipod ipv6 irc irda isdnlog jabber jack jfs jingle joystick jpeg kde kdeenablefinal kdehiddenvisibility kdeprefix kerberos kickoff kipi lame lcd ldap libnotify live lj lm_sensorslogitech-mouse lzo mad mail midi mikmod mjpeg mmx mng mozdevelop mp3 mp3rtp mpeg msn mudflap musepack musicbrainz mysql ncurses network new-login nls nptl nptlonly nsplugin ntfs ogg openal openexr opengl openmp pam pcmcia pcre pda pdf perl png povray ppds pppd pulseaudio python qt3 qt3support qt4 quicktime quotas rar rdesktop readline reflection reiserfs rss scanner sdl session slp sms speex spell spl ssl startup-notification stream svg sysfs tcpd theora tiff tracker truetype udev unicode usb v4l v4l2 visualization voice vorbis weather wifi win32codecs wmf x264 x86 xcb xfs xine xinerama xml xorg xpm xprint xulrunner xv xvid xvmc yahoo zeroconf zlib" ALSA_CARDS="emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart monapcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logiomem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CAMERAS="agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 adc65 aox barbie canon clicksmart310 digigr8 digita directory enigma13 fuji gsmart300 hp215 iclick jamcamjd11 konica largan lg_gsm mars mustek pccam300 pccam600 ptp2 ricoh samsung sierra smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z template" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="audio audio_alsa" USERLAND="GNU" VIDEO_CARDS="fbdev vesa"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## d2_racing

Hi, can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i 802

# cat .config | grep -i iwl

```

----------

## Gecklord

```
laptop linux # cat .config | grep -i 802

CONFIG_BRIDGE_EBT_802_3=m

CONFIG_VLAN_8021Q=m

CONFIG_VLAN_8021Q_GVRP=y

CONFIG_CFG80211=y

CONFIG_NL80211=y

CONFIG_MAC80211=m

CONFIG_MAC80211_RC_PID=y

CONFIG_MAC80211_RC_DEFAULT_PID=y

CONFIG_MAC80211_RC_DEFAULT="pid"

CONFIG_MAC80211_MESH=y

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

CONFIG_IEEE80211=m

# CONFIG_IEEE80211_DEBUG is not set

CONFIG_IEEE80211_CRYPT_WEP=m

CONFIG_IEEE80211_CRYPT_CCMP=m

CONFIG_IEEE80211_CRYPT_TKIP=m

CONFIG_WLAN_PRE80211=y

CONFIG_WLAN_80211=y

# CONFIG_MAC80211_HWSIM is not set

```

```
laptop linux # cat .config | grep -i iwl

CONFIG_IWLWIFI=m

CONFIG_IWLCORE=m

CONFIG_IWLWIFI_LEDS=y

CONFIG_IWLWIFI_RFKILL=y

# CONFIG_IWLWIFI_DEBUG is not set

CONFIG_IWLAGN=m

CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y

CONFIG_IWLAGN_LEDS=y

CONFIG_IWL4965=y

CONFIG_IWL5000=y

CONFIG_IWL3945=m

CONFIG_IWL3945_RFKILL=y

CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y

CONFIG_IWL3945_LEDS=y

# CONFIG_IWL3945_DEBUG is not set

```

----------

## Gecklord

I have an update:

without changing any configuration my system found wlan-networks and could connect with them. this worked well for about 4-5 boot cycles but now it does not work again!

I have no explanaition for this!

----------

## d2_racing

Ok, when you are able to connect please post this :

```

# ifconfig -a

# iwconfig

# wpa_cli status

# dmesg | grep -i iwl

```

And when you are unable, post this : 

```

# ifconfig -a

# iwconfig

# wpa_cli status

# dmesg | grep -i iwl

```

I'm sure that we will see something why you had a disconnect.

----------

## Gecklord

Finally:

When no wlan-network was found:

ifconfig -a

```
laptop georg # ifconfig -a                                               

eth0      Link encap:Ethernet  HWaddr 00:24:8c:08:e6:51                  

          UP 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)                         

          Interrupt:219 Base address:0xa000                              

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:130 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:10816 (10.5 KiB)  TX bytes:10816 (10.5 KiB)

pan0      Link encap:Ethernet  HWaddr 7e:e1:53:0f:d7:c5

          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:0

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

wlan0     Link encap:Ethernet  HWaddr 00:21:6b:29:c8:98

          UP 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)

wmaster0  Link encap:UNSPEC  HWaddr 00-21-6B-29-C8-98-6C-6F-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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

```
laptop georg # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=15 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

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

pan0      no wireless extensions.
```

wpa_cli status

```
laptop georg # wpa_cli status

Failed to connect to wpa_supplicant - wpa_ctrl_open: Success
```

dmesg | grep -i iwl

```
laptop georg # dmesg | grep -i iwl

[   22.694773] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

[   22.694777] iwlagn: Copyright(c) 2003-2008 Intel Corporation

[   22.694871] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   22.694882] iwlagn 0000:02:00.0: setting latency timer to 64

[   22.694912] iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

[   22.725341] iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

[   22.725614] iwlagn 0000:02:00.0: PCI INT A disabled

[   22.742228] phy0: Selected rate control algorithm 'iwl-agn-rs'

[   50.290012] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   50.290103] iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   50.290828] firmware: requesting iwlwifi-5000-1.ucode

[   52.530993] Registered led device: iwl-phy0:radio

[   52.531029] Registered led device: iwl-phy0:assoc

[   52.531067] Registered led device: iwl-phy0:RX

[   52.531097] Registered led device: iwl-phy0:TX

[   53.031140] iwlagn: Error sending REPLY_ADD_STA: time out after 500ms.
```

----------

## Gecklord

connected to my home wlan:

ifconfig -a

```
laptop georg # ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:24:8c:08:e6:51  

          UP 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)              

          Interrupt:219                                       

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:130 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0                             

          RX bytes:10816 (10.5 KiB)  TX bytes:10816 (10.5 KiB)

pan0      Link encap:Ethernet  HWaddr f6:85:f5:dc:95:31

          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:0

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

wlan0     Link encap:Ethernet  HWaddr 00:21:6b:29:c8:98

          inet addr:192.168.0.16  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::221:6bff:fe29:c898/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:768680 (750.6 KiB)  TX bytes:180848 (176.6 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-21-6B-29-C8-98-77-6C-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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 

```
laptop georg # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:"crack"

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:15:E9:63:DA:0E

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

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:*********************   Security mode:open

          Power Management:off

          Link Quality=45/100  Signal level:-70 dBm  Noise level=-88 dBm

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

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

pan0      no wireless extensions.

```

wpa_cli status

```
laptop georg # wpa_cli status

Failed to connect to wpa_supplicant - wpa_ctrl_open: Success

```

dmesg | grep -i iwl

```

laptop georg # dmesg | grep -i iwl

[   21.159324] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks

[   21.159327] iwlagn: Copyright(c) 2003-2008 Intel Corporation

[   21.159401] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   21.159409] iwlagn 0000:02:00.0: setting latency timer to 64

[   21.159433] iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54

[   21.189333] iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels

[   21.190330] iwlagn 0000:02:00.0: PCI INT A disabled

[   21.190780] phy0: Selected rate control algorithm 'iwl-agn-rs'

[   45.237745] iwlagn 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[   45.237826] iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

[   45.237988] firmware: requesting iwlwifi-5000-1.ucode

[   47.457996] Registered led device: iwl-phy0:radio

[   47.458353] Registered led device: iwl-phy0:assoc

[   47.458859] Registered led device: iwl-phy0:RX

[   47.458986] Registered led device: iwl-phy0:TX

[   47.959051] iwlagn: Error sending REPLY_ADD_STA: time out after 500ms.

```

besides, it seems as if a wlan-network is more likely to be found with a plugged-in power adaptor... but it did work with batteries only as well...

----------

## d2_racing

In fact, can you try that :

When your laptop is plug :

```

# iwlist scan

```

And when you use your battery :

```

# iwlist scan

```

----------

## Gecklord

I did try that already, but no pattern was noticeable!

Additionally, nm-applet (networkmanager) sometimes shows available wlan-networks when iwlist scan can't find any.

----------

## d2_racing

Can you try the latest Gentoo-sources ?

----------

