From charlesreid1

Building my own Widy the Hacker Gadget.

The Background

What we'll be doing is installing OpenWrt, an open-source Linux distribution that can be installed onto router firmware, onto a TP Link 3040 battery-powered router.

This router was selected becase it has a USB port, which will enable us to extend the filesystem of the OpenWrt device.

The Procedure

Start Up the Router

Turn on the router.

You'll want to connect to the router via the ethernet port, so make sure it is in 3G or WISP mode (where it expects clients to connect via ethernet), not in AP mode (where it expects to be able to connect to a modem via ethernet).

Navigate to the built-in router control page at 192.168.0.1. From here you can change the settings of the router, but you can also install firmware updates. This is how we'll install OpenWrt on our router.

Go to System and Firmware Update. We'll download an OpenWrt image and point the router to this image as the firmware update.

Download OpenWrt

I downloaded Barrier Breaker for the router. After you've got it installed, you'll see this banner at each login:

root@OpenWrt:~# cat /etc/banner 
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (14.07, r42625)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------

I first found my specific router on the OpenWrt wiki, and followed the instructions contained there.

Note that version 1 (v1) will not work, you must use version 2 (v2).

Also note that there is no version 2 available for Attitude Adjustment.

Firmware Update

Now update the firmware by going to the router control panel at 192.168.0.1.

Go to System Tools > Firmware Upgrade.

Find the OpenWrt .bin image file you downloaded, and hit go.

IMPORTANT: You are flashing the hardware of the router. Anytime you flash the hardware, you have the potential of bricking the device. Make sure you're ready, you don't have a low battery, you don't accidentally close the browser, etc etc.

Wait for the progress bar to reach 100%. Eventually the router will turn off and turn back on, and your browser won't be able to reload the page. That's because your router is now running OpenWrt. Congratulations!!!

OpenWrt on the Router

To use OpenWrt, navigate to 192.168.1.1 in the browser and you should see the OpenWrt web interface.The first thing you'll be asked to do is set up a password for the router. Once you do that, you'll have an all-in-one Linux box, like a trimmed-down Raspberry Pi. You can control all sorts of stuff from the web interface - things you can control when you're running Linux. It's become a very souped-up router! You can also SSH to the router.