This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
content:meshextender:prototyping_on_mr3020 [10/10/2013 21:39] Paul Gardner-Stephen |
content:meshextender:prototyping_on_mr3020 [27/03/2017 13:55] Paul Gardner-Stephen [Hardware Assembly] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== TP-LINK MR3020 prototype ====== | ||
+ | |||
This prototype is heavily based on the previous [[prototyping_on_mp2|TPLINK 703N prototype]], | This prototype is heavily based on the previous [[prototyping_on_mp2|TPLINK 703N prototype]], | ||
- | Parts: | + | **Do not use the MR3020 for further prototypes. Instead use a GL-AR150, and see the [[content: |
+ | ====== | ||
+ | |||
+ | * [[http:// | ||
+ | * 32MB RAM | ||
+ | * 4MB FLASH | ||
+ | * serial port header | ||
+ | * USB port | ||
+ | * 802.11N Atheros 9k WiFi | ||
+ | * 400MHz MIPs processor | ||
+ | * [[http:// | ||
+ | * SanDisk Cruzer Fit(tm) tiny USB memory stick | ||
+ | |||
+ | ====== 3D Printable Case ====== | ||
+ | |||
+ | Thanks to Musti, we now have a 3D printable case for the Mesh Extender: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Here are the STL files for printing your own Mesh Extender case: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Images and related details for these cases: | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | ====== Hardware Assembly ====== | ||
+ | - Remove lid by following the instructions at http:// | ||
+ | - 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. | ||
+ | - Solder a 4-pin ribbon cable between the MR3020 PCB and RFD900 radio connecting 5v, GND, TX and RX lines appropriately. | ||
+ | |||
+ | ** NOTE: This pinout is wrong. There is no 5V on that header. You need to source it from elsewhere, and there is no really good place. This is one reason we stopped using the MR3020 for prototyping. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ** NOTE: This pinout is wrong. There is no 5V on that header. You need to source it from elsewhere, and there is no really good place. This is one reason we stopped using the MR3020 for prototyping. | ||
+ | |||
+ | ====== Firmware Installation (the new way) ====== | ||
+ | |||
+ | Perform the following steps on a Linux box, but first ... | ||
+ | |||
+ | ===== SYSADMIN GENERAL' | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ===== MR3020 Instructions ===== | ||
+ | |||
+ | - 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:// | ||
+ | </ | ||
+ | - 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 | ||
+ | $ ./ | ||
+ | </ | ||
+ | - 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 MR3020 should reboot as a fully functional Mesh Extender. | ||
+ | |||
+ | ===== Configuration===== | ||
+ | ==== SSH access ==== | ||
+ | First thing to make sure of is that the noroot | ||
+ | < | ||
+ | $ ssh root@192.168.2.1 | ||
+ | </ | ||
+ | If this works you should be greeted by a splash screen showing serval version and some other details.\ | ||
+ | |||
+ | From this you can check if the serval node is functioning properly by using | ||
+ | < | ||
+ | root@192.168.2.1 $ servald status | ||
+ | </ | ||
+ | this will return either a few lines saying the status and should contain a line saying whether it is running or it will return a message saying servald is not found. If the latter is what is displayed delete noroot and reboot the mesh node with | ||
+ | < | ||
+ | $ rm / | ||
+ | $ reboot | ||
+ | </ | ||
+ | The serval node should reboot and work once it has rebooted. | ||
+ | |||
+ | ====Changing name of the device==== | ||
+ | This is useful as it allows you to identify specific nodes if a few different ones are within range of each other rather than using sid or the phone number. | ||
+ | < | ||
+ | servald keyring set did `servald id self | tail -1` "Phone number" | ||
+ | </ | ||
+ | This line allows the user to set the phone number and the name of the device for easy identification. | ||
+ | |||
+ | ====Disabling noroot lockout==== | ||
+ | WARNING! THIS CAN ALLOW ANYONE ROOT ACCESS IF NECESSARY PRECAUTIONS AREN'T TAKEN WHICH MIGHT INCLUDE CHANGING THE ROOT PASSWORD. | ||
+ | |||
+ | ssh into the node using the above method. Once you have access use the following to navigate to the folder which contains the script that produces the noroot file.Then open the script in Vi | ||
+ | < | ||
+ | $ cd / | ||
+ | $vi dropbear | ||
+ | </ | ||
+ | |||
+ | Find the two lines in this script that are as follows | ||
+ | < | ||
+ | passwd -l root # lock | ||
+ | [ -e /dos/noroot ] && return 1 | ||
+ | </ | ||
+ | and comment them out by adding a # to the front as follows | ||
+ | < | ||
+ | # passwd -l root # lock | ||
+ | # [ -e /dos/noroot ] && return 1 | ||
+ | </ | ||
+ | |||
+ | Once this has been done you will have root access at all times without having to delete noroot However it is a good idea to change the root password after doing this to discourage unauthorized access. this is achieved by using | ||
+ | < | ||
+ | $ passwd | ||
+ | </ | ||
+ | ===== 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. | ||
+ | |||
+ | =====Troubleshooting==== | ||
+ | ====Sysupgrade not found==== | ||
+ | This means that the openwrt currently on the router cannot find the sysupgrade file | ||
+ | - Download the sysupgrade image for the router you are flashing from this list [[http:// | ||
+ | - navigate to the folder where the image is located | ||
+ | - use the following to get the image onto the routers RAM | ||
+ | < | ||
+ | $ scp openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp | ||
+ | </code | ||
+ | - ssh into the router then use the following command to flash the sysupgrade image | ||
+ | < | ||
+ | # sysupgrade -v / | ||
+ | sysupgrade.bin | ||
+ | </ | ||
+ | - Follow the serval instructions for your device to reflash serval to the device | ||
- | * TP-LINK MR3020 Router (32MB RAM, 4MB FLASH, serial port header, USB port, 802.11N Atheros 9k WiFi, 400MHz MIPs processor). | + | ====Cannot ssh into the device==== |
- | | + | There can be a few diffferent causes for this issue. |
- | | + | ===Telnet=== |
+ | This occurs when a root password hasn't been set on the device | ||
+ | | ||
+ | - set the root password | ||
+ | < | ||
+ | $ telnet 192.168.1.1 | ||
+ | # passwd | ||
+ | </ | ||
+ | | ||
- | Hardware Assembly: | + | ===Failsafe=== |
- | | + | |
- | | + | |
- | | + | |
- | | + | < |
- | | + | $ telnet 192.168.1.1 |
+ | </ | ||
+ | | ||
+ | < | ||
+ | # mount_root | ||
+ | </ | ||
+ | - set the passwd if you forgot your password | ||
+ | < | ||
+ | # passwd | ||
+ | </ | ||
+ | - Reset the router | ||
+ | < | ||
+ | # firstboot | ||
+ | </ | ||
+ | - Once this is done reboot | ||
+ | < | ||
+ | # reboot -f | ||
+ | </ | ||
- | {{:20131011_145936.jpg? | + | After this you will need to change your network settings back to dhcp to connect to the router through telnet/ |
+ | ====== Firmware Installation (the old way) ====== | ||
+ | - [[[building_on_openwrt|Build an OpenWRT firmware image]] | ||
+ | - Download mesh extender firmware installation tools from https:// | ||
+ | $ cd ~/src | ||
+ | $ git clone --quiet https:// | ||
+ | $ 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' | ||
+ | - Plug the MR3020 into the Ethernet jack on your workstation and activate the Ethernet port: | ||
+ | * the MR3020 is a DHCP server, so your workstation' | ||
+ | * 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 | ||
+ | $ ./ | ||
+ | ... | ||
+ | $ | ||
+ | </ | ||
+ | - Wait for the MR3020 to reboot, then:< | ||
+ | $ ./ | ||
+ | ... | ||
+ | $ | ||
+ | </ | ||
+ | - Wait for the MR3020 to reboot again, then:< | ||
+ | $ ./ | ||
+ | ... | ||
+ | $ | ||
+ | </ | ||
+ | - 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 / | ||
- | Software Installation: | + | You should now have a working |
- | * Download mesh extender software installation tools from http:// | + | |
- | * 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' | + | |
- | * Plug virgin MR3020 into ethernet jack on computer. | + | |
- | * cd mr3020 | + | |
- | * ./ | + | |
- | * Wait for router to reboot | + | |
- | * ./ | + | |
- | * Wait for router to reboot | + | |
- | * ./ | + | |
- | * Wait for router to reboot | + | |
- | * 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 / | + | |
- | * You should now have a working | + | |
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. | 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. | ||