# problems with wifi card and web key

## multix

Hi,

I have a problem setting up my wireless card (PCMCIA card).

when I set the key, I get the following error:

```

think multix # iwconfig eth1 key s:12341234

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device eth1 ; No such device.

```

The card seems to be correctly recognized: iwconfig tells me:

```

think multix # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""

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

          Tx-Power=0 dBm

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

          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

sit0      no wireless extensions.

```

( do not know what the wmaster0 and sit0 devices are )

dmesg tells me:

```

[    2.862076] ath5k 0000:07:00.0: enabling device (0000 -> 0002)

[    2.870056] ath5k 0000:07:00.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11

[    2.877991] ath5k 0000:07:00.0: registered as 'phy0'

[    3.007601] ath: EEPROM regdomain: 0x809c

[    3.007605] ath: EEPROM indicates we should expect a country code

[    3.007611] ath: doing EEPROM country->regdmn map search

[    3.007616] ath: country maps to regdmn code: 0x52

[    3.007621] ath: Country alpha2 being used: CN

[    3.007625] ath: Regpair used: 0x52

[    3.009231] phy0: Selected rate control algorithm 'minstrel'

[    3.009879] ath5k phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)

```

which looks sane.

What am I missing? maybe some kernel option? What's the device that is not being found?

Thank you.

----------

## NeddySeagoon

multix,

```
SET failed on device eth1 ; No such device.
```

is correct as you have

```
lo, eth0, wmaster0, wlan0 and sit0
```

wmaster0 is not yet used - ignore it.  sit0 is an IPv6 over IPv4 tunnel endpoint.

wlan0 is your wireless.

You need to set the key on wlan0, not eth1

----------

## multix

If I issue the command on wlan0 I get a similar, but slightly different error:

```

think multix # iwconfig wlan0 key s:12341234

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device wlan0 ; Invalid argument.

```

----------

## NeddySeagoon

multix,

At least it found the device. 

```
iwconfig wlan0 key s:
```

  expects you to pass a string, not a hex key.

Try putting quotes arounf the string 

```
iwconfig wlan0 key s:"12341234" 
```

Be warned that setting the key with a string often fails when you want to use equipment from different manufacterers as the same password is turned into different keys.

For security wep isn't worth bothering with. It only takes a few moments to break. Get wpa_supplicant and use WPA2.

Thats not be broken yet.

----------

## multix

Hi,

it is the same syntax I use on another gentoo computer (with an intel card though).

No quotes, according to "man iwconfig" and to http://sourceforge.net/mailarchive/forum.php?forum_name=ipw3945-devel&max_rows=25&style=nested&viewmonth=200809&viewday=20

Switching security is not an option, I need to have it working with WEP. Sorry.

Riccardo

----------

## NeddySeagoon

multix,

Try 

```
iwconfig wlan0 key s:12341234 1
```

to set the key in slot 1 (there are 4 key slots) then

```
iwconfig wlan0 key 1
```

to choose to use that key slot

----------

## multix

Hi,

 *NeddySeagoon wrote:*   

> 
> 
> ```
> iwconfig wlan0 key s:12341234 1
> ```
> ...

 

unfortuantely, I get the error already here:

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device wlan0 ; Invalid argument.

However, dropping the s: (which is described in the manual and works on other cards) seems to do the job. very strange.

----------

