Wednesday, September 24, 2008

Using OpenWrt/X-Wrt White Russian as a QoS device

For those Linksys WRT54G series owners upgrading their wireless networks to newer devices that don't support OpenWrt, I recommend using your old WRT54G as a Quality of Service (QoS) device. Placing it at the end of the topology, right before your WAN (modem), you can utilize the wonderful QoS features in X-Wrt White Russian to prioritize network traffic going over the WAN. You can also use the QoS of Kamikaze, but if White Russian does the job, it is the more mature platform. Tomato is another option, though I can only speak for the performance of QoS in OpenWrt. DD-WRT's QoS is generally broken, I don't believe it works at all.

QoS can greatly improve network responsiveness when you're reaching the cap on your WAN. In addition to improving the standard browsing experience while downloading in the background, it will also improve your gaming, VOIP, ping, and TCP connection initiation latency.

Saturday, May 24, 2008

AES vs. RC4/TKIP benchmark, and CPU/RAM overclocking

I've been optimizing my small wireless network lately. Its a simple setup, running OpenWrt /w X-Wrt extensions on a WRT54Gv4 (essentially a WRT54GL) and a WRT54Gv5 running in client bridge mode on a downstairs computer. After doing many benchmarks, here is what I recommend:

WPA2 AES seems to perform 10% better than WPA2 TKIP/RC4 on these Broadcom platforms. I'm still maxing out at about 22MBits, but that's better than the 18MBits I was getting. The latency seems lower as well, which is quite important for remote desktops and gaming.

Now, for overclocking. I always overclock the WRT54GL-like series to 240mhz CPU and 120mhz RAM. Just setting it to '240' implies the RAM speed is 120, so only clkfreq=240 is necessary.

Its important your Linksys model have a NEWER CFE BOOT LOADER though, else you can brick it by an invalid clock setting. Starting with the WRT54Gv4, the boot loader was changed so that invalid clock frequencies are simply ignored. I verified this during detailed disassemblies of the CFE boot loader. More information is in my old R&D wiki here .

So, if your device is one that's 'safe' to try overclocking, then except for the risk of burning out your processor and starting a fire, its good to try. Without any heat-sinks I've been running both my WRT54G class devices at 240/120 for a couple years now and everything has been fine.

You can overclock it by changing the 'clkfreq' nvram variable. On units with these newer CFEs, you simply need to set the CPU frequency and the RAM frequency will be implied as one-half of that. For example, clkfreq=240,120 is fine, though clkfreq=240 is also valid and results in the same clocking.

Why do it? Simple. For increased throughput and decreased latency. Just because your CPU is idle most of the time, doesn't mean its speed isn't important during short-term bursts when its used to its capacity.

The argument about it safeness is debatable, but the RAM seems underclocked from its specs to start with. Also, the slightly newer (5352 vs 5354) Broadcom chipset used in the WRT54Gv7.2 and above is even clocked to 240mhz, suggesting the 5352 is at least close to being capable of running 240/120. That said, overclocking is obviously pushing beyond the limits the manufacturer deemed safe, SO NEVER CONSIDER IT SAFE AND DO IT AT YOUR OWN RISK.

In the end, I always overclock these biatches for a little better performance and have NEVER had any troubles.

Sunday, July 15, 2007

Update to DD-WRT

Since my last post here many months have passed, and much has changed in my life. I'm now generally a less angry person, and certainly less prone to take things as seriously as before.

While its true, some of the things DD-WRT did were a bit shady, and I don't like commercialization in that form being snuck into a F/OSS project, I don't hold any grudges.

After all, a truly open, free, and community oriented project is available in the form of OpenWrt and X-Wrt -- so there it is, for those who desire such attributes.

Saturday, February 10, 2007

DD-WRT Continues to exploit free open-source software

I have spent almost a year in the embedded development community and have enjoyed it, for the most part. I am however increasingly sickened by DD-WRT's exploitation of the open-source community. This intention of this post is to reveal the truth about what DD-WRT has become.

Before DD-WRT made a turn to commercialization and exploitation, I fully supported it. I personally contributed to DD-WRT's growing fortune in the form of developing the WRT54G(S)v5 flashing technology and Firmware Modification Kit. I spent hundreds of hours adding value to DD-WRT.

Many months ago I saw the direction DD-WRT was taking and tried to intervene. Being in the software business for so long, I knew that one step towards commercialization initiates an unavoidable slide down a slippery slope.

Brainslayer, the self-proclaimed author of DD-WRT, claimed he'd never do various things, but as the desire to generate revenue increasingly influenced his decisions, concessions on every front were made.

Being in the software business for so long, I knew that one step towards commercialization initiates an unavoidable slide down a slippery slope.

x86 build - activation required
Now, the x86 DD-WRT is in full swing. To use it you must buy a license, which is enforced by a product activation scheme. If you have two routers, you must buy two licenses. Licenses aren't cheap, at 30 Euros per license, with marginal discounts if you buy 10 or 50 licenses at a time (250 and 1000 Euros, respectively).

