Here at The Work Department, we've been busy cooking up systems to experiment with applications that utilize node-to-node mesh connections and are eager to share them with you. In particular, some of the example applications that we proposed in our Exploring "Meshaging" post have been taking form. We want to offer you the tools to experiment with what is possible given the unique architecture of a mesh network. The Commotion router software is built atop OpenWRT, a Linux distribution designed for routers and other small devices. OpenWRT has a package management system, and Commotion’s code is kept in a separate feed and package. A developer can integrate additional features into a Commotion network by writing or porting applications and packaging them for OpenWRT. Below, we explain the process of porting and packaging an application (in this case, a small websockets server, ws-routing, and dependencies).
You'll need a few things to follow along:
Once you have the essentials listed above you can start mixing it all together. First, let's build the packages! You can do this by opening your terminal and entering the commands listed below in order. Anything after a number sign (#) is there to provide additional instruction and shouldn't be entered into the command line. The setup scripts and make commands can take time to run, so that would be a great time to read more of the blog or the Mesh Resources wiki.
# Clone the commotion-openwrt repo: git clone https://github.com/opentechinstitute/commotion-openwrt.git cd commotion-openwrt ./setup.sh cd .. # Clone your package repo: git clone https://github.com/bnchdrff/commotion-wsrouting-feed.git commotion-examples # Run the package setup.sh script: cd commotion-examples ./setup.sh # ignore package feed errors # Configure and build: cd ../commotion-openwrt/openwrt make menuconfig # ignore package feed errors # A ncurses GUI will display: ## Select the commotion-apps submenu ## Select ws-routing as * (static) by pressing Y ## Select exit ## When prompted, choose to save config make V=99 # build, verbosely cd bin/ar71xx/ ls
And, voila! You should see a list of files that look something like this: "openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-factory.bin". The file you'll need to flash your wireless router will vary depending on the router hardware. Using that file, follow the instructions provided for Installing Commotion on Wireless Nodes in order flash the router. These Detailed TFTP Instructions also include detailed steps to transfer the file to your router with TFTP.
Well done! You have installed Commotion on a your wireless router. After the router restarts, you can disable your wired network and hop on the “commotion_NNNNN_ap” network that should become available. Open a web browser and navigate to any website, which should bring you to the Commotion splash page. Last, you can verify that the ws-routing package is installed by following these steps:
Here's a virtual pat on the back. Now you’ll be ready to install example applications and test them for yourself. In our next post, we’ll show you how to install and use the chat application we developed.