# OK, looks like I'm too stupid to make wireless work...

## Citizen Bleys

After checking every online FAQ I could find and messing around in a terminal window, I've finally managed to get to the point where iwconfig admits that my wireless card exists.  I do not know how I did this.  I am afraid to reboot.

First, the infrastructure:

Wireless Router: Linksys WRT54GS

SSID: Terminus

using WPA-PSK

Algorithm: TKIP

Channel 11 (but I will probably change to 9 as soon as I have any signal problems)

Gateway IP: 192.168.1.1/24

DHCP pool: 192.168.1.100-192.168.1.149

There are 3 other computers in the network, all using ethernet, all working.

My computer:

presently getting 192.168.1.102/24 on eth1 via DHCP

there is a net.eth0 in /etc/init.d but I have no idea what it's used for.  It's not my wireless card

My wireless adapter:

```
lspci | grep Wireless

06:02.0 Network controller: Intel Corporation PRO/Wireless 2915ABG Network Connection (rev 05)

```

I have verified that this card should use ipw2200

I have emerged wireless-tools and wpa_supplicant.  I need to use wpa_supplicant because my network uses WPA-PSK

iwconfig:

```
reynard init.d # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

eth2      unassociated  ESSID:"Terminus"

          Mode:Managed  Frequency=2.452 GHz  Access Point: Not-Associated

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

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

          Encryption key:6B65-6E6E-776F-7274-2100-0000-00   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

```

/etc/conf.d/wireless:

```
# /etc/conf.d/wireless:

essid_eth2="Terminus"

mode_eth2="auto"

channel_eth2="11"

key_ESSID="s:abc123"   #no, it's not really abc123

```

/etc/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

network={

        ssid="Terminus"

        psk="abc123"

}

```

/etc/conf.d/net

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

iface_eth1="dhcp"

dhcpcd_eth1=""

modules=( "wpa_supplicant" )

wpa_supplicant_eth2="-Dwext"

wpa_timeout_eth2=60

```

I've already modprobed ipw2200

I tried to emerge it as well, but it says that it can't install because I have in-kernel 802.11 support--which I could have sworn I didn't.

These lines

```

CONFIG_NET_RADIO=y 

CONFIG_NET_WIRELESS=y

```

were already in place in .config.  There is another setting I remember looking for in .config, and it was already right, but I can't locate the FAQ I was reading at the time.

running wpa_supplicant in a terminal spits out a bunch of crap I can't make heads nor tails of.  wpa_gui (as root) says "Could not get status from wpa_supplicant" and has no adapters to choose from (although apparently my wireless card is now recognized)

Inevitably, I know I'm the victim of reading too many things at once and I've made changes for one method that is screwing another method up somewhere, but I'm too worn out to figure out exactly what it is that i've screwed up.

----------

## polle

you already tried this?:

http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

----------

## Citizen Bleys

Yeah, I got most of my info from that HOWTO.

----------

## xtbasic

Dont forget to check http://gentoo-wiki.com/HARDWARE_ipw2200 too, I just set my 2200BG up today  :Smile: 

Are you missing the crypt modules for WEP/WPA?  I'm not using wpa_supplicant so i can't help you there

----------

## Monkeh

Just a few things I've noticed.. For starters, your psk shouldn't be enclosed in quotes, mine didn't like it. Also, shouldn't -Dwext be -Dipw2200?

----------

## Citizen Bleys

 *Monkeh wrote:*   

> Just a few things I've noticed.. For starters, your psk shouldn't be enclosed in quotes, mine didn't like it. Also, shouldn't -Dwext be -Dipw2200?

 

!

Gah!  This is what happens when you work on a problem too long without a break.

I copied that from one of the FAQs I was reading ><

EDIT:

```
 wpa_supplicant -Dipw -ieth2 -c/e123tc/wpa_supplicant.conf

Line 7: Invalid PSK 'abc123'.

Line 7: failed to parse psk 'abc123'.

Line 8: WPA-PSK accepted for key management, but no PSK configured.

Line 8: failed to parse network block.

Failed to read read or parse configuration '/etc/wpa_supplicant.conf'.

```

works better afterw using -Dipw in /etc/conf.d/net, but still no joy

```

wpa_gui

Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed

Failed to open control connection to wpa_supplicant.

PING failed - trying to reconnect

```

(I was hoping there that everything worked but the PSK and wpa_gui would let me manually enter it)

 *polle wrote:*   

> you already tried this?:
> 
> http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

 

I tried following that, and after rebooth, eth1 is now my wireless card, and eth2 my ethernet card.  I have to manually dhcpcd eth2 on startup because there is no net.eth2 in init.d

----------

## Monkeh

abc123, isn't, I believe, a valid PSK.

----------

## Citizen Bleys

 *Monkeh wrote:*   

> abc123, isn't, I believe, a valid PSK.

 

abc123 is too short, but what it's replacing is a valid PSK

At least it works in 'doze.

----------

## Monkeh

 *Citizen Bleys wrote:*   

>  *Monkeh wrote:*   abc123, isn't, I believe, a valid PSK. 
> 
> abc123 is too short, but what it's replacing is a valid PSK
> 
> At least it works in 'doze.

 

Fair enough. You tried generating a new one with wpa_passphrase?

----------

## Citizen Bleys

Won't that only work temporarily?

