Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bring rt2570 wpa sequence into gentoo net-initscripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
supermihi
Guru
Guru


Joined: 09 Feb 2005
Posts: 348

PostPosted: Tue Nov 15, 2005 4:58 pm    Post subject: bring rt2570 wpa sequence into gentoo net-initscripts Reply with quote

I'm using the rt2570 wireless lan driver for my usb stick (rt2x00.serialmonkey.com)
This driver uses iwpriv statements for wpa usage, and the recommended script for connecting to a wpa secured network is:

Code:
ifconfig rausb0 up
ifconfig rausb0 down
ifconfig rausb0 up
iwconfig rausb0 mode managed
iwpriv rausb0 auth 3
iwpriv rausb0 enc 3
iwconfig rausb0 essid MY_ESSID
sleep 1
iwpriv rausb0 wpapsk MyPassword
ifconfig rausb0 up
sleep 10
dhclient rausb0

I have this script in local.start ATM, but would like to use the /etc/init.d/net.* initscript for the wireless network. How do I integrate the iwpriv commands?[/code]
_________________
"You may say I'm a dreamer, but I'm not the only one."
Back to top
View user's profile Send private message
Hagar
Guru
Guru


Joined: 11 Feb 2003
Posts: 445

PostPosted: Wed Nov 16, 2005 2:53 am    Post subject: Reply with quote

From my experience with this driver, you can't.
The gentoo init scripts for wireless interfaces simply cannot work with iwpriv and WPA.

However, we can fool the init scripts and let them ignore the wireless settings.
This only works with the rt2500 driver !

First edit /etc/Wireless/RT2500STA/RT2500STA.dat to match your network.
I'm using my rt2500 card to connect to a WAP with WPAPSK and TKIP encryption, my config looks like this:
Code:
# Copy this file to /etc/Wireless/RT2500STA/RT2500STA.dat
# This file is a binary file and will be read on loading rt2500.o module.
# Use "vi -b RT2500STA.dat" to modify settings according to your need.

[Default]
CountryRegion=<YOUR_REGION>
WirelessMode=0
TXBurst=0
TurboRate=0
BGProtection=0
ShortSlot=0
TxRate=12
PSMode=CAM

SSID=<YOUR_ESSID>
NetworkType=Infra
Channel=<YOUR_CHANNEL>
AuthMode=WPAPSK
EncrypType=TKIP
WPAPSK=<YOUR_KEY>

The purpose of each setting can be found here http://gentoo-wiki.com/HARDWARE_rt2500#Setting_up_Network

After you've changed the config all you need to do is configure the init scripts.

edit /etc/conf.d/net:
Code:
modules=("!iwconfig")
config_rausb0=( "dhcp" )

Here we tell the script not to use iwconfig (and iwpriv) to configure the interface because the driver has it's own config file.
Then we tell it to use dhcp to configure the IP address.

On my system this is enough to get the rt2500 driver working.
I'm using sys-apps/baselayout-1.12.0_pre10-r1, net-wireless/wireless-tools-28_pre10 and net-wireless/rt2500-1.1.0_beta3

Edit:
Oh, and don't forget to link and add the init script to a runlevel.
Code:
cd /etc/init.d/
ln -s net.lo net.rausb0
rc-update add net.rausb0 default
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Mon Nov 28, 2005 6:28 pm    Post subject: Reply with quote

@supermihi did you have any luck with your setup i am probing a similar setup but can't get the gentoo script to follow the iwpriv commands
i found this in another thread does not work for me (wireless.conf)

mode_ra0="managed"
channel_ra0="YOUR_CHANNEL"
essid_ra0="YOUR_ACCESS_POINT"
preferred_aps=("YOUR_ACCESS_POINT")
preassociate(){
# setting authentication mode
iwpriv ra0 set AuthMode=WPAPSK
# setting up WPA
iwpriv ra0 set EncrypType=TKIP
# set the key
iwpriv ra0 set WPAPSK=YOUR_KEY
}
Back to top
View user's profile Send private message
supermihi
Guru
Guru


Joined: 09 Feb 2005
Posts: 348

PostPosted: Mon Nov 28, 2005 6:35 pm    Post subject: Reply with quote

No, I stopped trying because the rt2570 driver doesn't work properly for me, the connection always gets lost after a while. So atm I returned to wired ethernet.
_________________
"You may say I'm a dreamer, but I'm not the only one."
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Tue Nov 29, 2005 11:23 am    Post subject: Reply with quote

i had the same problem but with the new cvs driver the connection does not drop anymore
Back to top
View user's profile Send private message
supermihi
Guru
Guru


Joined: 09 Feb 2005
Posts: 348

PostPosted: Tue Nov 29, 2005 1:15 pm    Post subject: Reply with quote

When did this change? I tried maybe two days before now, and the problem was still there.
_________________
"You may say I'm a dreamer, but I'm not the only one."
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Fri Dec 02, 2005 10:24 pm    Post subject: Reply with quote

sorry problems still there but the intervals are longer between disconecting
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum