# Wireless - key:command not found

## klappstuhl

Hello!

I'm trying to connect to our wireless network. I' m using D-Link DWL-G122. I have installed the Driver "rt73" (others should not work). This is my /etc/conf.d/net:

```
modules=( "iwconfig" ) 

key_WLAN-001A4FDF5CF3="s:XXX enc open" 

preferred_aps=( "WLAN-001A4FDF5CF3" ) 

config_WLAN-001A4FDF5CF3=( "dhcp" ) 

dhcpcd_WLAN-001A4FDF5CF3="-t 4"
```

And that' s what I get when I try to connect:

```
user user # /etc/init.d/net.wlan0 start 

 * Caching service dependencies ... 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )' 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )' 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )' 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )' 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )'           [ ok ] 

/etc/conf.d/net: line 12: key_WLAN-001A4FDF5CF3=s:XXX enc open: command not found 

/etc/conf.d/net: line 14: syntax error near unexpected token `"dhcp"' 

/etc/conf.d/net: line 14: `config_WLAN-001A4FDF5CF3=( "dhcp" )' 

 * Starting wlan0 

 *   Configuring wireless network for wlan0 

 *   WEP key is not set for "WLAN-001A4FDF5CF3" - not connecting 

 *   WEP key is not set for "NewMembersOnly" - not connecting 

 *   Couldn't associate with any access points on wlan0 

 *   Failed to configure wireless for wlan0                               [ !! ]
```

So firstable Linux can' t find the command whith whitch the key is set up, then it complains about a missing WEP key. I can' t find the mistake.

The Wireless Device seems to work becaus it evens recognizes "NewMembersOnly" (i think it' s the network of my neighbour).

I have alreade postet in the German forum, but did not get an answer.

Thanks for a Reply!

And sorry for my bad english  :Smile: .

----------

## barbar

Did you emerge wireless-tools ?

Otherwise you can add WEP-Key in hex form to

/etc/conf.d/net:

```
key_ESSID="YOUR_WEP_KEY_IN_HEX"
```

----------

## UberLord

 *klappstuhl wrote:*   

> Hello!
> 
> I'm trying to connect to our wireless network. I' m using D-Link DWL-G122. I have installed the Driver "rt73" (others should not work). This is my /etc/conf.d/net:
> 
> ```
> ...

 

You missed the part in the net.example file that tells you to change non alpha numeric chars to _

key_WLAN-001A4FDF5CF3="s:XXX enc open" 

should be

key_WLAN_001A4FDF5CF3="s:XXX enc open"

That applies to your other lines too.

----------

## klappstuhl

Hi!

Thanks for the support. I don 't get any more error messages about a missing key-command. The new output is:

```
# /etc/init.d/net.wlan0 restart

 * Caching service dependencies ...                                       [ ok ]

 * Stopping wlan0

 *   Bringing down wlan0

 *     Stopping dhcpcd on wlan0 ...                                       [ ok ]

 *     Shutting down wlan0 ...                                            [ ok ]

 * Starting wlan0

 *   Configuring wireless network for wlan0

 *     wlan0 connected to ESSID "WLAN-001A4FDF5CF3"

 *     in managed mode on channel 11 (WEP enabled)

 *   Bringing up wlan0

 *     dhcp

 *       Running dhcpcd ...

wlan0: dhcpcd 4.0.2 starting

wlan0: broadcasting for a lease

wlan0: timed out

wlan0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan0.lease'

wlan0: checking 169.254.108.243 is available on attached networks

wlan0: using IPv4LL address 169.254.108.243                               [ ok ]

 *       wlan0 received address 169.254.108.243/16

```

I have increased the timeout limit up to 60 sec, but it seems that my pc doesn't get an IP adress from the server. I've installed dhcpcd and wireless-tools correctly.

----------

## klappstuhl

Is there nobody who can help me?

----------

