# ... + wpa + ... + baselayout [solved w/ workaround for bug]

## StranD

Hey all,

I'm having trouble getting my rt2500 connected with WPA through the startup scripts since I updated my world and recompiled my kernal recently.

I previously was using the patch Uberlord provided...

linky

... to iwconfig to get my WPA keys into iwpriv and it was working perfectly until I upgraded.

I've recompiled my kernel (with all the new wireless settings, that threw me for a bit) and re-emerged all my rt2500 modules.

I'm running:

rt2500           1.1.0_beta4

baselayout     1.12.5.-r2

wireless-tools 28

Here's the contents of my /etc/conf.d/wireless (modified of course)...

 *Quote:*   

> 
> 
> sleep_scan_ra0="5"
> 
> essid_ra0="-bellsforlunch"
> ...

 

There's a few tiny things I should point out.  Note the two underscores after iwpriv... that's because my SSID begins with a dash.  Also, I've had to escape the spaces and question marks in the PSK.

Now the individual iwconfig and iwpriv commands work correctly when entered manually in the shell, but running the "/etc/init.d/net.ra0 restart" command outputs this...

 *Quote:*   

> 
> 
>  * Stopping ra0
> 
>  *   Bringing down ra0
> ...

 

I've even manually checked the original patch I had for the old baselayout to ensure that Uberlord included his changes in the wireless module that I have.  It checks out fine, it's all there.

So what is going on?

edit by nixnut: wrapped url in tags to prevent layout breakageLast edited by StranD on Fri Oct 20, 2006 10:24 pm; edited 1 time in total

----------

## StranD

bump

----------

## sKewlBoy

Have you managed to put WPA working with your rt2500 based card with recent kernels?

Drivers accepts all the iwpriv commands through shell but when I issue "dhcpcd ra0" it just hangs there forever until timeout..

----------

## StranD

Thanks for responding.  I *have* gotten it running through recent kernels.  Using this series of commands...

 *Quote:*   

> 
> 
> iwconfig ra0 mode managed 
> 
> iwconfig ra0 essid "-bellsforlunch" 
> ...

 

... it comes up just fine and within 10 seconds, it's acquired a connection and I can ping through it.

BUT... I use static ips.  I haven't tried dhcp with this card.

What really throws me is that I can bring it up manually with those commands above but I can't do it through the rc scripts.  Is there a difference between the two paths?  Is there a higher level interface that rc scripts are running through that might not recognize the WPAPSK parameter?  I'm kinda clueless here, just throwing ideas out there.

----------

## UberLord

No need to use the patch as it's been in baselayout for some time.

This config should work

```
iwpriv__bellsforlunch=(

   "set AuthMode=WPAPSK"

   "set EncrypType=TKIP"

   "set WPAPSK="What is the point of life??"

)
```

Notice the two _ as we cannot use - in variable names.

----------

## sKewlBoy

The strange thing is that the drivers accept all the iwpriv "sets" and then when I issue dhcpcd it hangs until timeout. If I manually set my ip, I can't reach/ping any IP in my lan..

I really don't know why it works for everyone but me..

I have the same setup as StranD, configs and versions..

----------

## UberLord

Probably a driver issue.

rt2500 doesn't like talking WPA to an AP that does WEP as well, like my Draytek Vigor2600 at work. Luckily I can set this to WPA only and it starts working, but I know of some devs who don't have that luxury.

----------

## StranD

No luck with that config file, Uberlord  :Sad: 

I noticed that there was an extra doublequote in there after the equal sign for the WPAPSK set.  I tried that the first time with the obvious result of it closing off the parameter and immediately expecting to see the end bracket for the whole iwpriv command block.  I also attempted a few other creative uses of double quotes, attemping to find something that works.  No help so far...

Maybe I've missed something more basic.  Why would the manual commands work but the rc script provided parameters fail?

----------

## UberLord

IT maybe something in the variable that bash is not liking.

email me your exact config and commands you used and I'll see whats up.

uberlord@gentoo.org

----------

## StranD

sent

----------

## sKewlBoy

Uberlord, I didn't even know some routers supported WEP and WPA at the same time, but that was, in fact, my problem. I checked router config and it let me set it up for "just" WPA (default was both) and it works now just like a charm!

Thank you!

----------

## UberLord

 *StranD wrote:*   

> sent

 

Heh, I meant to look into it today, but it appears silly me deleted your email.

Anyway, from memory I think the only thing wrong was that you had spaces in the psk - try changing it to one without spaces, or try wrapping the key with single quotes like so - 'one two'.

----------

## StranD

Yep, you're right.  I changed my PSK to one that didn't contain any spaces or symbols.  I didn't get the same error.

You realize that something has changed in the parsing recently to cause this error, right?  I've been using the same SSID and PSK for over a year now and this problem has only arisen with the recent update that I did.  Not sure what it might be but something in the parsing has definitely changed that it doesn't accept spaces anymore... even if they are delimited with a backslash character.  Bummer.

Thanks for you help, Uberlord, I've changed my key to something without spaces now.

Cheers.

----------

## StranD

Uhhhh, I hate to be the obvious noob here, but how do I change the topic name here to mark it as solved.  Didn't find an answer in the FAQ.

----------

## UberLord

Edit the first post in the thread  :Smile: 

----------

## StranD

Uhhh, I'm not allowed to edit the first post in the thread.  My edit options disappear a few hours after I edit a post last.  I can only quote posts after that time.

----------

## StranD

I take it back, you can edit ALL your posts within the edit timeframe after last editing one of your posts.  After that timeframe expires, you can't edit any of your posts again.

Once again, thanks for the help.

----------

