Posted 2 years ago

TP-Link TL-WR1043ND and OpenWRT

The supported hardware page gives instructions to use an image from the stable release (10.03).

It does run, but I’ve found that the stable release version they advise has issues with Android clients being unable to connect; especially with DHCP.

The image from 10.03.1-rc4 works perfectly fine for me, however. has a news post that there isn’t enough manpower to maintain trunk and a stable branch. 10.03.1-rc4 works perfectly fine for me though so give it a try if you’re wary of using the trunk branch and giving yourself a $75 brick.

Posted 2 years ago

TP-Link TL-WR1043ND, dd-wrt, openwrt

This is just as much a review and criticism as it is a guide. I hope it may help somebody (like anybody reads this).

My first attempt into putting OpenWRT on my router (a TP-Link TL-WR1043ND) ended up in a nice semi-bricking (don’t ask, it was my mistake.) A little soldering and a serial cable later and I decided to try out dd-wrt.

The installation was pretty painless, a simple matter of flashing the factory-to-ddwrt.bin on the dd-wrt site. It rebooted, I got a new DHCP lease a moment later, and everything was good. I did run into a few problems though:

  • the ipv6 modules were non-existent (but they had room for an ad serving proxy?)
  • Firefox and Chrome would both eventually be redirected to a blank page when clicking apply and the settings would sometimes be applied. Closing the browser entirely and opening the admin area again made it all work again.. for a while.
  • ipkg was utterly broken. The default location to store the packages list is on one of the read-only partitions (even if you have jffs enabled). It also was passing “—passive-ftp” to wget which on their build isn’t supported. Copying the ipkg script to /jffs/ipkg and editing it worked around this, but after half an hour I still wasn’t able to get it to download the packages list. Manually saving it to the correct location gave me a semi-workable system, which brings me to the next point..
  • ipkg was utterly broken. The packages list is for OpenWRT’s White Russian release which is significantly older. The kernel modules are compiled for linux 2.4 (dd-wrt v24-pre-SP2 uses 2.6) and most of the programs I tried to use just segfaulted.

If you look through the dd-wrt forums you’ll find many posts instructing the viewer to use Optware. Optware, by the way, is for broadcom chipsets only. Very helpful.

After about three hours of this mess (and attempting different builds in hopes that I just picked a bad one) I gave up and loaded openwrt. Half an hour later I had a working system with a Hurricane Electric tunnel and radvd.

dd-wrt’s admin panel is definitely much slicker and has a more complete ‘status’ page but the release quality is, in my opinion, a train wreck.

Posted 2 years ago

Python lists ‘gotcha’

Here’s a fun bug that I’ve run into lately. Multiplying lists replicates the reference to the same list, leaving you with a replicated and mutable list. Here’s an example:

»> list = [[]] * 10
»> list
[[], [], [], [], [], [], [], [], [], []] 

So far it’s exactly what we would we normally expect. But now we append to that list:

»> list[1].append(‘test’)
»> list
[[‘test’], [‘test’], [‘test’], [‘test’], [‘test’], [‘test’], [‘test’], [‘test’], [‘test’], [‘test’]]

And we get something quite different from what most people would expect. The solution is simple, don’t multiply lists to create multiple elements, use a loop with range to create unique child lists:

list = [[] for i in range(10)]

Posted 2 years ago

WolfCMS Review

Today I’m reviewing WolfCMS (specifically 0.7.5), a PHP CMS & miniature blog system.

The good: it’s decently well organized, the default ‘theme’ is appealing, and the admin area is as clean as a simple CMS could possibly be. There is also a fairly thorough security review script that checks file permissions for you. Options for your database include mySQL, SQLite, and PostgreSQL (a nice change from mySQL being the only possibility.) It comes with both a markdown and textile filters for your pages.

The bad: Unfortunately it could use quite some work. The default layout was unable to find children of the ‘home’ page so the site navigation was broken from the installation. The site templates are stored in the database which makes my preferred editor no help at all.

Summary: It looks good, and is probably fine for very simple sites. I wouldn’t use it for a large site that requires frequent editing though.