# wireless problem [SOLVED]

## senzacionale

i read

http://gentoo-wiki.com/HARDWARE_ipw2200

and part of this:

http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

but i have problemms. I don't have any /etc/conf.d/wireless.example file so i don't know how to make ESSID to default and where to add WEP KEY?

this is my iwconfig

```

iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      unassociated  ESSID:off/any

          Mode:Managed  Channel=0  Access Point: 00:00:00:00:00:00

          Bit Rate=0 kb/s   Tx-Power=20 dBm

          Retry 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

```

I need help!

----------

## NeddySeagoon

senzacionale,

You need this document a little bit of trial and error and to know that /etc/conf.d/wireless is depreciated.

You should put all the wireless setup into /etc/conf.d/net

If you search a little, you will find I've posted a complete working setup for a rausb device,  here it is. 

----------

## sethleon

here is my /etc/conf.d/net 

 *Quote:*   

> modules_eth1=("iwconfig")
> 
> key_WA24Master="******key******"
> 
> prefered_aps=( "WA24Master" )
> ...

 

mind that WA24Master is my wireless network name, and that the key is the type WEP (for iwconfig)

more options or commands can be found in the upper posted link

here's the part of /etc/conf.d/net.example

 *Quote:*   

> #-----------------------------------------------------------------------------
> 
> # WIRELESS (802.11 support)
> 
> # Wireless can be provided by iwconfig or wpa_supplicant
> ...

 

----------

## senzacionale

ok so iwconfig also support wep encryption for asus wireless router and i don't need to use wpa_supplicant?

----------

## NeddySeagoon

senzacionale,

Thats right.

----------

## sethleon

to be exactly iwconfig (meaning its features) only supports WEP and not WPA,

if you want to use the WPA encryption you need to use wpa_supplicant

----------

## senzacionale

No i am using only wep and MAC adress in my router

i have like this now

```

# Prefer iwconfig over wpa_supplicant

modules=( "iwconfig" )

# Configure WEP keys for Access Points called ESSID1 and ESSID2

# You may configure up to 4 WEP keys, but only 1 can be active at

# any time so we supply a default index of [1] to set key [1] and then

# again afterwards to change the active key to [1]

# We do this incase you define other ESSID's to use WEP keys other than 1

# Prefixing the key with s: means it's an ASCII key, otherwise a HEX key

# enc open specified open security (most secure)

# enc restricted specified restricted security (least secure)

key_default="s:xxxxxxxxx enc open"

config_default=( "dhcp" )

dhcpcd_default="-t 5"

dhcp_default="nodns"

# The below only work when we scan for available Access Points

# Sometimes more than one Access Point is visible so we need to

# define a preferred order to connect in

preferred_aps=( "default" )

```

must i enter default where write ESSID becouse my SSID name is default in router?

I can't find MAc adress in linux of my wireless card. Is the same as in windows?

but wireless not working! I am trying to fix that whole day but not working.

----------

## sethleon

do you have the elementry needs ? 

modules, emerged packages ?

mac address you get from ifconfig (see hardware address)

if the SSID is "default" by default   :Laughing:   ... sure substitute ESSID with "default"

----------

## senzacionale

i enter default for the name of SSID in my asus router.

I add mac adress of eth0 to my router that notebook can now access to internet.

I have installed everything but still not working.

```

 /etc/init.d/net.eth0 restart

 * Stopping apache2 ...                                                                                                                                               [ ok ] * Unmounting network filesystems ...                                                                                                                                 [ ok ] * Stopping proftpd ...                                                                                                                                               [ ok ] * Stopping sshd ...                                                                                                                                                  [ ok ] * Stopping eth0

 *   Loading networking modules for eth0

 *     modules: iwconfig wpa_supplicant essidnet iptunnel ifconfig dhcpcd apipa

 *   Bringing down eth0

 *     Stopping dhcpcd on eth0 ...                                                                                                                                    [ ok ] *     Shutting down eth0 ...                                                                                                                                         [ ok ] * Starting eth0

 *   Loading networking modules for eth0

 *     modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *       iwconfig provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Wireless extensions not found for eth0

 *   Bringing up eth0

 *     Configuration not set for eth0 - assuming dhcp

 *     dhcp

 *       Running dhcpcd ...                                                                                                                                           [ !! ]

/etc/conf.d

root@mitjab pts/2

```

