Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HINT] gentoo way for rt61 wlan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 179

PostPosted: Mon May 28, 2007 4:51 pm    Post subject: [HINT] gentoo way for rt61 wlan Reply with quote

Hi guys,

let me show how i handle different ap's with the rt61-driver in /etc/conf.d/net

Code:

key_ESSID1="384d74624245767458652d384c enc open"
config_ESSID1=("192.168.0.8 netmask 255.255.255.0")
routes_ESSID1=("default via 192.168.0.1")
dns_servers_ESSID1=( "217.237.149.225" )

key_ESSID2="35677288412346404F2505B6A0 enc open"
config_ESSID2=("192.168.1.8 netmask 255.255.255.0")
routes_ESSID2=("default via 192.168.1.1" )
dns_servers_ESSID2=( "145.253.2.11" )

# you could use dhcp too
# config_ESSID2=( "dhcp" )

preferred_aps=( "ESSID1" "ESSID2")

postup() {
        if [ ${IFACE} = "ra0" ];
        then

        ESSIDSTR=`iwconfig | grep -o -w -E 'ESSID:"([a-zA-Z]+)' | awk '// {print substr($0,8,30);}'`

        case $ESSIDSTR in
                ESSID1)
                        iwpriv ra0 set Channel=6
                        iwpriv ra0 set NetworkType=Infra
                        iwpriv ra0 set AuthMode=SHARED
                        iwpriv ra0 set EncrypType=WEP
                        iwpriv ra0 set DefaultKeyID=1
                        iwconfig ra0 key "384d74624245767458652d384c"
                        exit 0
                        ;;
                ESSID2)
                        iwpriv ra0 set Channel=11
                        iwpriv ra0 set NetworkType=Infra
                        iwpriv ra0 set AuthMode=SHARED
                        iwpriv ra0 set EncrypType=WEP
                        iwpriv ra0 set DefaultKeyID=1
                        iwpriv ra0 set Key1="35677288412346404F2505B6A0"
                        exit 0
                        ;;
        esac

        fi
        exit 0
}

No need for /etc/Wireless/RT61STA/rt61sta.dat then.
Please don't worry because of my WEP-issue. I know about the security of WEP. Adjusting the script for WPA2 is your homework ;)
Hope, it's helpful for someone.

regards
are

btw. there is an annoying output from iwlist-command while booting. how i can avoid this?


Last edited by are on Wed May 30, 2007 6:57 am; edited 2 times in total
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Mon May 28, 2007 5:14 pm    Post subject: Reply with quote

Moved from Networking & Security to Documentation, Tips & Tricks.
Nice tip, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
gerardo
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 228
Location: Belgium

PostPosted: Tue May 29, 2007 6:33 pm    Post subject: My solution Reply with quote

Here's how I did it
If I'm using iwconfig, dhcp doesn't work.
I'm using the rt61 driver for a Edimax EW-7128g PCI.
Use ralink-rt61 driver if appropriate in your case...

Also, I'm on 2.6.21-rc4-mm1 as rt61 doesn't compile correctly on newer kernel versions. See my post
_________________
Windoze : Plug and Pay...
Back to top
View user's profile Send private message
salmonix
Guru
Guru


Joined: 16 Jul 2006
Posts: 410

PostPosted: Fri Jun 01, 2007 3:11 pm    Post subject: Re: My solution Reply with quote

gerardo wrote:
Here's how I did it
If I'm using iwconfig, dhcp doesn't work.
I'm using the rt61 driver for a Edimax EW-7128g PCI.
Use ralink-rt61 driver if appropriate in your case...

Also, I'm on 2.6.21-rc4-mm1 as rt61 doesn't compile correctly on newer kernel versions. See my post


I have a kernel 2.6.21 on X86_64 and x86 - the CVS 20070601 compiles fine, dropping some compilation error messages. With iwconfig it drops an error message stating some version problems -
Quote:
Warning: Driver for device wlan0 has been compiled with version 22
of Wireless Extension, while this program supports up to version 21.
Some things may be broken...
, but this version works with iwconfig fine otherwise.
_________________
Quis custodiet ipsos, custodes?
Back to top
View user's profile Send private message
gerardo
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 228
Location: Belgium

PostPosted: Wed Jun 06, 2007 9:34 pm    Post subject: Reply with quote

Apparently, something 's changed in the mm-sources, making rt61 fail to compile.
I'm currently on viper-sources without any problems.
_________________
Windoze : Plug and Pay...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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