User Tools

Site Tools


content:meshextender:prototyping_on_mp2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
content:meshextender:prototyping_on_mp2 [17/02/2013 17:44]
Paul Gardner-Stephen [/etc/rc.d/S41servald]
content:meshextender:prototyping_on_mp2 [14/07/2015 00:38]
Nathan Fowler
Line 12: Line 12:
  
 The TL-WR703N is well supported by OpenWRT: http://wiki.openwrt.org/toh/tp-link/tl-wr703n The TL-WR703N is well supported by OpenWRT: http://wiki.openwrt.org/toh/tp-link/tl-wr703n
 +
 +=====Installing Serval on the WR703N=====
 + - Make sure you have git, csh and expect installed
 +Depending on your Linux distribution, something like the following should suffice:
 +<code>
 +$ sudo yum install csh expect git
 +</code>
 +Alternatively you may need to use
 +<code>
 +$ sudo apt-get install csh expect git
 +</code>
 +  - Download the Mesh Extender Builder software.
 +<code>
 +$ git clone --quiet https://github.com/servalproject/mesh-extender-builder.git 703n-builder
 +</code>
 +  - Allow Edits to the files in the folder
 +<code>
 +$ chmod 777 703n-builder
 +$ cd 703n-builder
 +</code>
 +  - Edit the files that get the openwrt images to get the right images.(make_image, gather-image-files, and flash-virgin-mr3020)
 +make_image
 +<code>
 +# Download and unpack OpenWRT 12.09 image builder (if required).
 +if [ ! -e OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 ]; then
 +   if [ ! -e OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2 ]; then
 +      wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
 +   fi;
 +   tar jxvf OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
 +fi;
 +
 +# Build image with all the right packages, and the extra configuration files we need.
 +cd OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486
 +make image PROFILE=TLWR703 "PACKAGES=kmod-lib-crc16 kmod-scsi-core kmod-usb-storage-extras kmod-usb-storage libuuid libblkid libcom_err libpthread libext2fs e2fsprogs kmod-nls-cp437 fdisk kmod-fs-ext4 kmod-fs-vfat kmod-nls-iso8859-1 librt terminfo dosfsck uhttpd lua" FILES=../image-files
 +
 +# Copy build image to here, and show the user
 +cp bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin ..
 +cd ..
 +
 +echo "Mesh Extender firmware image built:"
 +ls -l openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin
 +</code>
 +gather-image-files
 +  - change line 71 as follows
 +<code>
 +cp ../openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin .
 +</code>
 +flash-virgin-mr3020
 +  - Change line 12 as follows
 +<code>
 +firmware=openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin
 +</code> 
 +- 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).
 +<code>
 +$ ./make_image
 +</code>
 +  - Build the serval.up file
 +<code>
 +$ ./gather-image-files
 +</code>
 +  - Insert the USB memory stick into the installation computer, noting its device name(can be found by typing "df" into the console), then unmount all the device partitions, 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!
 +<code>
 +$ umount /dev/deviceid
 +$ ./partition-memory-stick.sh deviceid
 +</code>
 +  - Remove and reinsert the USB memory stick so that the kernel notices the new partition table.
 +  - Unmount the USB partitons again
 +  - 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!
 +<code>
 +$ ./populate-memory-stick deviceid
 +</code>
 +  - 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:
 +<code>
 +$ ./flash-virgin-mr3020
 +</code>
 +You may need to specify the IP address on the command line if the script doesn't auto-detect the IP address. The most likely address is 192.168.0.254
 +  - If the MR3020 already has OpenWRT, flash it this way.  (You might need to boot the Mesh Extender into fail-safe mode first.)
 +<code>
 +$ ./reflash-mesh-extender
 +</code>
 +You may need to specify the IP address on the command line if the script doesn't auto-detect the IP address. The most likely address is 192.168.1.1 or 192.168.2.1, e.g.:
 +<code>
 +$ ./reflash-mesh-extender 192.168.2.1
 +</code>
 +
 +The WR703N should reboot as a fully functional Mesh Extender.
  
 ===== Installing base OpenWRT on the WR703N ===== ===== Installing base OpenWRT on the WR703N =====
Line 227: Line 315:
 </file> </file>
  
 +==== /serval/runservald ====
 +
 +Don't forget to chmod 755 this and the other scripts.
 +
 +<file>
 +#!/bin/sh
 +while [ 1 ]
 +do
 +/serval/servald start foreground
 +done
 +</file>
 ==== /etc/serval/servald.conf ==== ==== /etc/serval/servald.conf ====
  
content/meshextender/prototyping_on_mp2.txt · Last modified: 14/07/2015 01:01 by Nathan Fowler