loading...

domingo, 22 de julio de 2012

Configurar USB Wifi con chip rt73 en AZbox Elite y Ultra

 

Configurar USB Wifi con chip rt73 en AZbox Elite y Ultra
Atencion: Recomiendo copiar los ficheros en el azbox y con los comandos: dmesg, ifconfig y iwconfig  hacer pruebas y configurar el wifi y probar que funciona antes de dejarlo "definitivo" en el azbox.
Archivos necesarios:
rt73.bin --> Firmware del USB WIFI
rt73sta.dat --> Archivo de configuracion wireless. En este archivo hay que poner la configuracion de nuestra red wifi. SSID, Channel, WEP, etc. (Al final pongo las opciones de configuracion (en ingles))
rt73.ko --> Driver como modulo del kernel
Estos 3 ficheros se tienen que copiar a /DISK2/etc/Wireless
Configuracion para que no se borre al actualizar el firmware (falta por probar)
Me he fijado en como carga el azbox la configuracion del eth0 y la he intentado "calcar" para el wifi.
Al carga el modulo rt73 nos crea un nuevo interface llamado: rausb0
Ficheros a modificar:

/DISK2/interfaces

 

Marca

auto rausb0
iface rausb0 inet dhcp
pre-up /DISK2/pre-up.rausb0

Con esto conseguimos 2 cosas, que configure automaticamente el interface rausb0 por dhcp y que ademas nos carge (ejecute) el fichero pre-up.rausb0 (que lo he copiado del que viene pre-up.ra0)
En caso de que tengamos una IP Fija para el Wifi añadiriamos al final del fichero interfaces lo siguiente:

Marca

auto rausb0
iface rausb0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
pre-up /DISK2/pre-up.rausb0


OJO: Sustituir las IP 192.168.1.x y la mascara por las correctas de nuestra red WIFI.
/DISK2/pre-up.rausb0

Marca

#!/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/MMP/usr/lib
echo ">> pre-up.rausb0 start..."
ifdown rausb0
sleep 1
ln -s /DISK2/etc/Wireless/rt73.bin /etc/rt73.bin
ln -s /DISK2/etc/Wireless/rt73sta.dat /etc/rt73sta.dat
insmod /DISK2/etc/Wireless/rt73.ko
sleep 1
ifconfig rausb0 up
sleep 1
echo ">> pre-up end..."

Como podeis ver lo que hace es unos links de los ficheros al directorio /etc que es donde los busca el driver
La linea insmod que carga el driver y el comando "ifconfig  rausb0 up" que  "levanta" y configura la interface WIFI leyendo los datos del fichero interface.
Creo que no se me olvida nada.
Reboot y a probar.
Configuration File : rt73sta.dat
---------------------------------------
# Copy this file to /etc/Wireless/RT73STA/rt73sta.dat
# This file is a binary file and will be read on loading rt.o module.
#
# Use "vi -b rt73sta.dat" to modify settings according to your need.
#
# 1.) set NetworkType to "Adhoc" for using Adhoc-mode, otherwise using Infrastructure
# 2.) set Channel to "0" for auto-select on Infrastructure mode
# 3.) set SSID for connecting to your Accss-point.
# 4.) AuthMode can be "WEPAUTO", "OPEN", "SHARED", "WPAPSK", "WPA2PSK", "WPANONE"
# 5.) EncrypType can be "NONE", "WEP", "TKIP", "AES"
# for more information refer to the Readme file.
#
# The word of "[Default]" must not be removed
[Default]
CountryRegion=0
CountryRegionABand=7
WirelessMode=0
SSID=AP350
NetworkType=Infra
Channel=0
AuthMode=OPEN
EncrypType=NONE
DefaultKeyID=1
Key1Type=0
Key1Str=0123456789
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
WPAPSK=abcdefghijklmnopqrstuvwxyz
TxBurst=0
PktAggregate=0
TurboRate=0
WmmCapable=0
AckPolicy=0;0;0;0
BGProtection=0
IEEE80211H=0
TxRate=0
RTSThreshold=2347
FragThreshold=2346
PSMode=CAM
TxPreamble=0
AdhocOfdm=0
FastRoaming=0
RoamThreshold=70
-----------------------------------------------
syntax is 'Param'='Value' and describes below.
1. CountryRegion=value
        value
                0: use 1 ~ 11 Channel
                1: use 1 ~ 13 Channel
                2: use 10, 11 Channel
                3: use 10 ~ 13 Channel
                4: use 14 Channel
                5: use 1 ~ 14 Channel
                6: use 3 ~ 9 Channel
                7: use 5 ~ 13 Channel
2. CountryRegionABand=value
        value
                0: use 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165 Channel
                1: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 Channel
                2: use 36, 40, 44, 48, 52, 56, 60, 64 Channel
                3: use 52, 56, 60, 64, 149, 153, 157, 161 Channel
                4: use 149, 153, 157, 161, 165 Channel
                5: use 149, 153, 157, 161 Channel
                6: use 36, 40, 44, 48 Channel
                7: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 Channel
                8: use 52, 56, 60, 64 Channel
                9: use 34, 38, 42, 46 Channel
                10: use 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64 Channel
