Recently I have been playing with mesh networking. I’ve spent some time with the great folks over at BuffaloMesh. They showed me the Commotion Wireless firmware and that has become my main focus. This firmware is a great little tool based on OpenWRT. The Commotion organization has developed their own, more user-friendly UI and integrated many tools designed specifically for mesh networking.
A few weeks ago a purchased one of these little guys:
Unfortunately support for the Nexx WT3020 wasn’t added until very recently and therefore is only supported in OpenWRT Chaos Calmer. Since Commotion only moved over to OpenWRT Barrier Breaker earlier this year, I was disappointed to find out I wouldn’t be able to directly compile Commotion for this device.
Luckily this last week I had some extra free time and decided to backport support of this device from the current OpenWRT trunk to Barrier Breaker.
The process started by locating the patch used to add support for this device to OpenWRT. I found that changeset here. At first I tried using this patch directly against a freshly downloaded copy of Barrier Breaker. The bad news was that the patch command reported back multiple errors. The good news was that some of the files patched without issue.
At this point I manually attempted to apply the patches. It appears that Chaos Calmer has change the structure of the directories that hold device-specific code(thanks for the tip Roger). Once I located all the files, I manually patch them(basically copy and pasting parts out of the patch file and properly placing the new lines into the source)
From there I ran a build. I ran into a couple compile errors because of my fat fingers. After those issues were corrected I was presented with a shiny, new .bin file. I find the easiest way to flash this thing is just setup a HTTP server on my dev box, SSH into the router, wget the file from the server and then use mtd to flash the firmware. Normally I would use the “sysupgrade” command to flash the firmware but I received an error stating this device isn’t sysupgrade compatible. At some point I’ll need to figure out what to tweak to add sysupgrade support.
After mtd completed the device rebooted and BOOM! Working OpenWRT Barrier Breaker on my WT3020.
After that I realized I still didn’t have a working .patch file, since I had manually patched everything. After doing some reading, I learned about making patches with “quilt”. Essentially I downloaded a fresh, unpatched copy of Barrier Breaker. I was then able to use quilt to run a diff between the modified and unmodified copies of the repo. This produced a .patch file which I have uploaded to my github repo. I verified the patched worked by using quilt to apply the .patch to the virgin copy of Barrier Breaker. I then ran a build using the fresh patch. I ran into one strange glitch where the build errored out part way through. But after restarting the build a second time it compiled without issue.
One this I wanted to make sure of, was that the device specific code I had applied also functioned properly. One of the easiest ways I could thing to do this was testing the LED functionality. One of the files in the patch included device specific LED settings. To make sure the LED was being addressed properly I simply needed to go into the OpenWRT LED settings and make sure they responded appropriately. I did this by setting a 1 second on/of delay.
Next I will need to compile Commotion against this patch and verify functionality. I’ll be sure to make a new post and link it here once that process is complete.