# [SOLVED] Wireless not working (Intel 5100 AGN, iwlagn)

## Mattiwatti

Hi guys. While I'm not new to Gentoo, I am completely new to using any type of Linux on a laptop, so this is probably easier than I'm thinking it is  :Razz: 

I can't get my wireless connection to work even though the kernel module and firmware seem to load fine. My laptop is an HP ProBook 4510s with an Intel 5100 wireless chip.

lspci -v:

 *Quote:*   

> 
> 
> 02:00.0 Network controller: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection
> 
>         Subsystem: Intel Corporation PRO/Wireless 5100AGN Network Connection
> ...

 

lspci -n (not sure what this means, but I've seen the output requested in other threads):

 *Quote:*   

> 
> 
> 00:00.0 0600: 8086:2a40 (rev 07)
> 
> 00:02.0 0300: 8086:2a42 (rev 07)
> ...

 

dmesg | grep iwlagn says the firmware is loaded:

 *Quote:*   

> 
> 
> [    3.329389] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:
> 
> [    3.329393] iwlagn: Copyright(c) 2003-2011 Intel Corporation
> ...

 

ifconfig initially doesn't see my wlan interface, but when I run ifconfig wlan2 up, it comes up and ifconfig shows it as follows:

 *Quote:*   

> 
> 
> wlan2     Link encap:Ethernet  HWaddr 00:1e:65:5f:8d:a6  
> 
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
> ...

 

I found it a bit strange that I also have a wlan0 and wlan1, even though my laptop only has one wireless interface. They both have MAC address 02:00:00:00:00:00. This probably isn't related to the problem but I thought I'd mention it.

iwconfig gives this:

 *Quote:*   

> 
> 
> lo        no wireless extensions.
> 
> eth0      no wireless extensions.
> ...

 

When I try iwlist wlan2 scan I get:

 *Quote:*   

> 
> 
> wlan2     Interface doesn't support scanning.
> 
> 

 

I'm using gentoo-sources 3.0.4 with the configuration options copied as closely as possible from http://en.gentoo-wiki.com/wiki/Iwlwifi (the wiki seems slightly outdated compared to the current kernel options). I've disabled RFKILL in the kernel just to be sure, but even when it wasn't disabled, rfkill list said nothing was blocked.

For the record, eth0 (regular wired) works fine.

Anyone see what I'm doing wrong? Help would be much appreciated  :Smile: 

Edit: Oh, I should probably mention, I have a Knoppix LiveDVD that has wireless working out of the box. So the hardware is working at least  :Razz: Last edited by Mattiwatti on Sun Sep 18, 2011 10:23 pm; edited 2 times in total

----------

## solamour

Please share "/etc/udev/rules.d/70-persistent-net.rules" and "/etc/conf.d/net" as well.

__

sol

----------

## Mattiwatti

Thanks for your post solamour, I got it to work, indirectly thanks to you!  :Smile: 

I was double checking my /etc/conf.d/net settings with the Gentoo handbook because of your post, when I noticed the command iwconfig eth0 essid apname (which I hadn't seen before because I had skipped directly to the wireless setup page of the handbook). When I ran that command, I got 'cannot read "/proc/net/wireless"', which in turn after a Google search sent me to this thread, where I found that the solution was to set CONFIG_CFG80211_WEXT=y in the kernel config.

Added /etc/init.d/net.wlan2 to the default runlevel and it works perfectly now.

For completion's sake, here are my working config files in case somebody has the same problem later.

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

 *Quote:*   

> 
> 
> # This file was automatically generated by the /lib64/udev/write_net_rules
> 
> # program, run by the persistent-net-generator.rules rules file.
> ...

 

/etc/conf.d/net:

 *Quote:*   

> 
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

Where AP1 and AP2 are my access points and 0000000000 and 0000000001 their respective hex keys.

Thanks again for your post  :Smile: 

One tiny gripe: connecting to the access point takes quite a long time, is there any way to make this happen in the background after logging in, rather than at bootup?

----------

## solamour

Glad to hear it's working now. As you most likely know already, if you have only 1 wireless interface and want to name it as "wlan0", just remove the corresponding entry in "/etc/udev/rules.d/70-persistent-net.rules" and reboot.

As for the delay during boot, try the following. I don't use it myself (it wasn't particularly reliable), but some people had success with it.

```
rc_parallel="YES"

```

__

solLast edited by solamour on Sun Sep 18, 2011 10:45 pm; edited 1 time in total

----------

## Mattiwatti

Thanks for the suggestion. Rc_parallel seems to work fine and booting is slightly faster, although AP scanning still takes up 17 seconds compared to the 6 seconds it takes to boot the system. Ah, the great burden of having an SSD  :Crying or Very sad: 

Anyway, just glad I've got my internet working, wasn't exactly convenient having to switch the only ethernet cable in the room between my desktop and my laptop  :Razz: 

Edit: Managed to fix the slow boot, turns out wpa_supplicant doesn't stall the system like wireless-tools does. And it connects faster as well!

----------

