This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
content:meshextender:prototyping_on_mp2 [15/02/2013 12:41] Paul Gardner-Stephen [/etc/config/network] |
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:// | The TL-WR703N is well supported by OpenWRT: http:// | ||
+ | |||
+ | =====Installing Serval on the WR703N===== | ||
+ | - Make sure you have git, csh and expect installed | ||
+ | Depending on your Linux distribution, | ||
+ | < | ||
+ | $ sudo yum install csh expect git | ||
+ | </ | ||
+ | Alternatively you may need to use | ||
+ | < | ||
+ | $ sudo apt-get install csh expect git | ||
+ | </ | ||
+ | - Download the Mesh Extender Builder software. | ||
+ | < | ||
+ | $ git clone --quiet https:// | ||
+ | </ | ||
+ | - Allow Edits to the files in the folder | ||
+ | < | ||
+ | $ chmod 777 703n-builder | ||
+ | $ cd 703n-builder | ||
+ | </ | ||
+ | - Edit the files that get the openwrt images to get the right images.(make_image, | ||
+ | make_image | ||
+ | < | ||
+ | # 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:// | ||
+ | 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 " | ||
+ | |||
+ | # Copy build image to here, and show the user | ||
+ | cp bin/ | ||
+ | cd .. | ||
+ | |||
+ | echo "Mesh Extender firmware image built:" | ||
+ | ls -l openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin | ||
+ | </ | ||
+ | gather-image-files | ||
+ | - change line 71 as follows | ||
+ | < | ||
+ | cp ../ | ||
+ | </ | ||
+ | flash-virgin-mr3020 | ||
+ | - Change line 12 as follows | ||
+ | < | ||
+ | firmware=openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin | ||
+ | </ | ||
+ | - 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). | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | - Build the serval.up file | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | - Insert the USB memory stick into the installation computer, noting its device name(can be found by typing " | ||
+ | < | ||
+ | $ umount / | ||
+ | $ ./ | ||
+ | </ | ||
+ | - 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! | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | - 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: | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | You may need to specify the IP address on the command line if the script doesn' | ||
+ | - If the MR3020 already has OpenWRT, flash it this way. (You might need to boot the Mesh Extender into fail-safe mode first.) | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | You may need to specify the IP address on the command line if the script doesn' | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | |||
+ | The WR703N should reboot as a fully functional Mesh Extender. | ||
===== Installing base OpenWRT on the WR703N ===== | ===== Installing base OpenWRT on the WR703N ===== | ||
Line 204: | Line 292: | ||
</ | </ | ||
- | ==== /etc/rc.d/S41servald | + | ==== /etc/rc.d/S94servald |
Don't forget to chmod 755 this file once you have installed it | Don't forget to chmod 755 this file once you have installed it | ||
Line 218: | Line 306: | ||
export SERVALINSTANCE_PATH=/ | export SERVALINSTANCE_PATH=/ | ||
mkdir -p $SERVALINSTANCE_PATH | mkdir -p $SERVALINSTANCE_PATH | ||
- | | + | |
} | } | ||
Line 227: | Line 315: | ||
</ | </ | ||
+ | ==== / | ||
+ | |||
+ | Don't forget to chmod 755 this and the other scripts. | ||
+ | |||
+ | < | ||
+ | #!/bin/sh | ||
+ | while [ 1 ] | ||
+ | do | ||
+ | / | ||
+ | done | ||
+ | </ | ||
==== / | ==== / | ||
+ | |||
+ | The small MDP block size is necessary due to the high bit error rate on the radios, and the suboptimal scheduling of rhizome mdp packets (including the lack of supression of duplicate requests). | ||
+ | |||
+ | The small max_internal_blob_size is to get around the VERY slow performance of sqlite on the USB memory on the WR703N, which could take several minutes to prepare an empty blob, before even beginning to put any data into it. | ||
+ | |||
+ | The long timeout (30seconds) is so that we don't easily drop transfers, especially while the previously mentioned problems persist. | ||
< | < | ||
- | rhizome.datastore_path=/ | ||
- | interfaces.1.type=catear | ||
- | interfaces.1.file=/ | ||
interfaces.1.encapsulation=single | interfaces.1.encapsulation=single | ||
+ | interfaces.1.file=/ | ||
interfaces.1.socket_type=stream | interfaces.1.socket_type=stream | ||
- | interfaces.2.match=eth0 | + | interfaces.1.type=catear |
+ | interfaces.2.match=eth0 | ||
interfaces.2.type=ethernet | interfaces.2.type=ethernet | ||
- | interfaces.3.type=wifi | + | interfaces.3.match=wlan0 |
- | interfaces.3.match=wlan0 | + | interfaces.3.type=wifi |
- | interfaces.4.type=wifi | + | |
interfaces.4.match=wlan0-1 | interfaces.4.match=wlan0-1 | ||
+ | interfaces.4.type=wifi | ||
+ | rhizome.datastore_path=/ | ||
+ | rhizome.idle_timeout=30000 | ||
+ | rhizome.rhizome_mdp_block_size=100 | ||
+ | rhizome.max_internal_blob_size=16384 | ||
</ | </ | ||
==== / | ==== / | ||
Line 360: | Line 468: | ||
====== Configuring RFD900 Radios for use ====== | ====== Configuring RFD900 Radios for use ====== | ||
- | Connect as described above and set air speed to 250kbit, and serial speed to 57600, and TX power to +24dBm with a command sequence like: | + | Connect as described above and set air speed to 128kbit, and serial speed to 57600, and TX power to +24dBm with a command sequence like: |
< | < | ||
ATS1=57 | ATS1=57 | ||
- | ATS2=250 | + | ATS2=128 |
ATS4=24 | ATS4=24 | ||
ATI5 | ATI5 | ||
Line 370: | Line 478: | ||
</ | </ | ||
- | (We could use 115200, but that would require a recompile of servald, which currently assumes radios at 57600, and the gain would be small, because | + | We could use 115200 |
+ | |||
+ | 128kbit is the fastest effective radio speed until we get some better forward error correction. |