Vyhledávání MP3 googlem
Sorry, this entry is only available in Czech.
Sorry, this entry is only available in Czech.
Hey guys. Today, I’ve bought a new Asus WL-500g Premium multi functional wireless router. In folowing paragraphs, I’m going to show you, how to uninstall official firmware from Asus and instal open source project OpenWRT based on linux. After that it’s easy to use you router as a rsync, http, ssh, ftp server or as an video surveillance.
Install recipe of OpenWRT to this router is here.
There is just 32 MB of storage and RAM (shared) space. So first we need to install USB drivers to be able to install aditional software to the USB instead of internal Asus’es memory. The tutorial is here.
Attention: FAT doesn’t support symbolic links, so programs cannot be installed to FAT easily. We need to reformat FAT into e.g. EXT3. See folowing steps…
ipkg update
ipkg install kmod-usb2ipkg install kmod-usb-storageipkg install kmod-fs-ext3
reboot
ipkg install e2fsprogsdmesg fdisk -l
ipkg install e2fsprogsmke2fs \ -j /dev/scsi/host0/bus0/target0/lun0/part1
Tool mke2fs may fail on 300GB and bigger disks. Replace “/dev/scsi/host0/bus0/target0/lun0/part1” with your particular location detected by fdisk -l or dmesg
ipkg remove e2fsprogs libuuid
mkdir /mnt/usbmount \ /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb
/etc/init.d/usb enable reboot
As described in this paragraph.
echo dest usb /mnt/usb >> /etc/ipkg.conf
Now you can simply install any sw using these 2 steps:
ipkg -dest usb install libncurses ipkg-link add libncurses
ipkg -dest usb install http://downloads.openwrt.org/.. ..kamikaze/7.06/brcm47xx-2.6/packages/.. ..libreadline_5.1-1_mipsel.ipk ipkg-link add libreadline
ipkg -dest usb install python ipkg-link add libexpat ipkg-link add libopenssl ipkg-link add libpthread ipkg-link add uclibcxx ipkg-link add zlib ipkg-link add python
ipkg -dest usb install joe ipkg-link add joe
There is already installed httpd server as a part of BusyBox. You just need to reconfigure it.
[ -d /mnt/usb/www ] && httpd -p 80 \ -h /mnt/usb/www -r ${hostname:-OpenWrt}
/etc/init.d/httpd enable reboot
#!/usr/bin/python print "Content-Type: text/html; charset=ISO-8859-2\n\n" import os import httplib import datetime def run(cmd): d = datetime.datetime.now() print '<pre>' toChild, fromChild, childError = os.popen3(cmd) for l in fromChild: print l, print '</pre> Duration: %s' % (datetime.datetime.now() - d) print ' <h2>uptime</h2> ' run('uptime') print ' <h2>ps</h2> ' run('ps') print ' <h2>df</h2> ' run('df') print ' <h2>cpu info</h2> ' run('cat /proc/cpuinfo') print ' <h2>netstat</h2> ' run('netstat')
uci set wireless.wl0.disabled=0 uci set wireless.cfg2.encryption=psk2 uci set wireless.cfg2.key=some_long_key uci set wireless.cfg2.ssid=mySSID uci commit wireless && wifi
#!/bin/sh /etc/rc.common # The macfilter 2 means that the filter works in "Allow" mode. # Other options are: 0 - disabled, or 1 - Deny. # wlc ifname wl0 maclist "xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx" START=47 start() { wlc ifname wl0 maclist "xx:xx:xx:xx:xx:xx" wlc ifname wl0 macfilter 2 } stop() { wlc ifname wl0 maclist none wlc ifname wl0 macfilter 0 }
Then do following commands:
chmod 755 /etc/init.d/wlmacfilter /etc/init.d/wlmacfilter enable reboot