This is an old revision of the document!
TP-LINK MR3020 prototype
This prototype is heavily based on the previous TPLINK 703N prototype, but avoids the need for a USB to serial adapter and USB hub.
Parts
3D Printable Case
Hardware Assembly
-
Remove the PCB
Drill two holes on the top edge of the case to accomodate the RFD900 radio (6.5mm holes 20mm apart, centred approximately 9mm in from the top edge and the first hole starting approximately 20mm in from the left edge. I will supply a photo that makes this clearer).
If you have obtained a normal RFD900, desolder the 16pin header. Ask RFDesign if they can supply it without the header installed in the first place, as it saves a bit of effort. They may or may not be able to depending on where they are in their manufacturing cycle, but the more people ask, the more they are likely to stock them this way.
Solder a 4-pin ribbon cable between the MR3020 PCB and RFD900 radio connecting 5v, GND, TX and RX lines appropriately. See photo for pictorial explanation.
Firmware Installation (the new way)
Perform the following steps on a Linux box, but first …
SYSADMIN GENERAL'S WARNING
Because of the inherent risk of human error when instructing the scripts to format and repartition memory sticks, we recommend that you use an old laptop or similar, and dedicate it to this process, so that you do not endanger your data.
Instructions
Download the Mesh Extender Builder software
$ git clone --quiet https://github.com/servalproject/mesh-extender-builder.git
Build the OpenWRT image (this will download a lot of stuff the first time you run it, but you can re-run it quickly there after if you change something).
$ cd mesh-extender-builder
$ ./make_image
Build the serval.up file
$ ./gather-image-files
Insert the USB memory stick into the installation computer, noting its device name, then partition it using the following script, replacing deviceid with the Linux disk device, e.g., sdf. MAKE SURE YOU GIVE IT THE RIGHT DEVICE OR IT MIGHT TRY TO REPARTITION YOUR HARD DRIVE!
$ ./partition-memory-stick.sh deviceid
Remove and reinsert the USB memory stick so that the kernel notices the new partition table.
Populate the USB memory stick, again replacing deviceid with the right device, e.g., sdf. MAKE SURE YOU GIVE IT THE RIGHT DEVICE OR IT MIGHT ERASE THE PARTITIONS ON YOUR HARD DRIVE!
$ ./populate-memory-stick deviceid
Unplug the USB memory stick and insert it into the MR3020 that is to become a mesh extender.
Power up the MR3020, and connect it via ethernet to the installation machine, and wait a couple of minutes for it to boot up.
If the MR3020 is still running the stock firmware, flash it this way:
$ ./flash-virgin-mr3020
If the MR3020 already has OpenWRT, flash it this way. (You might need to boot the Mesh Extender into fail-safe mode first.)
$ ./reflash-mesh-extender
The MR3020 should reboot as a fully functional Mesh Extender.
Enabling SSH on a Mesh Extender
Remember if you wish to ssh to the Mesh Extender to power it down, remove the USB memory stick and insert it into any computer, and delete the NOROOT file from the FAT file system partition, and reinsert it into the Mesh Extender. ssh as root with password root will now be available until next reboot.
Firmware Installation (the old way)
-
Download mesh extender firmware installation tools from
https://github.com/gardners/mesh-extender (once only):
$ cd ~/src
$ git clone --quiet https://github.com/servalproject/mesh-extender.git
$ cd mesh-extender
$ ls -a
. .. .git mr3020
$
Partition the USB memory stick in any computer to have exactly three partitions of any size (this is to work around a bug when running fdisk on OpenWRT and creating partitions, where it doesn't create the /dev/ entries until after reinsert or reboot).
Plug the MR3020 into the Ethernet jack on your workstation and activate the Ethernet port:
the MR3020 is a DHCP server, so your workstation's Ethernet port must be configured to obtain an IP using DHCP
if the MR3020 assigns your workstation an IP in the subnet 192.168.1, then this is a virgin install (the TP-LINK MR3020 is still running its factory firmware)
if the MR3020 assigns your workstation an IP in the subnet 192.168.2, then the Mesh Extender firmware has already been installed
Continuing in the same command line as above:
$ cd mr3020
$ ./0.install-openwrt
...
$
Wait for the MR3020 to reboot, then:
$ ./1.upgrade_openwrt 192.168.1.1
...
$
Wait for the MR3020 to reboot again, then:
$ ./2.install_mesh_extender 192.168.1.1
...
$
Wait for router to reboot for a third time
Kill the runservald process and run servald stop to stop all servald processes.
Run export TERM=xterm ; minicom -s and use minicom to configure to use /dev/ttyATH0 @ 57600, no hardware or software flow-control. Then use +++ to connect to radio and make sure it is happy. Adjust channels, frequencies, bit rates as required. More on this later. Required once only. We also hope to make this step redundant by making servald do this.
You should now have a working Mesh Extender.
We intend to refine and simplify this process further to make it easier for you to build your own mesh extenders. Of course you will need a pair to use them productively.