# WPA_SUPPLICANT PROBLEMS (solved)

## gentoo_newguy

Could anyone help me compile this is into my kernel. 

The stick was picked up before the install on my laptop although i could not get it to work i am trying to sort that part out now.

Its a belkin stick.

lsusb gives me this information.

```

Bus 001 Device 002: ID 050d:705c Belkin Components.

```

Really reall strugling with the wireless.

Its the one thing i really want to get working so i am able to work when out.

If anyone could help me this would be great. 

Hopefully if i get it compiled into my kernel i will be able to set it up this time.

Im not sure if it is already though the yellow light on the usb stick is on ?? 

Help anyone 

Thanks gentoo_newguyLast edited by gentoo_newguy on Tue Nov 11, 2008 11:54 am; edited 5 times in total

----------

## NeddySeagoon

gentoo_newguy,

You need the zd1211 kernel module and the things it depends on. genkernel will not include that by default.

If you are a genkernel user, run it with the --menuconfig option.

When the kernel config opens, press / and enter zd12, to seach for your module.

Turn on all the options it depends on ...  

```
Symbol: ZD1211RW [=n]                                                   │  

  │ Prompt: ZyDAS ZD1211/ZD1211B USB-wireless support                       │  

  │   Defined at drivers/net/wireless/zd1211rw/Kconfig:1                    │  

  │   Depends on: NETDEVICES && !S390 && USB && MAC80211 && WLAN_80211 && E │  

  │   Location:                                                             │  

  │     -> Device Drivers                                                   │  

  │       -> Network device support (NETDEVICES [=y])                       │  

  │         -> Wireless LAN                                                 │  

  │   Selects: FW_LOADER    
```

You will also need to fetch the firmware file from the net and put in into /lib/firmware.

If the firmware is compressed when you get it, you need to uncompress it before you put it into /lib/firmware

Reboot into your new kernel and see if you have a new network interface with 

```
ifconfig -a
```

----------

## gentoo_newguy

Hi thanks for ur reply.

Im going to have ago at this now.

I will get back to u asap.

Also i built the kernel myself.

Dont like using Genkernel.

Where would i also go to get the firmware ?

----------

## NeddySeagoon

gentoo_newguy,

```
emerge net-wireless/zd1211-firmware
```

probably does what you want

It will also be on the CD provided with the device but possibly not very accessable.

Once you know the file name, check to see if google knows a more recent version.

----------

## gentoo_newguy

Hello Neddy thanks for all your help.

Im finally getting somewhere.

Hello to anone else as well.

My wireless stick is now being detected but I am now having problems connecting to the router.

Im using 

WPA-PSK [TKIP] encryption.

(WPA-PSK) obviously for m password

SSID is called The Penthouse

Any ideaswhy this might not be working 

```

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""  

          Mode:Managed  Channel:0  Access Point: Not-Associated   

          Tx-Power=0 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key: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.

```

Still not getting connected to the net but this is something to do wit my config file.

Im obviously setting it up wrong. 

Could you or someone help me again please 

Here is a copy of my wpa_supplicant.conf

```

LaptopTux ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf 

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=users 

network={ 

ssid="The Penthouse" 

key_mgmt=WPA-PSK 

proto=WPA 

psk="********"

}

```

here is also a copy of my /etc/conf.d/net 

```

LaptopTux ~ # cat /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 :]!).

modules=("wpa_supplicant")

modules=("wpa_supplicant") 

wpa_supplicant_wlan0="-Dzd1211" 

wpa_timeout_wlan0=60

```

Thanks for all your help.Last edited by gentoo_newguy on Sat Nov 08, 2008 4:31 pm; edited 1 time in total

----------

## NeddySeagoon

gentoo_newguy,

This shows your wireless is recognised but not set up 

```
wlan0     IEEE 802.11g  ESSID:"" 

          Mode:Managed  Channel:0  Access Point: Not-Associated   

          Tx-Power=0 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key: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
```

as all the things you need to send it are blank. 

I don't use wireless suplicant so I can only direct you to the Gentoo Docs on the topic, which it looks like you are already aware of.

----------

## gentoo_newguy

Yeh if u look im sure i configured it properly. 

mabe wpa_supplicant is not started or someting 

Anyone else know why it may not be working ?

----------

## gentoo_newguy

HI people my wirless card has been detected now.

I have setup my /etc/wpa_supplicant/wpa_supplicant.conf 

```

LaptopTux ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

network={

ssid="The Penthouse"

key_mgmt=WPA-PSK

proto=WPA

psk="********"

}

```

And my wirless card is showing its there but nothing seems to be happening please help me.

Maybe wpa_supplicant is nit running or something.

Please please help

Thanks

----------

## NeddySeagoon

gentoo_newguy,

The process to find out whats wrong now is to issue the commands from the keyboard in a root shell.

After each command look in dmesg to be sure there were no errors and in iwconfig wlan0 to check on the effect.

----------

## gentoo_newguy

Hi what commands are these though ? 

I dont no what commands i use to check out the problems. 

Like u said my card is there. 

Im pretty sure the wpa_supplicant.conf is setup.

I think that its not even looking at the file though .

The only commands i no how to use for wireless is. 

```

dhcpcd wlan0

iwconfig 

```

I honestly have tired and tired myself to do things but it just dosent work.

I thought i was getting somwhere but then its not even reading my settings.

I manged to manually set my essid from the wireless guide. 

But im still not connected and that disapears when i reboot.

----------

## gentoo_newguy

Has anyone else had this problem ? 