----------

## sethleon

In your first post, you wrote that the wireless interface is eth1:

 *Quote:*   

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

 

so why do you do /etc/init.d/net.eth0 and not /etc/init.d/net.eth1

another issue is that you just wrote modules=... in your /etc/conf.d/net

try adding the interface:

```
modules_eth1=("iwconfig")
```

----------

## senzacionale

ok i see, my mistake

```

eth1 unassociated ESSID:off/any 

```

but in /etc/init.d i don't have any net.eth1 just net.eth0 and net.lo, so how to run eth1

----------

## NeddySeagoon

senzacionale,

You make a symbolic link from net.eth1 to net.lo, just like net.eth0 is now.

Then you can 

```
rc-update add net.eth1 defualt
```

to start it normally at boot.

----------

## senzacionale

like you said

```

ls -l net.eth0

lrwxrwxrwx  1 root root 6 sep 10 15:59 net.eth0 -> net.lo

```

so i create net.eth1 with

```

ln -s net.lo net.eth1

```

then i make

```

rc-update add net.eth1 defualt

```

and i get this error

```

/etc/init.d/net.eth1 start

 * Starting eth1

 *   Loading networking modules for eth1

 *     modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *       iwconfig provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Configuring wireless network for eth1

 *   Scanning for access points

 *     Found "<hidden>" at 00:11:D8:74:B8:DB (WEP required)

 *   WEP key is not set for "<hidden>" - not connecting

 *   Couldn't associate with any access points on eth1

 *   Failed to configure wireless for eth1                   

```

how to make wep key to hidden and why it couldn't associate with any access points on eth1.

i have this in /etc/conf.d/net

```

# Sometimes more than one Access Point is visible so we need to

# define a preferred order to connect in

preferred_aps=( "default" )

```

and this is my /etc/conf.d/net

```

# Prefer iwconfig over wpa_supplicant

modules_eth1=("iwconfig")

# Configure WEP keys for Access Points called ESSID1 and ESSID2

# You may configure up to 4 WEP keys, but only 1 can be active at

# any time so we supply a default index of [1] to set key [1] and then

# again afterwards to change the active key to [1]

# We do this incase you define other ESSID's to use WEP keys other than 1

# Prefixing the key with s: means it's an ASCII key, otherwise a HEX key

# enc open specified open security (most secure)

# enc restricted specified restricted security (least secure)

key_default="s:xxxxxxxxx enc open"

config_default=( "dhcp" )

dhcpcd_default="-t 5"

dhcp_default="nodns"

# The below only work when we scan for available Access Points

# Sometimes more than one Access Point is visible so we need to

# define a preferred order to connect in

preferred_aps=( "default" )

```

----------

## sethleon

could you rename your wlan, in other words change the SSID?

then for assigning a WEP key, scroll upwards to my config file, which works.

----------

## senzacionale

 *Quote:*   

> 
> 
> could you rename your wlan, in other words change the SSID? 
> 
> 

 

what do you mean with this?

i use your file and now looks like this

```

modules_eth1=("iwconfig")

key_default="XXXXXXXXX"

prefered_aps=( "default" )

config_default=("dhcp")

dhcpcd_default="-t 5"

```

but everything is the same, the same error.

----------

## sethleon

I mean do you have access to the Router, so that you could change the SSID,

maybe it's a name conflict   :Confused: 

----------

## senzacionale

yes i have access to my router. what name do you advice for SSID?

I change it to WA24Master like you have it but the same!

----------

## NeddySeagoon

senzacionale,

Your WEP key is not for your ESSID, or its not set properly.

Your wireless can see your AP but cannot connect because either the ESSIDs at the router and PC do not match or the WEP key is not correct for your router or both.

Look at my working set-up, which I posted a link to further up this thread.

Copy the syntax at least.

----------

## senzacionale

```

SSID:

default

WEP:

0CE2C2xxxx

6A5B4Cxxxx

2D0C3Dxxxx

53005Fxxxx

```

this are correct numbers and the correct name for SSID.

Your configuration is like this