Broadcom special edition - more and more special
Also, as I predicted, the 'special edition' of Broadcom DD-WRT continues to gain features that the free version doesn't have. Brainslayer originally claimed the special edition would only have one extra feature. Of course, I knew that to generate more revenue he'd start adding new features to the special edition first... and he has. Essentially now there is a DD-WRT full and DD-WRT lite.

Walking on the backs of open-source developers and contributors
What is most disgusting about DD-WRT is not that its making boatloads of cash and Brainslayer is traveling the world, from London to San Francisco. Instead, it is that he has done so on the backs of so many developers who have contributed their time and resources to aiding the supposedly free open-source project. Additionally, so many people have donated to DD-WRT, under the guise that it is a free project. To this date, Brainslayer continues to unabashedly ask for donations. It's like Microsoft asking for donations, its ridiculous.

To this date, Brainslayer continues to unabashedly ask for donations. It's like Microsoft asking for donations, its ridiculous.


Consider who authored DD-WRT - NOT Brainslayer
Users that don't know any better falsely assume Brainslayer has authored DD-WRT, something he proudly claims everywhere. In fact, Brainslayer has written less than 1% of DD-WRT. All the core capabilities are implemented by free open-source other people have authored. Consider it for a moment, DD-WRT consists of the following:
  • Linux kernel and standard drivers.
  • Drivers from the Open Source community - i.e. JFFS2 and Squashfs.
  • Drivers and patches from Broadcom, OpenWrt, Sveasoft, Linksys, and other
  • Packages from a variety of open source projects, i.e. busybox, dnsmasq, (Linksys) httpd, wondershaper, and so many more. These make up the core of all DD-WRT functionality.
This easily accounts for 99% of the code and capabilities in DD-WRT. So, what *is* DD-WRT then. DD-WRT is:
  • A collection of scripts to make the system work as desired.
  • A web UI forked from Sveasoft, who forked from Linksys. Further, its contributed to by a number of developers in the DD-WRT community. The biggest capabilities have NOT been authored by Brainslayer.
Users that don't know any better falsely assume Brainslayer has authored DD-WRT, something he proudly claims everywhere. In fact, Brainslayer has written far less than 1% of DD-WRT.

GPL? What GPL?
Brainslayer tried to make his fork of the httpd non-GPL, but recanted that claim in the next update when he was confronted about it. Still, to this day, what few scripts and minor pieces of the firmware he has authored he tries to make non-GPL. Whether or not it is illegal depends on the individual items, but it certainly isn't very cool. After all, these are just a bunch of scripts and a some small pieces of code. He can't find it in his heart to make those things GPL even though he' profiting so much from GPL software?

Below is the license from DD-WRT v23 SP0, where Brainslayer tries to illegally claim the httpd (web interface) as his own non-GPL work, and makes his few contributions to DD-WRT non-GPL:

the use of the "NON GPL Parts" of this firmware and the distributed source
is permitted without any charge for PRIVATE USE ONLY unless other rights are
granted by the firmware author only.

26.8.2005 Sebastian Gottschall / Blueline AG

the following features are tagged as NON-GPL

Webinterface
macupd (mac update daemon for rflow collector)
the configuration scripts and definitions within /etc/config


Censor and attack the critics

Many people who dare question DD-WRT in any way now find themselves ousted from DD-WRT's forums. I found myself publicly falsely accused of various things, all because I dared to question the direction of DD-WRT. Of course, Brainslayer's friends and allies come to his defense and believe every word he says and further spread lies about people who dare voice an opposing opinion. According to them, every critic has some ulterior and self-serving motive. But, as far as motives go, we all know Brainslayer's motive: money.

This behavior is ironic considering DD-WRT was forked from Sveasoft because Sveasoft went commercial and behaved just like DD-WRT is behaving now.

This behavior is ironic considering DD-WRT was forked from Sveasoft because Sveasoft went commercial and behaved just like DD-WRT is behaving now.

Users don't care
I tried to get users of DD-WRT to care, but they didn't They were willing to pay for DD-WRT, which is reasonable even though there are free alternatives like HyperWrt, Tomato, X-Wrt/OpenWrt, and others.

After all, why should users care about developers being exploited? I suppose they could stand up for principles, but we can't expect consumers to behave like that.

I thought maybe Brainslayer continuing to ask for donations might anger them. It didn't.

Lastly, I think many users simply don't know the truth. They don't know Brainslayer is such a fraud and exploiter, nor how much he profits. He still pretends to be a poor programmer who solely authored DD-WRT and needs your donations to continue development. People donate or purchase licenses not realizing he's already making plenty of money, despite whatever he may claim, nor that donating does not encourage him to continue development. He still hasn't done basic things that should be expected of him since he is now profiting from DD-WRT.

Users should at least start demanding they get better service for the cost of those licenses. For instance, demanding he take the time to finish the WRT54GS v5 reversion firmware. I did EVERYTHING else with regards to that technology, and even though Brainslayer profits heavily from my work, he refuses to take a few minutes and do a little work himself. I've already written all the necessary utilities, fixed critical bugs, and created a framework for it. It would take all of 30 minutes to put together.

