Can’t wait for the Raspberry Pi? Hack a router!

My Raspberry Pi delivery date is now only two ice ages away! Until the mighty Pi ships, where can you get a cheap embedded Linux fix? Please welcome the catchily named TP-Link TL-WR703N!

So what is it? For about £20 you can get a teeny embedded Linux device (in a nice little enclosure) with built in 10/100 ethernet, 802.11bgn wifi and USB. Not bad for the same price as an Arduino! The device is intended to be used as a “travel router”, you’re supposed to shove a 3G dongle in the USB socket and then use it as a personal hotspot. It’d probably be handy to have one for that purpose, but that wouldn’t be very hacky would it?

I bought one of these after Stephen Giles recommended it on the Hacklab discuss mailing list, turns out a few other members and Hacklab regulars have too. This device looks to be pretty popular with hackers, so you can expect to see it turn up in projects online (and probably in the lab too…).

Why so popular with hackers? Well, despite shipping with a Chinese web interface, it’s a doddle to flash it with OpenWRT, a lightweight Linux distro designed for routers and other low-spec embedded devices. Following these instructions on the OpenWRT site I was up and running in a few minutes. A few minutes later I was installing some packages and half an hour after that I had it configured as a client on my wifi network.

So what can be done with it? With OpenWRT installed, you can use it as nature intended and do some routing, making a nice small router/WAP. Or you can install packages to enable it to be a file server, using a USB flash disk or hard disk to make a tiny NAS box. Or you could attach a USB printer and make it a print server. Or you could plug in a cheap webcam and stream video. Or, and this is where it gets interesting, you could hook up something to the device’s onboard serial port (some soldering required…) and internetify an LCD, or a temperature sensor, or an anything really. After the flashing LED, the UART is the embedded hacker’s best friend!

Sold yet? You can buy them from eBay for <£20 shipped to the UK from China. They come with a US power supply but can be powered via micro USB.

I’m not sure what I’m going to do with mine yet, any ideas?

10 thoughts on “Can’t wait for the Raspberry Pi? Hack a router!

  • HAK5 Pineapple on the cheap!
    Thanks for highlighting this device; I’m definately going to get a few.
    The only difference between this and the Pi is the HDMI or composite output; I was hoping to make a uPnP client display with something like a Pi and have all the noisy NAS gubbins elsewhere. Any ideas on devices available for this?

    Many thanks
    Keith

    • Hi Keith

      There doesn’t seem to be anything with HDMI (and enough grunt to drive it) around that’s anywhere near the price of a Pi, I guess we’ll have to wait for that one!

      Let us know how you get on with the TP-Link.

      Cheers,
      Al

  • Thanks for the plug 🙂
    arn’t they good for the money! I managed to map 4 GPIO lines comming off the CPU that could be used. The only problem is that they are ultra difficult to get a wire soldered onto. And i mean ultra difficult. The CPU has it’s pads under the package outline. More like a BGA than a QFP so a grind off of the package may be requied.
    I gave up after i figured this out.

    To get external IO it’s much easier to use a CP2102 USB serial interface, again from ebay.
    Then load the CP2102 module into openwrt. You then have an additional serial port. Connect a low cost PIC or AVR for your IO lines, or what ever you need.

    you can also install a persistent console port using the CP2102 . Remove the pin headers, and the USB connector from the CP2102 board. Then hardwire the module into the 703n serial pins (Rx & Tx), and the USB pins onto the microUSB connector using thin connection wires.
    This way you have a serial console into openwrt every time you plug it it to a PC with a microusb cable. A nice recovery feature.

  • I think I’ve done something daft that’s messed up the TP-Link.
    I was following the instructions to get the internet link up http://wiki.openwrt.org/doc/howto/internet.connection but the TP-link won’t talk to me any more.
    I’ve got the box linked direct to my netbook ethnet port and usb for power; doing this means the netbook wireless doesn’t operate anymore.
    So from the fresh install I tried to alter the routing table to add my router as the gateway;
    uci set network.lan.gateway=192.168.1.254
    uci set network.lan.hostname=TP-LINK
    uci commit
    /etc/init.d/network restart

    And now the box doesn’t respond when I ssh either through wire or wireless.
    Any suggestions on how I can get back into the box? Not sure if connecting it into the router would work; I have another netswitch that I might be able to assign a new ip and get in that way.

    TIA
    Keith

  • Keith,
    try powering it down, plug it in to ethernet and power again, and as soon as the LED starts flashing, hit the reset button. You _should_ be able to telnet into it on 192.168.1.1 via ethernet. There is quite a bit of info on “bricked” 703s on the openwrt site (forums in particular. You might want to have a cup of tea between the reset push (when it starts flashing frantically) and telnetting: I have yet to have this work successfully. But then even fully functional, it takes some time for the unit to respond to a ssh login. If that fails you need to access the serial interface.

    • Hi Neil. I haven’t tried webcam streaming yet, but it’s on my todo list. I’ve seen some streaming somewhere (I can’t find the link now…) so it should definitely be possible!

  • Just wondering if anyone has found a tiny linux distro that works on this? I don’t need it as a router, I only need it as a tiny logging device and need it to have dhcp IP client to pick up an IP via Ethernet or wireless.

    Can’t seem to find anything however.

  • Hi Al, I came across this post and I was wondering if it would work with the following :

    i m trying to set up a standalone time lapse camera unit with :

    a gopro camera that takes a picture (5MB) every 10 minutes

    a wireless 4G wi fi router

    (and this what I wonder about)

    a raspberry pi plugged into the gopro via the USB to receive the picture and send it online so I can remotely access the pictures.

    The time lapse unit would be in London or Belfast I am in Edinburgh

    The unit would be solar powered to make in entirely autonomous

    Could you advice me if I m on the right track and if such a raspberry pi set up is what you had designed?

    I had found this online, but I don’t 100% understand the pi programming.
    Would you be interested in this job, it s for several units for construction time lapse movies.

    Thanks very much for your time

    http://thomaschung.org/posts/2014/01/09/a-raspberry-pi-security-camera-with-auto-dropbox-uploads/

Leave a Reply to Rob Cancel reply

Your email address will not be published. Required fields are marked *

+ 46 = 56