| « Весенние конференции и мероприятия | Mamma Mia! » |
OpenWrt & Asus WL-500gP (eng)
I was asked for a translation and here it is. It's not a direct translation from Russian (but mostly close to original) so maybe you will find something new in it and maybe I forgot about something.
After I killed my wrt54gl I've decided to give Asus WL-500g Premium a try. It has more memory, faster cpu and usb ports. As always I was trying to make “server” from everything that has a cpu. I wanted stable wi-fi connection, 24/7 uptime, file server and download torrents without computer. Before that I was using dd-wrt firmware. It has great web interface and is stable (by now I have one router using dd-wrt v24 rc-4 with 122 days of uptime). But now I wanted something more. I wanted functionality. And I've also planed to boot systen from usb flash drive (and forget about nvram).
Follow up:
I've compiled OpenWrt Kamikaze from sources (7.09 version was released long time ago and I prefer bleeding edge releases with everything new). I've had some troubles with usb2 kernel module on 2.4 kernel and wi-fi wasn't stable with proprietary drivers either. (even more my wl-hdd with 2.4 kernel always reboots once a day).
To start with I tied to make original wi-fi module (Broadcom) working with 2.6 kernel. It was working with b43 module and hostapd emulating AP mode. Only encryption was not working.
Here is an example of hostapd configuration file:
driver=devicescape
interface=wlan0ssid=test
hw_mode=g
ieee80211d=1
ieee80211h=1
beacon_int=100
channel=11
Before starting hostapd wireless interface should be down. So you need something like
ifconfig wlan0 down
at startup or before running hostapd.
Path to config file should be passed as argument.
But I've decided to change wireless card on something that is supported by MadWifi (nearly any card with Atheros chipset). I used TP-LINK TL-WN560G miniPCI card. Signal quality is good and connection is stable.
Wi-fi antenna should be connected to “main” socket on miniPCI card.
For better signal quality I recommend using these settings (configured in x-wrt web interface):
Diversity off
TX Antenna 2
RX Antenna 2
ESSID Broadcast по желанию
Bursting on
XR on
Tx Power 18dbm
Everything else from “Wireless Virtual Adaptor Configuration” should be off.
My /etc/config/wireless :
config wifi-device wifi0
option type atheros
option channel '11'
option agmode '11bg'
option distance '600'
option diversity '0'
option txantenna '2'
option rxantenna '2'
option disabled '0'# REMOVE THIS LINE TO ENABLE WIFI:
config wifi-iface
option device wifi0
option network lan
option mode ap
option ssid 'OpenWrt'
option encryption 'wep'
option hidden '0'
option isolate '0'
option txpower '18'
option bgscan '0'
option wds '0'
option key '1'
option key1 '00000000000000000000000000'
option bursting '1'
option turbo '0'
option macpolicy 'none'
option wmm '0'
option 80211h '0'
option xr '1'
option ar '0'
option frag ''
option rts ''
Don't forget to replace encryption settings with yours in configuration file.
I've tried connecting two antennas but if second antenna is placed inside signal quality is bad. And with one antenna if “RX” and “TX” antenna options are set to auto or 1 then signal quality is bad too.
After configuring wireless I moved on to booting from external usb flash drive (I've had some problems with saving changes in internal memory).
Here is my version of firmware (OpenWrt Kamikaze - With X-Wrt Extensions bleeding edge, r10518):
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r10518/custom_image-asus.trx
http://sr.dyndns.ws/ftp/repository/openwrt/r10518/custom_image-asus.trx
And here is root file system for flash:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r10518/rootfs.tgz
http://sr.dyndns.ws/ftp/repository/openwrt/r10518/rootfs.tgz
For booting from flash drive it should be divided in to two partition (use fdisk or cfdisk for making them). First one is swap (I use something about 64Mb for it) and second one is ext3 (everything that is left for it). My version of firmware boots from second partition (/dev/sda2). If you use two flash devises then flash drive should be connected to lower usb port.
Content of rootfs.tgz archive should be placed in the root of ext3 partition of flash drive.
That's all for now. Router should boot from flash drive and work with Atheros wireless card. If on first boot after flashing usb drive is not detected unplug it, plug it bask and mount it (mount /dev/sda2 /mnt command using telnet or ssh). After that router will boot from flash drive next time.
You can find additional packages at:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r10518/packages/
http://sr.dyndns.ws/ftp/repository/openwrt/r10518/packages/
(using original packages may cause problems with libs).
If someone needs some package tell me and I will build it. Look in comments for newer builds of firmware.
Later I am planing to write about downloading files using screen + wget + ctorrent and some more guide on configuration.
ps. If someone can please correct my english.
10 comments
Too bad, sounded so good with the Atherors card. Will try to get official Kamikaze to work though, then if I get a 32-Bit VM up an running probably compile myself. BTW: nowhere is mentioned if you can compile in a 64bit-Environment (probably not?)
But I tested this firmware on other wl-500gp and there were no segfaults. Try to reflash your router (maybe it would be better to flash original firmware first).
Toolchain for building firmware is gcc with support for crosscompiling for mips cpu. I think it should also work on x64.
Only problem with dnsmasq, but disabling IPv6 support workaround this.
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r11851/openwrt-brcm47xx-squashfs.trx
http://sr.dyndns.ws/ftp/repository/openwrt/r11851/openwrt-brcm47xx-squashfs.trx
rootfs:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r11851/openwrt-brcm47xx-rootfs.tgz
http://sr.dyndns.ws/ftp/repository/openwrt/r11851/openwrt-brcm47xx-rootfs.tgz
Packages:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r11851/packages/
http://sr.dyndns.ws/ftp/repository/openwrt/r11851/packages/
http://mjpg-streamer.wiki.sourceforge.net/Using+OpenWRT+compatible+routerhardware+as+webcam-server
or
http://prdownloads.sourceforge.net/mjpg-streamer/kmod-video-uvc_r215-1_mipsel.ipk
or
http://prdownloads.sourceforge.net/mjpg-streamer/libjpeg_6b-1_mipsel.ipk
or
http://prdownloads.sourceforge.net/mjpg-streamer/mjpg-streamer_r63-1_mipsel.ipk
Thanks for the information
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r13011/openwrt-brcm47xx-squashfs.trx
http://sr.dyndns.ws/ftp/repository/openwrt/r13011/openwrt-brcm47xx-squashfs.trx
rootfs:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r13011/openwrt-brcm47xx-rootfs.tgz
http://sr.dyndns.ws/ftp/repository/openwrt/r13011/openwrt-brcm47xx-rootfs.tgz
Packages:
ftp://user:pas@sr.dyndns.ws/pub/repository/openwrt/r13011/packages/
http://sr.dyndns.ws/ftp/repository/openwrt/r13011/packages/
P`lease look this and helpme