3. SSID=value
        value
                0~z, 1~32 ascii characters.
4. WirelessMode=value
        value
                0: 11b/g mixed,
                1: 11b only,
                2: 11a only,        //Support in RfIcType=1(id=RFIC_5226) or RfIcType=3(id=RFIC_5225)
                3: 11a/b/g mixed,   //Support in RfIcType=1(id=RFIC_5226) or RfIcType=3(id=RFIC_5225)
                4: 11g only
5. TxRate=value
        value
                 0: Auto        //WirelessMode=0~4
                 1: 1 Mbps              //WirelessMode=0 or 1 or 3
         2: 2 Mbps              //WirelessMode=0 or 1 or 3
         3: 5.5 Mbps    //WirelessMode=0 or 1 or 3
         4: 11 Mbps     //WirelessMode=0 or 1 or 3
         5: 6  Mbps     //WirelessMode=0 or 2 or 3 or 4
         6: 9  Mbps     //WirelessMode=0 or 2 or 3 or 4
         7: 12 Mbps     //WirelessMode=0 or 2 or 3 or 4
         8: 18 Mbps     //WirelessMode=0 or 2 or 3 or 4
         9: 24 Mbps     //WirelessMode=0 or 2 or 3 or 4
        10: 36 Mbps     //WirelessMode=0 or 2 or 3 or 4
        11: 48 Mbps     //WirelessMode=0 or 2 or 3 or 4
        12: 54 Mbps     //WirelessMode=0 or 2 or 3 or 4
6. Channel=value
        value
                depends on CountryRegion or CountryRegionABand
7. BGProtection=value
        value
                0: Auto
                1: Always on
                2: Always off
8. TxPreamble=value
        value
                0: Preamble Long
                1: Preamble Short
                2: Auto
9. RTSThreshold=value
        value
                1~2347
10. FragThreshold=value
        value
                256~2346
11. TxBurst=value
        value
                0: Disable
                1: Enable
12. NetworkType=value
        value
                Infra: infrastructure mode
        Adhoc: adhoc mode
13. AdhocOfdm=value
    value
        0: WIFI mode    (1,2,5.5,11 mbps rates)
        1: b/g mixed,   (1,2,5.5,11,6,9,12,18,24,36,48,54 mbps rates)
        2: 11g only,    (6,9,12,18,24,36,48,54 mbps rates)
        3: 11a only,    (6,9,12,18,24,36,48,54 mbps rates)
14. AuthMode=value
        value
                OPEN            For open system
                SHARED          For shared key system
                WEPAUTO     Auto switch between OPEN and SHARED
                WPAPSK      For WPA pre-shared key  (Infra)
                WPA2PSK     For WPA2 pre-shared key (Infra)
                WPANONE         For WPA pre-shared key  (Adhoc)
                WPA         Use WPA-Supplicant
                WPA2        Use WPA-Supplicant
15. EncrypType=value
        value
                NONE        For AuthMode=OPEN
                WEP         For AuthMode=OPEN or SHARED
                TKIP        For AuthMode=WPAPSK or WPA2PSK or WPANONE
                AES         For AuthMode=WPAPSK or WPA2PSK or WPANONE
16. DefaultKeyID=value
        value
                1~4
17. Key1=value
    Key2=value
    Key3=value
    Key4=value
        value
                10 or 26 hexadecimal characters eg: 012345678
        5 or 13 ascii characters eg: passd
    (usage : "iwpriv" only)
18. Key1Type=vaule
    Key2Type=value
    Key3Type=vaule
    Key4Type=vaule
    value
                0   hexadecimal type
                1   assic type
    (usage : reading profile only)
19. Key1Str=value
    Key2Str=value
    Key3Str=vaule
    Key4Str=vaule
    value
                10 or 26 characters (key type=0)
                5 or 13 characters  (key type=1)
    (usage : reading profile only)
20. WPAPSK=value
        value
                8~63 ASCII              or
                64 HEX characters
21. PSMode=value
    value
        0: CAM                  Constantly Awake Mode
                1: Max_PSP              Max Power Savings
                2: Fast_PSP             Power Save Mode
22. IEEE80211H=value
        value
                0:      Disable
                1:      Enable  Spectrum management
            (This field can be enable only in A band)
23. FastRoaming=value
    value
        0: Disable
        1: Enable Fast Roaming
24. RoamThreshold=value
    vale
        61 ~ 89
    This value is a absolute threshold in dBm.
    The condition to roam when receiving Rssi less than (-1*value).
// //////////////////////
//  No Support !!!
// /////////////////////
//  PktAggregate,
//  TurboRate,
//  WmmCapable,
//  AckPolicy
// /////////////////////



No hay comentarios:

Publicar un comentario