Stop the exploitaton
I have no personal grudge with DD-WRT or Brainslayer, I simply want to see the following things happen:
  • Quit asking for donations as if you are a truly free project. A free project does not sell licenses.
  • Acknowledge that DD-WRT is the work of so many other people. Currently there is little to no credits given to anyone else besides Brainslayer. In fact, copyright strings have been altered and removed in the past (ref: here).
  • Make sure the entire source code is available for download, as required by the GPL license. Quit violating the law by adding copy protections and obfuscating or ommiting code (ref: here).
  • Quit attacking and banning anyone who expresses an alternate opinion.


Thursday, February 1, 2007

X-Wrt readies official Milestone 2.7

The last month has had its ups and downs. I was ill for a bit and neglected my role in the project, though thepeople managed things quite well in my abscence -- making me glad to see X-Wrt could survive just fine if I were to die or be otherwise incapacitated.

We've had many new additions to X-Wrt in the past couple weeks, with Spectra rewriting much of the CSS so that its much cleaner. In the process he reworked the color switcher so that it uses proper alternate theme mechanisms instead of a proprietary technique.

We fixed a number of bugs too, many appearing in the brief Milestone 2.6 version of the webif, which was snuck out far too hastily. There was a period of a few days this month where a person downloading the stable version may have got a version not so stable at all. I apologize for this, but we are still in beta.

A new stable webif build called Milestone 2.7 is already up, but its not the official release. Once Milestone 2.7 is officially released we'll probably freeze or pseudo-freeze the White Russian branch so that the Kamikaze branch can advance more freely. SSL support is planned to be implemented first in Kamikaze, though plans may change. At present, the plan is to write a new tcp tunneler that utilizes axtls. The alternate would be to use openssh+stunnel, but this is a very heavy solution weighing at least few hundred kilobytes. The axtls solution will probably end up being less than 100 kilobytes.

Our official release of Milestone 2.7, along with a new X-Wrt firmware image (finally), coincides with OpenWrt White Russian 0.9, which is supposed to be released very soon after a delay of over a month from its original release date. Its important this build be made public because there are some bugs in White Russian RC6 (note: they are fixed in the X-Wrt Milestone 2.5 firmware image).

In our new firmware image we have updated to Busybox 1.3.1 and Miniupnpd 1.0-RC3, for anyone who might care.

Saturday, January 13, 2007

Why it took X-Wrt to make a decent webif for OpenWrt

The X-Wrt project. and specifically webif^2, has been a phenomenal success. For those unfamaliar, webif^2 is the next generation webif we're developing for OpenWrt. Already its made OpenWrt accessible to a whole new class of users.

Why has there not been a better webif before now?

One might wonder why a better webif has never been developed for OpenWrt. Why did it take an external project to extend OpenWrt in such a seemingly obvious way? Couldn't this work have been done from within the OpenWrt project? The answers lie in a deep-seated difference in development philosophies, and perhaps also in an elitist attitude by those who don't themselves use the webif (and therefore consider all who do somehow inferior to themselves).

Deprecating code without offering a replacement
..or.. you know, *I* could do it better


For at least a year OpenWrt's default spartan webif has been abandoned. New contributions to it have met with resistance in the forms of claims that this entire webif will be thrown out 'soon' as part of a massive rewrite. Of course, this rewrite never began, and now it seems less necessary than ever. This is typical of OpenWrt though, they like to do rewrites, necessary or not, because they want to achieve the most perfect product they can, without concern of delivery schedules or other more practical issues. Unfortunately, when developers deprecate code without actually writing new code, the end effect is nothing gets done.

Elitism
..or.. you lame webif users


A big problem of many young geeks is that they have an elitist attitude. The lower the level at which you write code or use the system the more 'elite' you are and the more 'lame' those who utilize higher level systems are. As a low-level programmer myself, I once held this attitude, but grew out of it as I matured to realize the world is about getting things done, not proving how smart you are.

For a long time now people who requested a better webif or developed for the webif have been ridiculed and thought of as inferior because they actually 'have' to use a webif. Many users who are perfectly competent at the command line prefer a webif, and there is no doubt that it is quicker to learn a graphical interface than a command line interface. Despite this, there has been no acceptance given to these 'lamers' who want ease of use in the form of a webif. You'll still see people qualifying any comment about a webif with things like "my friend would like a webif" or "I just don't have time right now, that's the only reason I'm using a webif".

People need not make excuses for using a webif. The fundamental direction ANY technology should take is that it should be made easier to use and more accessible wherever possible. To intentionally keep a system harder to use as an attempt to prove some sort of eliteness is just childish.

X-Wrt to the rescue

I wish that 'traditional' OpenWrt developers and users would read this statement and think, "oh, yea, what AM I trying to prove with this unproductive attitude", and then change their ways. But, that is not likely to happen. Instead, this statement will be seen as an attack of some sort, even though its not at all.

Never fear, X-Wrt is here to give users solutions.

Wednesday, January 3, 2007

X-Wrt Blog

Welcome to the X-Wrt blog of Jeremy Collake. The intention of this blog is simply to provide a place to report on the latest thoughts and developments regarding embedded firmwares. For those unfamiliar with X-Wrt, see here.

Whether or not I actually utilize this blog remains to be seen, but for now, here it is.