Tuesday, June 29, 2010

Asterisk, the VoIP Server on DD-WRT

I'm a big fan of Asterisk on router -- imho, it's the perfect platform for anyone want to try Asterisk at home -- 24x7, fanless and even the cheapest router can handle at least 2-3 concurrent conversation. Before this WZR-HP-G300NH, I had Asterisk running on a WRT54G-TM for over a year with lots of fun.

Installing Asterisk on the router is easier now as current OpenWrt trunk build(the one we use) includes prebuilt Asterisk binaries. As always, since OpenWrt is designed to work with / not /opt, some adjustment is required to get Asterisk working properly.

  1. Install Asterisk 1.6

Read More...

Lighttpd and php on DD-WRT

Busybox httpd is good for simple static pages, now here is a tutorial for installing lighttpd and php with fastcgi support in the router. Here I choose lighttpd over Apache for its light cpu usage and small memory footprint.

Since all our software are based in /opt folder, some modification must be done to get everything working:

  1. Install php5 and lighttpd

Read More...

Monday, June 28, 2010

Simple busybox http server on DD-WRT

By default DD-WRT runs its own http server(/usr/sbin/httpd), providing web management interface to configure the router. The server is highly integrated and hard to reuse for our own contents. If you just want to host some web pages without CGI support, the httpd server in busybox is a good alternative.

  1. (Optional)Move DD-WRT's web admin to another port

Read More...

Sunday, June 27, 2010

Upgrade DD-WRT and Keep Installed Applications

The DD-WRT support for these new 11N Gigabit routers are still in early stage with new builds rolling out every one to two weeks. The old good "if its not broken then don't fix it" rule might not apply here and I suggest to stay with latest release if you have the time(and guts).

Upgrading a DD-WRT firmware with loaded software is pretty easy, considering the extra work we've done. Take the trouble not to mess with important system folders like /lib /usr and /bin and now its the reward time.

  1. Stop installed software

Read More...

Workaround for Stuck Beacon Problem

Stuck beacon is a notorious problem on madwifi (the wireless driver DD-WRT used for Atheros routers).  If you never experienced any wireless interruptions with DD-WRT then just ignore this article. However, if you're annoyed by this stuck beacon problem with constantly dropping wireless connection, then I hope this can be of help.

I personally prefer the open source ath9k driver which doesn't suffer from this, but some important feature like WDS is missing from ath9k. So to each its own, DD-WRT has the perfect reason to stick with madwifi and I don't expect the switch to ath9k anytime soon. And, seems that the problem only happens under certain circumstance. In my case, the connection drops with an Atheros wireless N card -- same card works great with stock firmware -- but works fine with another Intel WiFI 1000 11N card. So if a stable wireless connection is very important, the best solution might be flashing back to stock firmware or just try another card.

Below is a quick hack, not a completely fix but would make life a little easier. The idea is to watch the output of dmesg and when the "stuck beacon" error messages flood, reset the wireless interface to bring it back to life.

Read More...

Wireless Scheduler with Cron Job

Cron is a time-based job scheduler in Linux systems which enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. In this example, we'll use cron to control the wireless signal, set it to turn on only at given time.

DD-WRT is shipped with cron support but again we'll use our own cron daemon as it's easier for future update and will save some flash wearing.

  1. Disable DD-WRT's Cron

Read More...

BitTorrent Client: Transmission on DD-WRT

If you've followed the previous guides to set the opkg system, then installing transmission on the USB enabled DD-WRT system is a no-brainer. Only one little thing needs to be taken care of...

  1. Install transmission

Read More...