DD-WRT on Asus N66U version B2

I have recently started to work from home – its great but you need a rock solid connection to the net.  I’m on a wireless connection in my office and every time someone turned the microwave on the connection dropped out – very annoying for the 2 months it took me to figure it out.

I have been using a really old WRT-54G wifi router for about 5 years, running dd-wrt.  These units are getting very old, especially as the one I have are v1 and v2 units, I recon they must be about 10 years old.  They were very good in their day but they run on 2.4Ghz band so microwaves can be an issue so I lashed out an bought the current best WIFI router – the ASUS N66U.


Its a pretty mean looking unit and by all accounts a clanger of a WIFI router but my home network has my m0n0wall router assigning IP address to the LAN (both wired and wifi).  I needed a wifi router firmware that supported forwarding the DHCP function to my m0n0wall router and as a result the ASUS stock firmware wasn’t going to cut it (or at least not that I could find) and so I needed to load the N66U with dd-wrt as well.

I bought the N66U about 3 weeks ago, read about getting dd-wrt on it and it looked pretty straight forward.  What I didn’t realise is that the unit I purchased was hardware version B2.

I tried installing brainslayers dd-wrt.v24-21676_NEWD-2_K3.x_mega_RT-N66U but it resulted in a boot loop, which isn’t good, so I flashed the stock firmware back on it by accessing the units recovery mode (you hold down the reset button while you power on the machine and then point your browser to it on in case you wonder how you put it into recovery mode) and then put the unit back in the box for a week or so while I read a bit more about the various frimwares available and the issues people have faced.

Flashing of version B2’s is fairly thin on the ground at the moment so here is what I ended up doing.

Using the stock ASUS firmware I chose the upgrade firmware option in the web interface and upgraded to Merlins firmware which looks a lot like ASUS firmware but with a few tweaks, one of which is that you can see what version CFE is installed on the your N66U,  it also gets you ssh access to the router.  The CFE version on my brand new unit – built in 2013 was which may explain why dd-wrt.v24-21676_NEWD-2_K3.x_mega_RT-N66U wouldn’t flash properly.

The majority of noise around the net on this unit is that you needed CFE boot loader or to get the custom firmwares to flash and so I resolved I had to update my boot loader to using the method set out here.

The CFE update script assumes you already have and so you need to make some changes to the update script (cfe_update.sh) before you can run it.  Basically you need to extract the tar ball of the CFE updater you download, then with the cfe_update.sh file you find and replace anywhere it say to  Once this change has been made you need to copy the CFE update files to the N66U using what ever methods works for you – I used scp.  Once the 4 files needed are in the N66U you run the cfe_update script and update your CFE.  Make sure you back up a copy of the old CFE and a copy of the new CFE, again use what ever works for you to get it off the router, I used scp again.

OK, now that you have updated the CFE boot loader you can update to firmwares that are 64MB in size, you must not flash a 32MB firmware from now on.

At first I flashed brainslayers dd-wrt.v24-21676_NEWD-2_K3.x_mega_RT-N66U however this started having some issues after a little while and so I changed firmware to Fractal’s 64K dd-wrt build which can be found here.

Of course you must do the 30-30-30 NVRAM clearing before and after each firmware flash (apparently).

The firmware has so far been running fine but, my microwave issue has not been solved.  I failed to note that the laptop I used for work doesn’t support 5Ghz WIFI so all I have gained is some experience with hacking the N66U – others on my network will no doubt enjoy the increased speeds as their machines support 5Ghz 🙁

Thanks to the following forums and links in getting me to this stage.





Move of web and mail servers are complete

I have finally transferred all my services back to Australia.

For a few months now I hosted my web and mail server at Amazon. Unless you use the micro instances and the limitation there of its just to expensive (for me) to justify keeping it at Amazon. Luckily a mate of mine has a huge ESX box and was kind enough to create a couple of machines on there for me so here we are, back in Oz.

The web interface to my emails in the past has always been Squirrelmail, its fast, easy and works but is lacking in the looks department. On my new mail server I have installed Roundcube. It looks nice and seems to work well but is a little slower than Squirrel – perhaps it needs some tweaking.

My new website web application.

You may notice there isn’t much of my old site left, just the wordpress blog. Now that I have commencing moving all my servers back to Australia (thanks Paul) I have cleaned up my website and installed a couple of open source services.