I'm using WPA-PSK/TKIP with an ASCII shared passphrase (9 characters in length, mix of letters and numbers, uppercase and lowercase, and a punctuation mark).  I've used the default settings in the router's firmware, which means the key is renewed every hour.

(actually, I tried using it, and...)

```
 wpa_supplicant -Dipw -ieth1 -c/etc/wpa_supplicant.conf

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Trying to associate with 00:0f:66:95:03:31 (SSID='Terminus' freq=0 MHz)

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

CTRL-EVENT-TERMINATING - signal 2 received

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

```

EDIT:  I'm tempted to disable all of the encryption in the AP to see if it's really an encryption issue at all...I tried to scan with wpa_gui and it was't able to detect any APs.

----------

## Monkeh

Definitely something odd going on there. 0MHz? Should be more like 2.4GHz..

----------

## Citizen Bleys

That's why I'm thinking it can't be authentication

----------

## Coltie

It might be not worse, but at the top of this topic, I read:

eth2      unassociated  ESSID:"Terminus" 

Unassociated??? Did you check wether you give it right?

----------

## Citizen Bleys

It's definitely the right SSID...but as was mentioned earlier on, it's saying 0 GHz.  Linux won't even try to connect, and wpa_gui can't even scan for SSIDs--there's 2 wireless networks close enough to pick up that have SSID broadcasting turned on that I can pick up in Doze.

It's definitely a configuration problem, not authentication.  If I thought it was just authentication, I'd temporarily turn off wireless encryption for troubleshooting purposes  :Smile: 

----------

## Coltie

 *Citizen Bleys wrote:*   

> It's definitely a configuration problem, not authentication.

 Sorry to have miss the point, but I just spent hours trying to make the encryption works... but it was a authentification issue... I thought it could be worse.

----------

## Citizen Bleys

Update:  It IS the encryption.  Just for a joke, I tried turning encryption off entirely from the router, and I was able to connect.

Next problem:  wpa_supplicant is completely unable to associate with the router unless encryption is completely disabled.  I even tried going back down to 64-bit WEP with a most ill-advised WEP key (to wit, my phone number).  wpa_supplicant is completely unable to associate with the AP.

I also located my problem with wpa_gui--I actually need to start wpa_supplicant in a separate terminal window (as root) before wpa_gui will work.  I tried this:

```
wpa_supplicant -Dipw -ieth1 -c/etc/wpa_supplicant.conf &
```

That's supposed to run it in the background, but it doesn't.

With security disabled, I get this from iwconfig:

```
 iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11g  ESSID:"Terminus"

          Mode:Managed  Frequency:2.452 GHz  Access Point: 00:0F:66:95:03:31

          Bit Rate=54 Mb/s   Tx-Power=20 dBm

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

          Encryption key:off

          Power Management:off

          Link Quality=93/100  Signal level=-34 dBm  Noise level=-86 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:18   Missed beacon:0

eth2      no wireless extensions.

```

Next oddity:

I booted into KDE (yeah, I know) to try kwifimanager; Same issue, kwifimanager would not detect any networks as long as I had security turned on...however, when I turned security off, kwifimanager was able to detect both Terminus (my network), and my neighbor's network Ultramagnus, which uses WPA-PSK with TKIP, same as me.

kwifimanager also refuses to recognize my AP if I try 64-bit WEP with my phone number for the WEP key.  (I emphasize that my phone number is the WEP key to minimize the cries of "typo!".  I assure you, I am capable of typing my own telephone number without errors.  :Smile:   Same deal with WPA-PSK -- my PSK is the same as my root password, which as I struggle with this, I'm sure I type at least 100x per day)

Final clue: in wpa_gui, if I turn on encryption, it says "ASSOCIATING\nTrying to associate with (correct MAC address of my router)", and then says "Authentication with 00:00:00:00:00:00 timed out"...and if I start wpa_gui with encryption turned off, and then turn it back on and re-scan, the scan correctly picks up and identifies both in-range wireless networks (Terminus and Ultramagnus)

Lastly, I'm thinking wpa_gui is pretty useless as it does not actually save any changes made in it to /etc/wpa_supplicant.conf, so I'm still at the mercy of my own typos or failure to understand the proper syntax for the config file.

Here's my current wpa_supplicant.conf, with the PSK edited out (just in case any of you are horribly malicious and have a REALLY big antenna)  :Smile: 

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

#network={

#        ssid="Terminus"

#        psk=abcde12345

#       priority=5

#}

#network={

#        ssid="Terminus"

#        #psk="abcde12345"

#        psk=random crap generated by wpa_passphrase

#}

# Only WPA-PSK is used. Any valid cipher combination is accepted.

network={

        ssid="Terminus"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=CCMP TKIP WEP104 WEP40

        psk="abcde12345"

        priority=2

}

blob-base64-exampleblob={

SGVsbG8gV29ybGQhCg==

}

```

(most of that was just copied and pasted from wpa_supplicant.conf.example and edited to match my network)

EDIT: !

in case it was the crypt modules, I modprobed ieee80211_crypt_tkip, rebooted, and modprobed it again

on attempt to launch wpa_gui:

```

reynard citizenbleys # wpa_gui

Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed

Selected interface 'eth1'

Trying to connect to '/var/run/wpa_supplicant/eth1'

```

----------

