martedì 8 aprile 2008

Installazione RaLink RT2561/RT61 su Gentoo AMD64

Ho installato la famigerata interfaccia wireless RaLink RT2561/RT61 sulla mia gentoo box AMD64 seguendo alcune guide trovate in rete. In particolare mi sono state utili:

http://forums.gentoo.org/viewtopic-t-518601-postdays-0-postorder-asc-start-75.html
http://ubuntuforums.org/showthread.php?t=160090

Per prima cosa è necessario configurare opportunamente il kernel:

Networking --->
Wireless --->
< > Improved wireless configuration API
--- Wireless extensions
< > Generic IEEE 802.11 Networking Stack (mac80211)
<*> Generic IEEE 802.11 Networking Stack
[ ] Enable full debugging output
--- IEEE 802.11 WEP encryption (802.1x)
<*> IEEE 802.11i CCMP support
<*> IEEE 802.11i TKIP encryption
<*> Software MAC add-on to the IEEE 802.11 networking stack
[ ] Enable full debugging output

Successivamente si può effettuare l'emerge del driver:

emerge -av ralink-rt61

Una volta installato il driver si può configurare il tutto affinchè all'avvio venga effettuata l'associazione con il nostro AP preferito tramite:

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

e editando opportunamente il file /etc/conf.d/net:

config_ra0=( "dhcp" )
postup() {
if [ ra0 == ${IFACE} ]; then
ifconfig ra0 mtu 1300
fi
}
modules=( "!iwconfig" "!wpa_supplicant" )

Adesso viene la parte più importante. Affinchè la nostra interfaccia si associ al nostro AP è necessario configurare il file /etc/Wireless/RT61STA/rt61sta.dat inserendo le informazioni relative:

[Default]
CountryRegion=0
CountryRegionABand=7
WirelessMode=0
SSID=ESSID DEL MIO AP
NetworkType=Infra
Channel=0
AuthMode=WEPAUTO #(nel caso di WEP)
EncrypType=WEP #(nel caso di WEP)
DefaultKeyID=1
Key1Type=0
Key1Str=CHIAVE WEP DEL MIO AP
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
WPAPSK=abcdefghijklmnopqrstuvwxyz
TxBurst=0
PktAggregate=0
WmmCapable=0
APSDCapable=0
APSDAC=0;0;0;0
BGProtection=0
IEEE80211H=0
TxRate=0
RTSThreshold=2347
FragThreshold=2346
RoamThreshold=75
PSMode=CAM
TxPreamble=0
FastRoaming=0

Successivamente sarà sufficiente inserire rt61 in /etc/modules.autoload/kernel-2.6 affinchè venga caricato all'avvio.