# connecting to a restricted wireless network

## indietrash

ok so I've never been able to do this - connect to my network at home. my router. dhcpcd *never* works. I use iwconfig and set the proper essid, and key s:"my key".

but using dhcpcd wlan0 gets me this:

```

lolwabbit nwn # dhcpcd wlan0

wlan0: dhcpcd 4.0.2 starting

wlan0: waiting for carrier

wlan0: timed out

```

I can connect to any networks without encryption without trouble. I've even got on some networks with encryption, but it's been a bit hit or miss. but at home - no luck.Last edited by indietrash on Sat Nov 22, 2008 10:15 pm; edited 1 time in total

----------

## NeddySeagoon

indietrash,

What does your dmesg show ?

----------

## meal

indietrash:

do what NeddySeagoon said, and be sure if the link is established, run 

```
iwconfig wlan0
```

----------

## indietrash

dmesg: http://rafb.net/p/3jG7QO91.html

```
lolwabbit # iwconfig wlan0

wlan0     IEEE 802.11abgn  ESSID:"my 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:my-key   Security mode:open

          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

```

----------

## dmpogo

And what kind of encryption is there on your home network ?

----------

## indietrash

wpa2

----------

## albright

 *Quote:*   

> wpa2

 

you need to study/use wpa_supplicant, iwconfig can't

establish a connection with wpa, see

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

----------

## NeddySeagoon

indietrash,

Heres the interesting bits of dmesg:-

```
[279552.689587] iwlagn 0000:0e:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

[279552.689653] iwlagn 0000:0e:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x100106)

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

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

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

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

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

[298132.304481] wlan0: authenticate with AP 00:21:04:10:b0:98

[298132.306444] wlan0: authenticated

[298132.306447] wlan0: associate with AP 00:21:04:10:b0:98

[298132.308567] wlan0: RX AssocResp from 00:21:04:10:b0:98 (capab=0x431 status=12 aid=0)

[298132.308570] wlan0: AP denied association (code=12)
```

Thats all as we would expect. As albright says, you need wpa_supplicant to go any further

----------

## indietrash

will installing and prefering wpa_supplicant as in the handbook prevent me from using iwconfig and the rest of the wireless-tools? or do I merely use it in addition to wireless-tools?

----------

## dmpogo

 *indietrash wrote:*   

> will installing and prefering wpa_supplicant as in the handbook prevent me from using iwconfig and the rest of the wireless-tools? or do I merely use it in addition to wireless-tools?

 

Surely not on a command line,    but some care may have to be taken in /etc/conf.d/net script

----------

## indietrash

I emerged wpa_supplicant. my etc/conf.d/net looks like this:

```

config_wlan0=( 'none' )

sleep 5

config_eth0=( ' dhcp ')

modules=( "wpa_supplicant" )

wpa_supplicant_eth0="-Dmadwifi"

```

I'm not entirely sure what to do next though...

----------

## indietrash

any further help would be great thanks  :Smile: 

----------

## LJM9000

Here is what my config looks like for wpa2

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

   scan_ssid=1

        ssid="myssid"

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=TKIP

   group=TKIP

   psk="thisisntreallymypsk"

}

```

my net conf looks like this

```

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

```

----------

## indietrash

what/where is the wpaconfig?

----------

## mardicas

/etc/wpa_supplicant/wpa_supplicant.conf usualy there...

----------