```

# Use iwconfig for wireless

modules=("iwconfig")

key_RadioNet="[1] <hex-key-removed> key [1] enc open"

#iwconfig_rausb0="essid RadioNet"

essid_rausb0="RadioNet"

#iwconfig_rausb0="channel 2"

channel_rausb0="2"

#iwconfig_rausb0="mode managed"

mode_rausb0="managed"

config_rausb0=( "192.168.100.90 netmask 255.255.255.0" )

routes_rausb0=( "default gw 192.168.100.1"

              "-net 192.168.0.0/24 gw 192.168.100.6"

            )

```

what this means

```

#iwconfig_rausb0="channel 2"

channel_rausb0="2"

#iwconfig_rausb0="mode managed"

mode_rausb0="managed"

```

so my configuration will look like this now

```

# Use iwconfig for wireless

modules=("iwconfig")

key_default="[1] xxxxxxxxx key [1] enc open"

#iwconfig_rausb0="essid RadioNet", i have aps instead of rausb0

essid_aps="default"

config_aps=( "dhcp" )

```

but still not working. I am working on this whole day but still not working, bad!

----------

## NeddySeagoon

senzacionale.

```
#iwconfig_rausb0="channel 2"

channel_rausb0="2"

#iwconfig_rausb0="mode managed"

mode_rausb0="managed" 
```

These commands set the wireless channel to channel 2 and the network type to managed as opposed to ad-hoc.

They are probably unnessacary, since use of an AP will force managed and the wireless should detect the radio channel on its own.

This bit 

```
WEP:

0CE2C2xxxx

6A5B4Cxxxx

2D0C3Dxxxx

53005Fxxxx 
```

looks like it should be four keys, in which case the syntax is

```
key_RadioNet="[1] <hex-key-removed> key [1] enc open" 

key_RadioNet="[2] <hex-key-removed> key [2] enc open"

key_RadioNet="[3] <hex-key-removed> key [3] enc open" 

key_RadioNet="[4] <hex-key-removed> key [4] enc open" 
```

and RadioNet is the ESSID of the network.

----------

## senzacionale

ok, and RadioNet is the ESSID of the network. So instead of ESSID i must enter default.

what is the MAC Adress of wireless card. Is this of ifconfig correct.

----------

## senzacionale

```

modules=("iwconfig")

key_default="[1] <hex-key-removed> key [1] enc open"

key_default="[2] <hex-key-removed> key [2] enc open"

key_default="[3] <hex-key-removed> key [3] enc open"

key_default="[4] <hex-key-removed> key [4] enc open"

essid_aps="default"

config_aps=( "dhcp" )

```

is this OK now, but still not working.

----------

## NeddySeagoon

senzacionale,

You must change RadioNet to your ESSID

----------

## senzacionale

name of my SSID in router is default, so i think that i must change RadioNet to default or i must leave ESSID?

----------

## NeddySeagoon

senzacionale,

RadioNet -> defualt is correct.

Oh! the ESSID is case sensitive too.

----------

## senzacionale

how do you meane case sensitive? i write default, which is correct.

----------

## StaraDama

i have the same problems. My SSID name is ALEGBAK.

I try everything but wireless not working correctly. I get the same error as Senzacionale did.

----------

## NeddySeagoon

senzacionale, StaraDama,

Here is my working set up, apart for the static allocation of the IP address - I don't use dhcp yet.

```
# Use iwconfig for wireless

modules=("iwconfig")

key_RadioNet="[1] 207c-9c4d-84 key [1] enc open"

#iwconfig_rausb0="essid RadioNet"

essid_rausb0="RadioNet"

#iwconfig_rausb0="channel 2"

channel_rausb0="2"

#iwconfig_rausb0="mode managed"

mode_rausb0="managed"
```

senzacionale,

Changing it for your ESSID of default and wireless logical device name of aps gets :- 

```
# Use iwconfig for wireless

modules=("iwconfig")

key_default="[1] 207c-9c4d-84 key [1] enc open"

#iwconfig_aps="essid RadioNet"

essid_aps="default"

#iwconfig_aps="channel 2"

channel_aps="2"

#iwconfig_aps="mode managed"

mode_aps="managed"
```