The first was tt-rss (tt-rss.org) which is a great little web application that you use to subscribe to rss feeds. RSS is a great thing if you like to keep tabs of new posts on a bunch of websites. I used to use Google Reader but thought it would be cool if I could own the information about which websites I subscribe to – hence tt-rss.

Second, I have always found it painful to create new pages for photos that we take on my old site, it was time consuming using something like Jalbum. To this end I have installed OpenPhoto on my website (see photos.depannone.com). Go to http://theopenphotoproject.org/ for more info. Its great – very flash and has the tagging facility which I never really considered until you sit down and think how do I find this picture again in a few years. For each photo you upload to it you can tag it with what the photo is about (say it has a photo of a dig, you would tag it “dog”) then in the future if you want to look at say photos of just dogs you can do so (assuming you have been diligent at your tagging in the first place).

The great thing about OpenPhoto is the photo’s don’t actually live on your server, when you upload them they are actually store at Amazon in one of the S3 buckets that you need to create (if you self host). Given all my photos are currently backed up to S3 this was fairly easy. If you don’t have S3 yet – sign up at Amazon, create a bucket for your photos and enjoy owning and staying in control of all your photos.

Two very cool web apps that you should check out of you run your own servers.

Crazy fluctuations in Amazon EC2 spot prices

What in god’s name is going on with EC2 Micro instance spot pricing?

I have recently had my instance shut down because the spot price for micro instances in US East zone went up to some ridiculous price like $5/hour! Crazy price, but it only sits there for an little while and then drops back down.

In any event, I have come of spot prices for the time being and have gone to normal pricing which means it costs a bit more but at least I have control of how much I will be paying and not have instances dropping off. An added drama with micro instances is there is no included persistent storage, so when the thing gets shut down all changes made to that image since that last save have been lost (except for the data that I have saved in a persistent storage device I have paid Amazon protection money for and that I mount on the instance).

In any event, may consider moving my instance to Amazons Singapore data center once I figure out how to do that and perhaps go back on spot prices after the move (Singapore seems to be less volatile, presumably given the lesser demand there – just need to worry about supply).

***UPDATE 30 Dec 2011***

Here is a graph showing the wild fluctuations in spot pricing for t1.micro instances. keep in mind the on demand price is currently $0.02/hour. What the!

Here is what I mean about spot prices for EC2 instances,

Just moved my blog to EC2

Hello all.

If you are reading this you are in fact reading it from my new snazzy EC2 instance at amazon, sweet hey!  With luck it will be a cheaper way to host my websites as opposed to the power bill that I seem to be incurring at home with my dual Xeon CPU old clunker.


Mythtv and sudden DB crash

My wife calls me while I was in my man cave tonight and tells me our mythbox has crashed and didn’t come back up with a reboot. I have a look and the thing it is asking me for the DB details (ie, location, password etc) – as if we are setting the mythtv installation again from scratch. This understandably throws me into a bit of a panic especially when she tells me she has already seen the screens and just entered through them!

I wasn’t able to log into the mysql tables using the cli client. Manually starting the mysql db FAILED as did restarting it or even stopping it, they all FAILED.

After digging in Google I noticed that the mysql.sock file that is created in /var/lib/mysql and which the mysql client must use to connect to the mysql db server was appearing and then the next moment it was gone, very very strange.

I looked at the size of the mysql.log file, it was over 3 GB! Looking in the mysql.log I see “Can’t start server: can’t create PID file: No space left on device” then the penny drops, I had run out of disk space on the root partition.

Deleting the 3GB mysql.log file gives me back 34% of /, rebooted and then off I go.

So the moral of the story kiddies is to check your log files for a hint to what’s going on and make sure you have enough space left in / or mysql will bomb out,

Where have you been Martin?

Its been a while but so much has happened since my last post.

If you have been reading my Milan – Taranto blog (and why have you not been?) you will now I had a 2 week trip to Italy in early July and ran in the Milan – Taranto rally on my MV 350B motorbike.

I returned to Australia mid July and started work straight away which came as a bit of a shock and its taken me a couple of weeks to stop wishing for Italy any longer.

I have doing little, just bits and pieces around the house, messing about with my computers (building a new mythtv box) and thinking about building a new webserver virtual machine to take over from my old one that has been running now for perhaps 3 years. I’m worried its a bit exposed.

What do people recommend as far as a flick the switch web server goes? Just down load a LAMP server from VMware and fire it up?

