5GHz z Asuse WL500: Porovnání verzí
m (zmena <bash> na <source>) |
|||
(Není zobrazeno 10 mezilehlých verzí od 3 dalších uživatelů.) | |||
Řádek 1: | Řádek 1: | ||
Toto je OpenWRT firmware Whiterussian RC4 pro Asus WL500B, WL500Bv2, WL500G: (na WL500GX jsem to netestoval, nemel sem ho jeste v ruce...) | Toto je OpenWRT firmware Whiterussian RC4 pro Asus WL500B, WL500Bv2, WL500G: (na WL500GX jsem to netestoval, nemel sem ho jeste v ruce...) | ||
− | [http://downloads.openwrt.org/whiterussian/ | + | [http://downloads.openwrt.org/whiterussian/rc5/bin/openwrt-brcm-2.4-jffs2-4MB.trx Firmware pro ASUS OpenWrt Whiterussian RC5] |
− | [http://igw.hkfree.org/download/linux/hw-ap/openwrt/asus/openwrt-brcm-2.4-jffs2-4MB.trx Lokalni kopie Firmware pro ASUS] | + | <del>[http://downloads.openwrt.org/whiterussian/rc4/bin/openwrt-brcm-2.4-jffs2-4MB.trx Firmware pro ASUS OpenWrt Whiterussian RC4]</del> |
+ | |||
+ | <del>[http://igw.hkfree.org/download/linux/hw-ap/openwrt/asus/openwrt-brcm-2.4-jffs2-4MB-WR-RC5.trx Lokalni kopie Firmware pro ASUS]</del> | ||
+ | |||
+ | <del>[http://igw.hkfree.org/download/linux/hw-ap/openwrt/asus/openwrt-brcm-2.4-jffs2-4MB-WR-RC4.trx Lokalni kopie Firmware pro ASUS]</del> | ||
Az bude firmware uploadnuty a asus bude pingat, tak se prihlas telnetem na asus - je bez hesla a bez zadavani uzivatele,a dej rovnou reboot. Je treba dodelat FileSystem (pomoci rebootu), jinak bez rebootu na nej nelze zapisovat. Po dalsim prihlaseni (po rebootu) si zmen heslo ''' ''passwd root'' '''. Jakmile heslo zmenis, tak dej opet reboot. Nyni bude uz telnet zablokovany a pojede jen SSH. Login je root a to heslo co si tam zadal. Login na www je taky root a to same heslo. | Az bude firmware uploadnuty a asus bude pingat, tak se prihlas telnetem na asus - je bez hesla a bez zadavani uzivatele,a dej rovnou reboot. Je treba dodelat FileSystem (pomoci rebootu), jinak bez rebootu na nej nelze zapisovat. Po dalsim prihlaseni (po rebootu) si zmen heslo ''' ''passwd root'' '''. Jakmile heslo zmenis, tak dej opet reboot. Nyni bude uz telnet zablokovany a pojede jen SSH. Login je root a to heslo co si tam zadal. Login na www je taky root a to same heslo. | ||
− | Prihlas se do www Asusu a v sekci network->LAN nastav spravnou ip tak, aby se tou ip byl asus schopny dostat do internetu. Klikni do sekce System => Installed software. Tam dej ''' ''Update package lists'' '''. Pockej az si to updatne baliky z netu. | + | Prihlas se do www Asusu a v sekci network->LAN nastav spravnou ip tak, aby se tou ip byl asus schopny dostat do internetu. Klikni do sekce System => Installed software. Tam dej ''' ''Update package lists'' '''. Pockej az si to updatne baliky z netu. Na vrchu stranky s baickama by se melo objevit: |
+ | <code> | ||
+ | Downloading http://downloads.openwrt.org/whiterussian/packages/Packages | ||
+ | Updated list of available packages in /usr/lib/ipkg/lists/whiterussian | ||
+ | Downloading http://downloads.openwrt.org/whiterussian/packages/non-free/Packages | ||
+ | Updated list of available packages in /usr/lib/ipkg/lists/non-free | ||
+ | Successfully terminated. | ||
+ | </code> | ||
+ | Dole se zobrazi seznam novych moznych baliku k instalaci. Budem potrebovat: '''kmod-madwifi''' a '''madwifi-tools''' . Ty nainstaluj. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | #Jako prvni vec co udelame je zalozit neexistujici polozky do nvram: | ||
+ | |||
+ | nvram set wl0_distance=2000 | ||
+ | nvram set wl0_power=99 | ||
+ | nvram set wl0_rate=54 | ||
+ | nvram commit | ||
+ | </source> | ||
− | + | ---- | |
− | + | <source lang="bash"> | |
+ | |||
+ | echo "Pred jakoukoliv manipulaci s atherosem je treba ho shodit, odloadovat a znovu naloadovat!" | ||
#Do doby nez udelame ifconfig ath0 up, je mozno atherosovi nastavovat vsechny parametry. | #Do doby nez udelame ifconfig ath0 up, je mozno atherosovi nastavovat vsechny parametry. | ||
Řádek 24: | Řádek 47: | ||
#(a po editaci ho spust) | #(a po editaci ho spust) | ||
+ | </source> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <source lang="bash"> | ||
root@OpenWrt:/etc/init.d# cat S70atheros | root@OpenWrt:/etc/init.d# cat S70atheros | ||
Řádek 29: | Řádek 57: | ||
#Shodit a odloadovat atheros | #Shodit a odloadovat atheros | ||
+ | brctl delif br0 ath0 | ||
ifconfig ath0 down | ifconfig ath0 down | ||
rmmod ath_pci | rmmod ath_pci | ||
Řádek 38: | Řádek 67: | ||
insmod ath_rate_sample | insmod ath_rate_sample | ||
insmod ath_pci outdoor=1 | insmod ath_pci outdoor=1 | ||
+ | iwpriv ath0 mode 1 # použít pouze 11a | ||
#Nastavit kanal | #Nastavit kanal | ||
Řádek 57: | Řádek 87: | ||
#Toto az naposled, tim aktivujem wifi, pak nelze delat zadne zmeny | #Toto az naposled, tim aktivujem wifi, pak nelze delat zadne zmeny | ||
− | ifconfig ath0 | + | ifconfig ath0 up |
+ | brctl addif br0 ath0 | ||
+ | IP=`nvram get lan_ipaddr` | ||
+ | MASK=`nvram get lan_netmask` | ||
+ | BROAD=`ipcalc $IP $MASK | grep BROADCAST | awk {'split($1,BR,"="); print BR[2]'}` | ||
+ | ifconfig br0 $IP netmask $MASK broadcast $BROAD | ||
+ | |||
+ | #Stara verze neumi mit atherose v Bridge | ||
+ | |||
+ | echo 0 > /proc/sys/dev/ath0/diversity | ||
+ | echo 1 > /proc/sys/dev/ath0/rxantenna | ||
+ | echo 1 > /proc/sys/dev/ath0/txantenna | ||
+ | |||
#Pridat MACovky do seznamu | #Pridat MACovky do seznamu | ||
− | /etc/init.d/S80maccmd | + | . /etc/init.d/S80maccmd |
− | </ | + | </source> |
− | <bash> | + | ---- |
+ | |||
+ | <source lang="bash"> | ||
root@OpenWrt:/etc/init.d# cat S80maccmd | root@OpenWrt:/etc/init.d# cat S80maccmd | ||
#!/bin/sh | #!/bin/sh | ||
− | iwpriv ath0 addmac 00:0B:6B:4D:45:46 | + | #v 2.0 manualni pridavani MACu do skriptu zruseno |
− | </bash> | + | #iwpriv ath0 addmac 00:0B:6B:4D:45:46 |
+ | |||
+ | #Nyni se berou MACovky z nastaveni na www rozhrani | ||
+ | nvram get wl0_maclist | | ||
+ | awk {'split($0,mac," "); | ||
+ | for (i in mac) { | ||
+ | system ("iwpriv ath0 addmac " mac[i])}'} | ||
+ | </source> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <source lang="bash"> | ||
+ | root@OpenWrt:/etc/init.d# cat S80asus | ||
+ | #!/bin/sh | ||
+ | #vymazat firewall | ||
+ | |||
+ | /etc/init.d/snmpd start | ||
+ | |||
+ | iptables -P INPUT ACCEPT | ||
+ | iptables -P FORWARD ACCEPT | ||
+ | iptables -P OUTPUT ACCEPT | ||
+ | |||
+ | iptables -F | ||
+ | iptables -t nat -F | ||
+ | |||
+ | iptables -t nat -X postrouting_rule | ||
+ | iptables -t nat -X prerouting_rule | ||
+ | iptables -t nat -X prerouting_vlan1 | ||
+ | iptables -X forward_vlan1 | ||
+ | iptables -X forwarding_rule | ||
+ | iptables -X input_rule | ||
+ | iptables -X input_vlan1 | ||
+ | iptables -X output_rule | ||
+ | </source> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <source lang="bash"> | ||
+ | #Poedituj jeste skript /usr/lib/webif/apply.sh a do sekce reload wireless zapis tyto zmeny: | ||
+ | |||
+ | reload_wireless() { | ||
+ | echo '@TR<<Reloading>> @TR<<wireless settings>> ...' | ||
+ | killall nas >&- 2>&- && sleep 2 | ||
+ | ( | ||
+ | /etc/init.d/S70atheros | ||
+ | #/sbin/wifi | ||
+ | #[ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa | ||
+ | ) >&- 2>&- <&- | ||
+ | } | ||
+ | |||
+ | </source> |
Aktuální verze z 5. 2. 2010, 16:04
Toto je OpenWRT firmware Whiterussian RC4 pro Asus WL500B, WL500Bv2, WL500G: (na WL500GX jsem to netestoval, nemel sem ho jeste v ruce...)
Firmware pro ASUS OpenWrt Whiterussian RC5
Firmware pro ASUS OpenWrt Whiterussian RC4
Lokalni kopie Firmware pro ASUS
Lokalni kopie Firmware pro ASUS
Az bude firmware uploadnuty a asus bude pingat, tak se prihlas telnetem na asus - je bez hesla a bez zadavani uzivatele,a dej rovnou reboot. Je treba dodelat FileSystem (pomoci rebootu), jinak bez rebootu na nej nelze zapisovat. Po dalsim prihlaseni (po rebootu) si zmen heslo passwd root . Jakmile heslo zmenis, tak dej opet reboot. Nyni bude uz telnet zablokovany a pojede jen SSH. Login je root a to heslo co si tam zadal. Login na www je taky root a to same heslo.
Prihlas se do www Asusu a v sekci network->LAN nastav spravnou ip tak, aby se tou ip byl asus schopny dostat do internetu. Klikni do sekce System => Installed software. Tam dej Update package lists . Pockej az si to updatne baliky z netu. Na vrchu stranky s baickama by se melo objevit:
Downloading http://downloads.openwrt.org/whiterussian/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/whiterussian
Downloading http://downloads.openwrt.org/whiterussian/packages/non-free/Packages
Updated list of available packages in /usr/lib/ipkg/lists/non-free
Successfully terminated.
Dole se zobrazi seznam novych moznych baliku k instalaci. Budem potrebovat: kmod-madwifi a madwifi-tools . Ty nainstaluj.
#Jako prvni vec co udelame je zalozit neexistujici polozky do nvram:
nvram set wl0_distance=2000
nvram set wl0_power=99
nvram set wl0_rate=54
nvram commit
echo "Pred jakoukoliv manipulaci s atherosem je treba ho shodit, odloadovat a znovu naloadovat!"
#Do doby nez udelame ifconfig ath0 up, je mozno atherosovi nastavovat vsechny parametry.
#Jakmile jednou udelame ifconfig ath0 up, tak uz zadny parametr ani ssid neprenastavuj !,
#jinak se ti zakousne celej Asus a je treba ho vypnout z elektriky a znovu zapnout.
#Vyjimkou je iwpriv ath0 addmac xx:xx:.... to jde delat i za chodu.
#Kdyz uz mas ath0 up a chces udelat nejake zmeny, tak poedituj nasledujici skript:
#(a po editaci ho spust)
root@OpenWrt:/etc/init.d# cat S70atheros
#!/bin/sh
#Shodit a odloadovat atheros
brctl delif br0 ath0
ifconfig ath0 down
rmmod ath_pci
rmmod ath_rate_sample
rmmod ath_hal
#Naloadovat atheros
insmod ath_hal
insmod ath_rate_sample
insmod ath_pci outdoor=1
iwpriv ath0 mode 1 # použít pouze 11a
#Nastavit kanal
iwconfig ath0 channel 100
#Nastavit SSID
iwconfig ath0 essid oli5g.hkfree.org
#Nastavit Mod AP
iwconfig ath0 mode master
#Nastavit MAC restrikce
iwpriv ath0 maccmd 3
iwpriv ath0 maccmd 1
#Vykon v mW
iwconfig ath0 txpowerlimit 99
# Nastavit ack timeout na 8000m
athctrl -i ath0 -d 8000
#Toto az naposled, tim aktivujem wifi, pak nelze delat zadne zmeny
ifconfig ath0 up
brctl addif br0 ath0
IP=`nvram get lan_ipaddr`
MASK=`nvram get lan_netmask`
BROAD=`ipcalc $IP $MASK | grep BROADCAST | awk {'split($1,BR,"="); print BR[2]'}`
ifconfig br0 $IP netmask $MASK broadcast $BROAD
#Stara verze neumi mit atherose v Bridge
echo 0 > /proc/sys/dev/ath0/diversity
echo 1 > /proc/sys/dev/ath0/rxantenna
echo 1 > /proc/sys/dev/ath0/txantenna
#Pridat MACovky do seznamu
. /etc/init.d/S80maccmd
root@OpenWrt:/etc/init.d# cat S80maccmd
#!/bin/sh
#v 2.0 manualni pridavani MACu do skriptu zruseno
#iwpriv ath0 addmac 00:0B:6B:4D:45:46
#Nyni se berou MACovky z nastaveni na www rozhrani
nvram get wl0_maclist |
awk {'split($0,mac," ");
for (i in mac) {
system ("iwpriv ath0 addmac " mac[i])}'}
root@OpenWrt:/etc/init.d# cat S80asus
#!/bin/sh
#vymazat firewall
/etc/init.d/snmpd start
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
iptables -t nat -F
iptables -t nat -X postrouting_rule
iptables -t nat -X prerouting_rule
iptables -t nat -X prerouting_vlan1
iptables -X forward_vlan1
iptables -X forwarding_rule
iptables -X input_rule
iptables -X input_vlan1
iptables -X output_rule
#Poedituj jeste skript /usr/lib/webif/apply.sh a do sekce reload wireless zapis tyto zmeny:
reload_wireless() {
echo '@TR<<Reloading>> @TR<<wireless settings>> ...'
killall nas >&- 2>&- && sleep 2
(
/etc/init.d/S70atheros
#/sbin/wifi
#[ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa
) >&- 2>&- <&-
}