2012-11-01 / The Work Department
In our previous blog post, we walked through the process of creating an OpenWRT package to provide a ws-routing server. We've since continued development on this, and would like to share our process for updating the OpenWRT package after making bugfixes. We'd also like to introduce the commotion-chat package that puts the ws-routing server to use. After we fixed the bug in the ws-routing server code, we needed to update the OpenWRT package to reference the most recent Git revision. Below, you can find a quick guide on how to update an OpenWRT package. First, you need to update the Git revision. Do this by editing the package's Makefile and changing a variable:
cd commotion-examples/ws-routing # get in the package vim Makefile # edit the makefile, increment PKG_RELEASE, and update the PKG_REV to the latest commit's hash # e.g. #PKG_RELEASE:=2 #PKG_REV:=7942da7b7ed4afc4c42b28553b0baf3a47060917 cd .. # rerun the setup for this package ./setup.sh cd ../commotion-openwrt/openwrt # if you haven't built the OpenWRT base system yet, you can run "make" to build everything make package/ws-routing/install cd bin/ar71xx/packages python -m SimpleHTTPServer 8080 # start a webserver so your openwrt router can download the new package # if you don't have python installed, you can pursue other means of installing the package :)
After completing the steps above, open your web browser and navigate to http://<your_ip>:8080/, substituting your computer's IP address. Copy this URL for the ws-routing package. Now, open another browser tab and connect to your OpenWRT router's administrative interface. Go to "Administration," hover over "System," click "Software," and paste in the URL of the ws-routing package in the "Download and install package" form. (TIP: If an older version of the package is already installed, you may want to remove it before reinstalling.) Before it installs, you'll need to click "OK." You'll see a message that the package was downloaded & upgraded.
The Fun Part
# if you're currently in commotion-openwrt/openwrt... cd ../../ # clone commotion-chat feed git clone https://github.com/bnchdrff/commotion-chat.git cd commotion-chat ./setup.sh cd ../commotion-openwrt/openwrt make menuconfig # select the commotion-chat package under commotion apps for installation # if you haven't built the OpenWRT base system yet, you can run "make" to build everything make package/commotionchat/install cd bin/ar71xx/packages # start a webserver so your openwrt router can download the new package python -m SimpleHTTPServer 8080 # if you don't have python installed, you can pursue other means of installing the package :)
Then, follow the same workflow described above for the ws-routing package to install commotion-chat on your router. After installing these packages, you may need to reboot the router. Hover over "System," and click "Reboot." Confirm, wait a few minutes, and then try visiting your router's splash page. If you installed/updated commotion-ws-routing and commotion-chat successfully, you can now click on the "Chat" menu item under "Applications" and try out the chat app!