Im using wpa_supplicant and it seems that my wlan0 is not detecting my network settings. 

Do i need to someow start wpa_supplicant or should it run automaticaly ? 

I have no idea what to do and im stuck. 

Thanks for all the help i have so far. 

Someone please help   :Very Happy: 

----------

## Stupendoussteve

See if there is an /etc/init.d/net.wlan0 file, if not then you need to create it, as root:

```
ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0
```

In /etc/conf.d/net add a line that says:

```
modules=( "wpa_supplicant" )
```

Afterwards, as root run /etc/init.d/net.wlan0 start, and you should see something like:

```

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...            [ ok ]

 *   Starting wpa_cli on wlan0 ...                   [ ok ]

 *     Backgrounding ...

```

If that works then you can set it up to run on boot, just like any of the init scripts.

Hope that helps

----------

## gentoo_newguy

Hi thanks for your reply thought this was never going to get anywhere.

Here is a cop of my current /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 :]!).

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dzd1211" 

wpa_timeout_wlan0=60

```

I used the command u provided above.

```

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

```

I get this error messager after tryingto start. 

```

LaptopTux ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

Unsupported driver 'zd1211'.

```

Im really stuck  and i have just noticed the light on my wifi stick has gone off  :Sad: 

----------

## Stupendoussteve

wpa_supplicant itself only supports a few drivers.

First, try without the wpa_supplicant_wlan0="-Dzd1211" in your /etc/conf.d/net, just comment it out so it is 

```
#wpa_supplicant_wlan0="-Dzd1211"
```

sometimes it will work out of the box.

After that run either /etc/init.d/net.wlan0 restart, or start (if it says it isn't running)

If that doesn't work, change it to:

```
wpa_supplicant_wlan0="-Dwext" 
```

The above will have it try to use the kernel driver.

----------

## gentoo_newguy

thank u so much i think that has started to work. 

Now i just need to check to see if its working. 

Im currently downloading and compiling on my ethernet eth0 

Is there away i can check to see if wlan0 is active ??? 

I may now need to play with my config as im not sure how to set it up properly.

----------

## Stupendoussteve

You could run ifconfig wlan0 and see if it has an ip address on your network, which would mean that dhcp was functional (thus the connection working)

----------

## gentoo_newguy

Aghh i have no IP address but we are getting somewhere. 

```

wlan0     IEEE 802.11g  ESSID:"ThePenthouse"  

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1F:33:B8:28:1A   

          Bit Rate=36 Mb/s   Tx-Power=0 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   

          Encryption key:7E18-7D8A-B2F2-6974-0A9F-E9DD-73A0-56C7-16D2-26F3-6255-282D-723D-0BA6-D11A-A877 [2]

          Link Quality=88/100  Signal level=58/100  

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

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

```

here is my wpa_supplicant.conf

```

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=users 

network={ 

ssid="ThePenthouse" 

key_mgmt=WPA-PSK 

proto=WPA 

psk="ironman123" 

}

```

I appricate this so much thanks for your help

----------

## Stupendoussteve

It's going to be hard to test your setup with the eth0 active. It's also possible that dhcp didn't run because it is active. Try doing it without the wired connection and see if there's a difference. If you still don't get an address, set an IP manually with ifconfig wlan0 ADDRESS (make sure it's unused). See if you can ping and connect to the router.

Also, proto=WPA is not required in the wpa_supplicant.conf. It can figure out the protocol and set it up without it.Last edited by Stupendoussteve on Mon Nov 10, 2008 3:28 pm; edited 1 time in total

----------

## gentoo_newguy

Ok well i wait till this has finished compiling then i will have ago at doing it. 

Is it ok to come bk in a few hours if i have problems still ??

----------

## Stupendoussteve

There will always be someone around.

You might try getting help in the IRC channel too. It's a lot more interactive.

chat.freenode.net  #gentoo

----------

## gentoo_newguy

I havent got irc setup on my machine i should really get it installed . 

Is there one u reccomend ?

----------

## Stupendoussteve

X-chat or irssi (console), or konversation.

----------

## gentoo_newguy

Thanks i will get one of these installed.

Il probally be back later with my wireless problems 

Thanks so much

----------

## gentoo_newguy

HI im positive that my wpa_supplicant conf is set up. 

My wirless is now reading the file.

I just seem to be having toruble getting an ip adresss 

Could i try setting one manually. 

If so how would i do this ? 

Also when i type dhcpcd wlan0 

I get this message 

```

wlan0 dhcpcd 4.0.2 starting

wlan0 broadcasting for a lease 

wlan0 offerd 192.168.1.5 from 192.168.1.1

wlan0 acknowledged 192.168.1.5 from 192.168.1.1

wlan0 leased 192.168.1.5 from 192.168.1.1

wlan0 leased 192.168.1.5 for 3600 secounds

```

I dont understand does this mean it can actually see my router because its saying the address is aviable ?? 

I have tried about 15 ways trying to configure my wpa_Supplicant and i cant seem to connect .

Someone please help me sort this wifi problem 

Also is there a frontend application in the GUI that i can use to configure my wifi ????

Thanks

----------

## NeddySeagoon

gentoo_newguy,

That means it worked!

```
ping 192.168.1.1
```

shoould work too.

Depending on some fine tuning in the net file, it may all work.

Try browsing 

```
http://209.85.171.99
```

Post back if numbers work and names don't

----------

## gentoo_newguy

Wifi is now working at home. 

Just need to get it working in another location.

May i say thank u to everyone who helped me get this working.

----------

