Widy/Installing: Difference between revisions
From charlesreid1
| Line 8: | Line 8: | ||
=The Procedure= | =The Procedure= | ||
Our steps will be as follows: | |||
* Get OpenWrt installed and running on our router | |||
* Extend the filesystem of the router so we can use an external USB drive | |||
* Prep the Widy to be used as a wireless aircraft carrier | |||
=Install OpenWrt on Router= | |||
==Start Up the Router== | ==Start Up the Router== | ||
| Line 61: | Line 68: | ||
To use OpenWrt, navigate to <code>192.168.1.1</code> 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. | To use OpenWrt, navigate to <code>192.168.1.1</code> 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. | ||
=Extend OpenWrt Filesystem= | |||
To use an external filesystem like a USB thumbdrive with our OpenWrt system, we'll want to add some software to tell OpenWrt how to use a USB drive. That's because to make OpenWrt small enough to fit on a tiny battery-powered router's firmware, you have to make OpenWrt pretty stupid. | |||
But before we can install modules, we have to connect OpenWrt to the internet. | |||
==Connect OpenWrt to the Internet== | |||
You can turn this tiny router from an access point (Master mode) into a wireless client (Client mode), a really cool feature that makes this doubly valuable as a gadet. | |||
Go to Wifi > Network. | |||
Turn on scan, and wait for it to present a list of wifi networks. | |||
Connect to your desired wifi network. | |||
Boom. If you ssh into the box, you should be able to reach the outside world: | |||
<pre> | |||
$ ifconfig | |||
$ ping microsoft.com | |||
</pre> | |||
==Install USB Kernel Modules== | |||
Let's install some modules, so OpenWrt knows how to talk to an external mounted drive. | |||
We'll use <code>opkg</code>, the package manager for OpenWrt. | |||
Start by taking a look at all the installed software: | |||
<pre> | |||
$ opkg list-installed | |||
</pre> | |||
Now we'll need to install some kernel modules: | |||
<pre> | |||
$ opkg install kmod-usb-storage kmod-fs-ext4 block-mount kmod-scsi-core | |||
</pre> | |||
Let's break that down. | |||
<code>kmod-scsi-core</code> installs kernel modules required for communicating with external USB devices. | |||
<code>kmod-usb-storage</code> installs kernel modules required to use USB storage devices. This is a hardware thing. | |||
<code>kmod-fs-ext4</code> installs kernel modules required to use ext4 filesystems. This is a software thing. | |||
<code>block-mount</code> installs kernel modules required to mount block devices, like file systems. This is a hardware+software thing. | |||
Got it? | |||
Revision as of 01:17, 22 August 2015
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
Our steps will be as follows:
- Get OpenWrt installed and running on our router
- Extend the filesystem of the router so we can use an external USB drive
- Prep the Widy to be used as a wireless aircraft carrier
Install OpenWrt on Router
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.
Extend OpenWrt Filesystem
To use an external filesystem like a USB thumbdrive with our OpenWrt system, we'll want to add some software to tell OpenWrt how to use a USB drive. That's because to make OpenWrt small enough to fit on a tiny battery-powered router's firmware, you have to make OpenWrt pretty stupid.
But before we can install modules, we have to connect OpenWrt to the internet.
Connect OpenWrt to the Internet
You can turn this tiny router from an access point (Master mode) into a wireless client (Client mode), a really cool feature that makes this doubly valuable as a gadet.
Go to Wifi > Network.
Turn on scan, and wait for it to present a list of wifi networks.
Connect to your desired wifi network.
Boom. If you ssh into the box, you should be able to reach the outside world:
$ ifconfig $ ping microsoft.com
Install USB Kernel Modules
Let's install some modules, so OpenWrt knows how to talk to an external mounted drive.
We'll use opkg, the package manager for OpenWrt.
Start by taking a look at all the installed software:
$ opkg list-installed
Now we'll need to install some kernel modules:
$ opkg install kmod-usb-storage kmod-fs-ext4 block-mount kmod-scsi-core
Let's break that down.
kmod-scsi-core installs kernel modules required for communicating with external USB devices.
kmod-usb-storage installs kernel modules required to use USB storage devices. This is a hardware thing.
kmod-fs-ext4 installs kernel modules required to use ext4 filesystems. This is a software thing.
block-mount installs kernel modules required to mount block devices, like file systems. This is a hardware+software thing.
Got it?