# Can t scan for wifi network

## xmaes

Hi,

I try to configure wifi on my laptop.

My wifi adapter is :

```
02:00.0 Network controller: Intel Corporation Wireless WiFi Link 5300
```

i configured the kernel like that: http://paste.pocoo.org/show/255712/

and installed

```
I--] [  ] net-wireless/iwl5000-ucode-8.24.2.12 (1)
```

and the firmware is loaded at start up

```
laptop xavier # dmesg | grep iwl

iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:d

iwlagn: Copyright(c) 2003-2010 Intel Corporation

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

iwlagn 0000:02:00.0: setting latency timer to 64

iwlagn 0000:02:00.0: Detected Intel Wireless WiFi Link 5300AGN REV=0x24

iwlagn 0000:02:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels

iwlagn 0000:02:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:02:00.0: loaded firmware version 8.24.2.12

phy0: Selected rate control algorithm 'iwl-agn-rs'

iwlagn 0000:02:00.0: RF_KILL bit toggled to disable radio.

iwlagn 0000:02:00.0: RF_KILL bit toggled to enable radio.

iwlagn 0000:02:00.0: RF_KILL bit toggled to disable radio.

iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch

iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch

```

I can see the interface

```
laptop xavier # ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:21:6a:79:c9:3a  

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

if i try to stat the wpa_supplicant service i get the following

```
laptop xavier # /etc/init.d/wpa_supplicant start

 * Starting WPA Supplicant Daemon ...

ioctl[SIOCSIWAP]: Input/output error

ioctl[SIOCSIWESSID]: Input/output error                                                                                                                                                                  [ ok ]

laptop xavier # 
```

and then

```
laptop xavier # wpa_cli 

wpa_cli v0.6.10

Selected interface 'wlan0'

Interactive mode

> scan

<2>CTRL-EVENT-SCAN-RESULTS 

OK

> <2>CTRL-EVENT-SCAN-RESULTS 

scan_<2>CTRL-EVENT-SCAN-RESULTS 

results

bssid / frequency / signal level / flags / ssid

> 
```

but i never get a result of any network.

if i run 

```
laptop xavier # wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

ioctl[SIOCSIWAP]: Input/output error

ioctl[SIOCSIWESSID]: Input/output error

ioctl[SIOCSIWSCAN]: Input/output error

Failed to initiate AP scan.

ioctl[SIOCSIWSCAN]: Input/output error

Failed to initiate AP scan.

ioctl[SIOCSIWSCAN]: Input/output error

Failed to initiate AP scan.
```

I keep getting the Failed to initiate AP scan

my /etc/wpa_supplicant/wpa_supplicant.conf

```
# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

network={

        ssid="something"

        proto=WPA

        key_mgmt=WPA-PSK

        psk=something

        priority=2

}
```

and my vim /etc/conf.d/net

```
config_eth0="dhcp"

modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=15
```

I configure my route to use WPA2-PSK and AES.

I use to have debian install and the same machine and wifi was working fine with network-manager but now i want it on gentoo with wpa_supplicant.

Any help would be apreciated,

Thanks,

Xavier

----------

## NeddySeagoon

xmaes,

```
iwlagn 0000:02:00.0: Radio disabled by HW RF Kill switch
```

You need to switch the wireless on. You have a physical switch you must operate.

----------

## xmaes

thank you the message make sense now..but the physical switch is on, actually that more like a panel of lights.

Maybe i have to install a package to control those buttons.

Even if i can physically activate/deactivate them maybe it is not actually doing anything  (there is no additional entry in dmesg)

My laptop is a HP elitebook 6930p

----------

## xmaes

ok i have to disconnect in order to activate the wifi.

Bringing down eth0 is not enough...

----------