Meh, I don’t know. I’m thinking of going lightweight web-blog as well, wordpress seems to me to be the most bloated of all weblogs, I’m thinking nanoblogger.

So, suggestions on webserver VM and blogging app please.

Sipdroid and trixbox – it works

Thanks to a few helpfull soles on the sipdroid site I have been succesful in getting sipdroid to register with my Asterisk server AND be able to make calls.

The trick is (thansk to Adrian)
In your sip.conf, comment out “secret = …”. Instead use the following: auth=username@password@host

I also made a change to the extension sipdroid runs on in asterisk and changed: qualify=no

Sipdroid registers to my asterisk box fine and is able to make and receive calls fine. As for the call quality – well that is another thing – keep in mind my testing to date is over Optus 3G.

The first issue I am having is that if I call someone’s mobile I loose the first say 10 seconds of the conversation, ie, I miss them saying “Hello” which starts the conversation off on a failry bad footing, the person I called is usually first heard by me saying” Hellllloooooo, any body there” or something to that effect – not great. Secondly there is still some lag. This is odd becasue I thought the lag I experienced using pbxes.org would reduce given the server I am regsitering to now is local and not in Japan.

Lastly, you need a very stable and good internet connection. I believe now that my data usage has doubled for calls I make as effectivley my asterisk box uploads and downloads from sipdroid AND it uploads and downloads to my VSP. Given the codec used in sipdroid is G711 data usage is high so keep that in mind – 80kbps up and down times two = 160kbps up and 160kbps down for a phone call.

Anyway, best of luck for anyone deploying sipdroid on their asterisk server. Let me know how you go.

Arch linux and open box

The other day my laptop borked. I think it was a combination of a file system error and a dodgy stick of RAM. In any event, my arch linux installation didn’t work so I thought it a good oportunity to installa fresh one and completely change the way I use it.

To this end I have decided to go very light weight

Openbox WM (this thing is just great, bare minimum, customisable greatness)
Mutt (with side bar patch!);
Firefox (not light weight I know but elinks just doesn’t do what a browser I use needs to do);
Urxvt (cos I want to be l33t);
No dock or pager or login manager bloat just unclutered goodness;

I think that’s it. It is now practically unuable by anyone but me which is in a way fun.

I’m at uni studying and am bored.

linHES and Shepherd XMLTV listing grabber

Over the weekend I built a new mythtv box. My old box (Dell GX260) has been in service for about 3.5 years and has been very good but its getting old and times are moving on, its hardware is starting to get left behind.

With the new release of Mythtv v0.22 due later this month and the recent release of VDPAU by Nvidia I thought it time to build a new box and take advantage of these new features.

Having bought a used Dell GX620 for AU180 I threw in a new Leadtech 8400GS GPU (low profile), 1TB HDD and a used Dvico Dual digital 4 TV Capture card.

I have to this point only ever used Mythdora which has been great and am currently running 10.21 (after running 3.01 for 3 years). This time around I wanted something that was easy to upgrade and keep up to date, easy to install and was stable – enter linHES. linHES is the ‘new’ knopmyth but is now based on Arch linux. I have been using Arch on my laptop since Christmas so have a fair amount of experience with the distro so it seems to be a perfect fit for me.

Installation of linHES was painless and the Dual digital card was working fine (its a version 1) although for some odd reason on the first installation ( I have since done a few) the first time I tried to add the second DVB tuner on the card it wouldn’t work, every installation since then has worked fine which seems odd.

Prior to setting up the cards I made sure I had the mythtv package that had VDPAU prebuilt. to do this I just passed pacman -S mythtv-vdpau and off it went.

My previous mythboxes have used the fantastic script to get the TV listings called Shepherd. Shepherd has some perl dependencies that need to be installed prior to running the Sheperd config. I found a few of them were packages prebuilt to be installed using pacman but one remainied elusive and was a requirements to run shepherd, it was called ‘Compress::Zlib’. I ended up getting it by installing perl pacman -S perl and finally was able to run Shepherd.

Just now I realise I could have installed shepherd and all its dependencies with a simple pacman -S shepherd. I’m such a idiot. I recall seeing shepherd in the repo the other day when I was having a poke around and thought it must be something else. I’m a glutton for punishment.

Will do a fresh install tonight after university and install it into the main TV room this weekend for full time use.