Breathe new life into your old home router

A New Route

© Lead Image © donatas1205, 123RF.com

© Lead Image © donatas1205, 123RF.com

Article from Issue 253/2021
Author(s): , Author(s):

If you have an old router lying around, you can put it to good use with a few easy projects and learn something along the way.

There are some fun and interesting projects that can be done by repurposing an old home router. If you don't have an old router lying around, you can usually find one for about $5-$25. These routers are easy to reflash, so a new programmer doesn't have to worry about messing things up too badly.

In this article, we will look at three projects to get some extra life out of an older router. The first project uses the router's USB port to connect to third-party devices. The second project collects microcontroller and internal data, and the final project displays the data on the router's web page and on a Raspberry Pi.

Selecting a Router and Firmware

A number of open source firmware solutions can breathe new life into an old router. OpenWRT [1] and DD-WRT [2] are the most popular packages, but there are other options. You need to determine if one of these firmware packages supports your old router. Keep in mind that many older routers only have 4MB of flash and 32MB of RAM. These routers may not run or only marginally run OpenWRT or DD-WRT. We recommend that you choose a router with a minimum 8MB of flash and 32MB or more of RAM.

You also need to consider whether the router has USB support. A router without USB support can still be used as a web or application server, but it will be missing external hardware integration.

For our router project, we used OpenWRT because of our experience using the Arduino Yún modules.

Getting Started

Loading new router firmware will vary based on the make of your router. For this step, you'll need to check the manufacturer's directions and the router specifics from the OpenWRT or DD-WRT websites.

After the new firmware has been loaded, the router should be disconnected from your home LAN, and a PC needs to be wired to one of the router's LAN ports. The router will have a default IP address of 192.168.1.1, and the PC needs an IP address in the 192.168.1.x range (e.g., 192.168.1.10).

Once the router and PC are wired into their own small network, the router can be powered up, and the OpenWRT web interface (LuCI) can be used to configure the new router settings.

There are many possible router configurations. Most importantly, you must ensure that the repurposed router does not effect the main router on your home LAN. Typically, you'll want to disable routing features on the repurposed router before it is connected to the home LAN. In the OpenWRT web interface, software services such as the firewall, DNS (dnsmasq), and DHCP (odhcpd) also should be disabled (Figure 1).

Figure 1: Be sure to disable the firewall, dnsmasq, and odhcpd in the OpenWRT interface.

For our setup, we used a USB hub so that we could connect a variety of different devices (Figure 2).

Figure 2: Our router test setup includes a USB hub and web cam.

Software

Routers don't have a lot of memory, so the default firmware is fairly lean on extra features. Consequently, you will need to add software packages.

OpenWRT uses opkg [3], the OpenWRT package manager, to find and install software packages. After the router is connected to the Internet, software can be added either through the LuCI web interface (Figure 3) or manually in an SSH shell.

Figure 3: You can use the LuCI interface to find and install OpenWRT packages.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News