Hmm... aps is a strange logical device name, thay are normally letters with a number on the end, since several devices of the same type are supported by the kernel. e.g. eth0, wlan0, rausb0, ra0, ath0, additional devices change the end digit.

Your logical device names appear in 

```
ifconfig -a
```

Where I have put aps (which is what you posted earlier) you need the logical name for your wireless device from the above command.

----------

## senzacionale

aps is not correct as i see now

this is output of  ifconfig -a. What is correct name now instead of aps? Is eth1 OK

```

 ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:0C:76:F8:66:C0

          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:238 errors:0 dropped:0 overruns:0 frame:0

          TX packets:196 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:281622 (275.0 Kb)  TX bytes:22099 (21.5 Kb)

          Interrupt:5 Base address:0xc800

eth1      Link encap:Ethernet  HWaddr 00:0E:35:3D:A3:F5

          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)

          Interrupt:9 Base address:0x2000 Memory:ffdfe000-ffdfefff

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:88 errors:0 dropped:0 overruns:0 frame:0

          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:5550 (5.4 Kb)  TX bytes:5550 (5.4 Kb)

```

AND FINALLY WORKING. YEEEEEEES

This is my configuration now

```

# Use iwconfig for wireless

modules_eth1=("iwconfig")

key_default="[1] 0CE2C2xxxx key [1] enc open"

#key_default="[2] 6A5B4Cxxxx key [2] enc open"

#key_default="[3] 2D0C3Dxxxx key [3] enc open"

#key_default="[4] 53005Fxxxx key [4] enc open"

#iwconfig_aps="essid RadioNet"

essid_eth1="default"

#iwconfig_aps="channel 2"

channel_eth1="2"

#iwconfig_aps="mode managed"

mode_eth1="managed"

#config_eth1="dhcp"

config_eth1=( "192.168.1.7 broadcast 192.168.1.255 netmask 255.255.255.0" )

routes_eth1=( "default gw 192.168.1.1" )

```

Why is channel 2 and not 1?

i also do this

```

# echo ieee80211 >> /etc/modules.autoload.d/kernel-2.6

# echo ieee80211_crypt >> /etc/modules.autoload.d/kernel-2.6

# echo ieee80211_crypt_wep >> /etc/modules.autoload.d/kernel-2.6

# echo ipw2200 >> /etc/modules.autoload.d/kernel-2.6

```

THNX DUDE YOU SAVED ME, THNX AGAIN!

----------

## NeddySeagoon

senzacionale,

 *Quote:*   

> Why is channel 2 and not 1? 

 

The channels are just like TV channels. Which one you use does not matter as long as all your wireless networks use the same one.

Its a good idea to not use the default channel - it gets crowded with people unpacking their equipment and switching it on.

Use 

```
iwconfig eth1 ap
```

  to see how many Access Points are in range and on what channel.

Try to get a channel to yourself.

----------

## senzacionale

Thnx NeddySeagoon

```
root@mitjab pts/0 iwconfig eth1 ap

Error for wireless request "Set AP Address" (8B14) :

    too few arguments.

```

do you mean 

```
iwconfig eth1 ap auto
```

can you tell me if is possible that when i am running /etc/init.d/net.eth1 instead of /etc/conf.d/net, /etc/conf.d/net.wireless file willl be called?

----------

## NeddySeagoon

senzacionale,

When you run /etc/init.d/net.eth1  both /etc/conf.d/net and /etc/conf.d/wireless are used. You can put the wireless bits into /etc/conf.d/wireless if you wish.  However, /etc/conf.d/wireless is depreciated and will be removed soon, so its not a good idea.

I gave the wrong command 

```
iwlist eth1 ap
```

will list wireless networks within range.

----------

## senzacionale

thnx dude for all thh help

iwlist eth1 ap can't find any access points becouse my router is hidding SSID but thnx anyway i will remember this command.

THNX AGAIN FOR ALL THE HELP, WIRELESS WORKS NOW SUPERB  :Very Happy:   :Very Happy: 

----------

## sethleon

in some cases (like me) I get an AP list using:

```
iwlist scan
```

----------

## mikers456

Thanks Neddy -- that fixed my problem too.

I keep running into your posts and they keep fixing my problems.

Thanks again.

----------

