User Tools

Site Tools


content:meshextender:prototyping_on_mr3020

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
content:meshextender:prototyping_on_mr3020 [10/09/2014 22:56]
Paul Gardner-Stephen [Firmware Installation]
content:meshextender:prototyping_on_mr3020 [27/03/2017 13:55]
Paul Gardner-Stephen [Hardware Assembly]
Line 3: Line 3:
 This prototype is heavily based on the previous [[prototyping_on_mp2|TPLINK 703N prototype]], but avoids the need for a USB to serial adapter and USB hub. This prototype is heavily based on the previous [[prototyping_on_mp2|TPLINK 703N prototype]], but avoids the need for a USB to serial adapter and USB hub.
  
 +**Do not use the MR3020 for further prototypes. Instead use a GL-AR150, and see the [[content:meshextender:2ng|Mesh Extender 2 prototyping]] page.**
 ====== Parts ====== ====== Parts ======
  
Line 37: Line 38:
   - 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.   - 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.    - 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. 
 +
 +** 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.  If you feed the RFD900 with 3.3v it will seem to work, but your range will be only 1/20th of what it should be. **
  
 {{:20131011_145936.jpg?1024|}} {{:20131011_145936.jpg?1024|}}
 +
 +** 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.  If you feed the RFD900 with 3.3v it will seem to work, but your range will be only 1/20th of what it should be. **
  
 ====== Firmware Installation (the new way) ====== ====== Firmware Installation (the new way) ======
Line 48: Line 53:
 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. 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 =====+===== MR3020 Instructions =====
  
 +  - 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   - Download the Mesh Extender Builder software
 <code> <code>
Line 63: Line 77:
 $ ./gather-image-files $ ./gather-image-files
 </code> </code>
-  - 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!+  - 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> <code>
 +$ umount /dev/deviceid
 $ ./partition-memory-stick.sh deviceid $ ./partition-memory-stick.sh deviceid
 </code> </code>
   - Remove and reinsert the USB memory stick so that the kernel notices the new partition table.   - 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!   - 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> <code>
Line 78: Line 94:
 $ ./flash-virgin-mr3020 $ ./flash-virgin-mr3020
 </code> </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.)   - If the MR3020 already has OpenWRT, flash it this way.  (You might need to boot the Mesh Extender into fail-safe mode first.)
 <code> <code>
 $ ./reflash-mesh-extender $ ./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> </code>
  
 The MR3020 should reboot as a fully functional Mesh Extender.   The MR3020 should reboot as a fully functional Mesh Extender.  
  
 +===== Configuration=====
 +==== SSH access ====
 +First thing to make sure of is that the noroot  file has been deleted on the USB stick. Once this has been done use
 +<code>
 +$ ssh root@192.168.2.1
 +</code>
 + 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
 +<code>
 +root@192.168.2.1 $ servald status
 +</code>
 +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
 +<code>
 +$ rm /dos/noroot
 +$ reboot
 +</code>
 +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.
 +<code>
 +servald keyring set did `servald id self | tail -1` "Phone number" "Name"
 +</code>
 +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
 +<code> 
 +$ cd /etc/init.d
 +$vi dropbear
 +</code>
 +
 +Find the two lines in this script that are as follows
 +<code>
 +passwd -l root # lock
 +[ -e /dos/noroot ] && return 1
 +</code>
 +and comment them out by adding a # to the front as follows
 +<code>
 +# passwd -l root # lock
 +# [ -e /dos/noroot ] && return 1
 +</code>
 +
 +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
 +<code>
 +$ passwd
 +</code>
 ===== Enabling SSH on a 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. 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.
  
 +=====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://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/]]
 +  - navigate to the folder where the image is located
 +  - use the following to get the image onto the routers RAM
 +<code>
 +$ 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
 +<code>
 +# sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-
 +sysupgrade.bin 
 +</code>
 +  - Follow the serval instructions for your device to reflash serval to the device
 +
 +====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
 +  - Telnet into the device
 +  - set the root password
 +<code>
 +$ telnet 192.168.1.1
 +# passwd
 +</code>
 +  - after this reboot the device and check if the ssh is working if not try the failsafe route
 +
 +===Failsafe===
 +  - change your computer from DHCP to static ip with an address of 192.168.1.2 and subnet 255.255.255.0
 +  - boot your router into failsafe mode e.g. TP-Link models can be booted into failsafe by holding the reset button once the light starts blinking on boot
 +  - telnet into the router
 +<code>
 +$ telnet 192.168.1.1
 +</code>
 +  - mount the JFSS2 partition to allow you to edit the password or other files that could be causing the issues with
 +<code>
 +# mount_root
 +</code>
 +  - set the passwd if you forgot your password 
 +<code>
 +# passwd
 +</code>
 +  - Reset the router to stock openwrt if issue is not password related by using
 +<code>
 +# firstboot
 +</code>
 +  - Once this is done reboot the router into normal mode using
 +<code>
 +# reboot -f
 +</code>
 +
 +After this you will need to change your network settings back to dhcp to connect to the router through telnet/ssh
 ====== Firmware Installation (the old way) ====== ====== Firmware Installation (the old way) ======
   - [[[building_on_openwrt|Build an OpenWRT firmware image]]   - [[[building_on_openwrt|Build an OpenWRT firmware image]]
content/meshextender/prototyping_on_mr3020.txt · Last modified: 27/03/2017 13:55 by Paul Gardner-Stephen