TP Link TL MR3020 as 6LoWPAN access point

borisneubert edited this page Dec 25, 2014 · 7 revisions

Introduction and Rationale

The TP-Link TL-MR3020 is a low-cost (approx. 27 EUR as of 2014-09-16) and energy-efficient (approx. 1 Watt) wireless access point that can be turned into a WiFi + 6LoWPAN router with a shiny web interface.

It is ideal to establish connectivity between your LAN and the Hexabus network. It is small and does not add significantly to your electricity bill.

Required hardware:

  • a TP-Link TL-MR3020
  • a Hexabus 6LoWPAN USB adapter

To make it work, the vendor firmware needs to be replaced by a custom firmware, and configured accordingly.

These notes assume that you are an experienced Linux user and thus you will get coarse directions instead of instructions on detail level.

Custom firmware

OpenWRT is a Linux distribution for embedded devices. It is particularly useful to use as an open source replacement for closed source vendor firmware of network routers for SOHO use.

The installation of OpenWRT on the TP-Link TL-MR3020 is described on the OpenWRT TP-Link TL-MR3020 website. As a first step you can download the OpenWRT BarrierBreaker Firmware (14.07-rc3 at the time of writing), install it on the router and play around with it a bit.

The drawback of the stock OpenWRT firmware is that it fills the flash memory of the router quite well and leaves no space to add all required additional packages for Hexabus. Due to the layout of the OpenWRT filesystems, removing packages from the stock firmware even reduces the free flash memory as opposed to naive expectation! We therefore need to build our own custom firmware images and include only the required minimum set of packages to run a IPv4/IPv6 LAN/WLAN router with LuCI web interface and the additional packages to make 6LoWPAN and Hexabus packet routing work.

In general, follow the generic instructions for building OpenWRT to build the firmware.

As newer versions of OpenWRT come available, you may want to adjust the procedures described herein accordingly.

Download the image builder tar ball for OpenWRT Barrier Breaker 14.07-rc3 and unpack it.

Build the firmware with

make image PROFILE=TLMR3020 PACKAGES="-ppp -ppp-mod-pppoe -odhcpd -odhcp6c -dnsmasq mrd6 radvd kmod-usb-net-cdc-ether kmod-usb2 kmod-usb-acm libdaemon radvdump luci luci-app-radvd ip"

The sources of some of the required packages are not included in the tar ball. If you get error messages about opkg not finding packages, manually download the package sources from the remote package source repository to your local packages directory of the source tree and re-issue the make command.

You end up with the openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin custom firmware image in the bin/ar71xx subdirectory of the source tree. Use the generic instructions on the OpenWRT TP-Link TL-MR3020 website to put that firmware image on your device.

Configuration

Please first follow the generic instructions for initial configuration of your router.

Then just follow the OpenWRT-specific instructions in this wiki for Setting up your Hexabus. You can use the LUCi web interface to do this.

The following screenshots show the configuration pages of the author's router.

Router Hostname: ap1

Router LAN IPv4: 192.168.31.128 (br-lan)

Router LAN IPv6: fd00::192.168.31.128/64 (br-lan)

Router HXB IPv6: fd01::1:192.168.31.128/64 (usb0)

Interfaces

Interface HXB

Interface HXB

Interface HXB

Interface HXB

Routes

Firewall

Radvd

There is pretty little to configure, actually. Nonetheless, the author needed some time to figure out, reboots were necessary and it was only on the day after after some waiting that the IPv6 network worked as intended. Maybe a case of PEBCAC?

Some useful commands for diagnosis:

ifconfig

ip -6 neigh

ip -6 route

ping6

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.