Difference between revisions of "Mesh/WalkThrough"

10 bytes added ,  19:07, 16 April 2016
m
misc formatting
m (→‎Preparing Your Laptop: testing alternative preformatted text syntax)
m (misc formatting)
Line 4: Line 4:


Before you flash your router it is recommended that you read the [[Home and extender nodes#Home_nodes|Home node info]] to find out the router works as a mesh node.
Before you flash your router it is recommended that you read the [[Home and extender nodes#Home_nodes|Home node info]] to find out the router works as a mesh node.


= Preparing Your Laptop =  
= Preparing Your Laptop =  


The directions that follow assume you are runing a linux-ish distro (OSX should work). Many of the quoted commands listed below may need `sudo` prepended to them. For the moment, Windows users will have to figure out some of these steps on their own. Sorry :/
The directions that follow assume you are running a UNIX-like distribution (Linux or Mac OSX should work). Many of the quoted commands listed below may need `sudo` prepended to them. For the moment, Windows users will have to figure out some of these steps on their own. Sorry :/


If you are working with a fresh installation of Ubuntu linux, you will need to install a few pieces of software. Do install them, open your terminal and type the following:
If you are working with a fresh installation of Ubuntu Linux, you will need to install a few pieces of software. Do install them, open your terminal and type the following:


   sudo apt-get install nodejs
   sudo apt-get install nodejs
Line 17: Line 16:
   sudo apt-get install dropbear
   sudo apt-get install dropbear


=Install OpenWRT on your Router=
= Install OpenWRT on your Router =
 
== Download the Sudomesh OpenWRT Image File For a Supported Router ==


==Download the Sudomesh OpenWRT Image File For a Supported Router==
Sudomesh firmware images can be found at [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/ https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/]
Sudomesh firmware images can be found here:
[https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/ https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/]


At the moment, we are supporting the following routers for home nodes:
At the moment, we are supporting the following routers for home nodes:
Line 32: Line 31:
Download the image file for your supported router.
Download the image file for your supported router.


==Flash your Router with OpenWRT==
== Flash your Router with OpenWRT ==
There are different techniques for flashing each of the routers. Use the links above to the openwrt wiki and follow the instructions there to flash the router with the firmware you've downloaded.
There are different techniques for flashing each of the routers. Use the links above to the openwrt wiki and follow the instructions there to flash the router with the firmware you've downloaded.


For example, if you have a Western Digital MyNet N600, follow these instructions:<br>
For example, if you have a Western Digital MyNet N600, follow these instructions:
*Plug one end of the Ethernet cable into your laptop.<br>
 
*Plug the other end of the Ethernet cable into one of the normal ports on the router (not the Internet/WAN port).<br>
*Plug one end of the Ethernet cable into your laptop.
*With the router plugged in and power turned off, push a pin into the reset hole and hold it.<br>
*Plug the other end of the Ethernet cable into one of the normal ports on the router (not the Internet/WAN port).
*With the pin held down, turn on the router power button.<br>
*With the router plugged in and power turned off, push a pin into the reset hole and hold it.
*Watch the front blue light - they will flash on and off a few times.<br>
*With the pin held down, turn on the router power button.
*Once the front blue is flashing, you can let go of the pin.<br>
*Watch the front blue light - they will flash on and off a few times.
*Once the front blue is flashing, you can let go of the pin.


On your laptop (instructions for ubuntu) edit your network settings by doing the following:<br>
On your laptop (instructions for ubuntu) edit your network settings by doing the following:<br>
Line 67: Line 67:
Open your terminal in Linux and type:<br>
Open your terminal in Linux and type:<br>


<pre>
  git clone https://github.com/sudomesh/makenode.git
git clone https://github.com/sudomesh/makenode.git
  cd makenode
cd makenode
  npm install
npm install
  cp settings.js.example settings.js
cp settings.js.example settings.js
 
</pre>


The default settings in `settings.js` should suffice in most cases, but if you need to make changes, do them in 'settings.js'.  
The default settings in `settings.js` should suffice in most cases, but if you need to make changes, do them in 'settings.js'.  
Line 78: Line 77:
A freshly flashed node will be setup on 172.22.0.1, so you will need to configure your machine to use IP address 172.22.0.9 (subnet 255.255.255.0, gateway: 0.0.0.0). Once your network configuration is refreshed, use the following command to run the script and configure your node:
A freshly flashed node will be setup on 172.22.0.1, so you will need to configure your machine to use IP address 172.22.0.9 (subnet 255.255.255.0, gateway: 0.0.0.0). Once your network configuration is refreshed, use the following command to run the script and configure your node:


<code>./makenode.js</code>
  ./makenode.js


If you get the error "no such file or directory":<br>
If you get the error "no such file or directory", open a new terminal and run this command to ensure that `node` points to your NodeJS executable:
open a new terminal<br>


<code>sudo ln -s nodejs node</code>
  sudo ln -s nodejs node
(this will point node to nodejs)<br>
<code>npm install</code><br>
<code>./makenode.js</code>


In the new terminal, return to the 'makenode' source code directory and try again:
  npm install
  ./makenode.js
Now the configuration wizard will ask you a number of questions:


Now the configuration wizard will ask you a number of questions:<br>
*"enter valid hostname" - this is the host name when you SSH into the node - For info on what constitutes a valid hostname, see: [http://stackoverflow.com/questions/3523028/valid-characters-of-a-hostname valid characters of a hostname]
*"enter valid hostname" - this is the host name when you SSH into the node - For info on what constitutes a valid hostname, see: [http://stackoverflow.com/questions/3523028/valid-characters-of-a-hostname valid characters of a hostname]
*"max share upstream bandwidth" - how much of your home network upstream bandwidth you wish to share with the mesh network, measured in kbps (kilobits per second). So if you'd like to share 10mbps (megabits per second) enter "10000" or if you want to share 256kbps (kilobytes per second) enter "256". You may want to run a [http://www.dslreports.com/speedtest speed test] to find out how much bandwidth you have and determine how much you want to share.
*"max share upstream bandwidth" - how much of your home network upstream bandwidth you wish to share with the mesh network, measured in kbps (kilobits per second). So if you'd like to share 10mbps (megabits per second) enter "10000" or if you want to share 256kbps (kilobytes per second) enter "256". You may want to run a [http://www.dslreports.com/speedtest speed test] to find out how much bandwidth you have and determine how much you want to share.
Line 108: Line 108:
<code>sudo ip addr add 172.22.0.9/24 dev eth0</code>
<code>sudo ip addr add 172.22.0.9/24 dev eth0</code>


Then type:<br>
Then type:
<code>ssh root@172.22.0.1</code><br>
 
  ssh root@172.22.0.1
 
It will ask you for a password, which is "meshtheplanet"
It will ask you for a password, which is "meshtheplanet"


If you'd like to add your ssh key to the router (instead of using a root password), add it to the `configs/authorized_keys` file. You'll see that there are 3 other keys there for our developers. You can remove them if you'd like, but they're currently the only way we can provide remote support. During the alpha test phase we ask that you consider whether you are able to do diagnostics/debugging yourself before you remove them.
If you'd like to add your ssh key to the router (instead of using a root password), add it to the `configs/authorized_keys` file. You'll see that there are 3 other keys there for our developers. You can remove them if you'd like, but they're currently the only way we can provide remote support. During the alpha test phase we ask that you consider whether you are able to do diagnostics/debugging yourself before you remove them.


==Confirm that the Node is Running==
== Confirm that the Node is Running ==
 
Click on the network icon on the top right of the toolbar to see the avaiable wireless networks (or run <code>sudo iwlist wlan0 scan</code> in your linux terminal)
Click on the network icon on the top right of the toolbar to see the avaiable wireless networks (or run <code>sudo iwlist wlan0 scan</code> in your linux terminal)


If configuration proceeded correctly, you should see the 'peoplesopen.net' and 'pplsopen.net-node2node' wifi interfaces.
If configuration proceeded correctly, you should see the 'peoplesopen.net' and 'pplsopen.net-node2node' wifi interfaces.


= Flashing Extender Antennas =


=Flashing Extender Antennas=
This step is optional.
This step is optional.


==Download the Image File For a Extender Node==
== Download the Image File For a Extender Node ==
 
The extender nodes that we currently support are:
The extender nodes that we currently support are:
* [https://wiki.openwrt.org/toh/ubiquiti/nanostationm5 Ubiquiti Nanostation M5] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin firmware image]
* [https://wiki.openwrt.org/toh/ubiquiti/nanostationm5 Ubiquiti Nanostation M5] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin firmware image]
* [https://wiki.openwrt.org/toh/ubiquiti/nanostationm2 Ubiquiti Nanostation M2] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-om2p-squashfs-factory.bin firmware image]
* [https://wiki.openwrt.org/toh/ubiquiti/nanostationm2 Ubiquiti Nanostation M2] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-om2p-squashfs-factory.bin firmware image]
Line 137: Line 142:


*Configure your wired internet settings to use Manual IPv4 settings with IP: 192.168.1.10, subnet: 255.255.255.0, gateway: 0.0.0.0
*Configure your wired internet settings to use Manual IPv4 settings with IP: 192.168.1.10, subnet: 255.255.255.0, gateway: 0.0.0.0
*Plug one Ethernet cable into your laptop on one end and into the "LAN" port of the power-over-ethernet power supply on the other end.<br>
*Plug one Ethernet cable into your laptop on one end and into the "LAN" port of the power-over-ethernet power supply on the other end.
*Plug another Ethernet cable into your antenna on one end and into the "POE" port of the power-over-ethernet power supply on the other end.<br>
*Plug another Ethernet cable into your antenna on one end and into the "POE" port of the power-over-ethernet power supply on the other end.
*Push a pin into the reset hole and hold it.<br>
*Push a pin into the reset hole and hold it.
*With the pin held down, plug in the power to the power-over-ethernet power supply.<br>
*With the pin held down, plug in the power to the power-over-ethernet power supply.
*Watch the lights on the antenna - they will all flash together a few times, then they will flash up and down.<br>
*Watch the lights on the antenna - they will all flash together a few times, then they will flash up and down.
*Once the lights on the antenna are flashing up and down, you can let go of the pin.<br>
*Once the lights on the antenna are flashing up and down, you can let go of the pin.


You should be able to ping the extender at 192.168.1.20.
You should be able to ping the extender at 192.168.1.20.
<pre>
$ ping 192.168.1.20
PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data.
64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=1.54 ms
64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.826 ms
</pre>


In your linux terminal, type:<br>
  $ ping 192.168.1.20
<pre>
  PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data.
git clone https://github.com/sudomesh/ubi-flasher
  64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=1.54 ms
cd ubi-flasher
  64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.826 ms
npm install
 
./flasher.js '<path to firmware>'
In your Linux terminal, type:
</pre>
 
  git clone https://github.com/sudomesh/ubi-flasher
  cd ubi-flasher
  npm install
  ./flasher.js '<path to firmware>'
 
The terminal will tell you "The firmware has been successfully sent to the router. In a few seconds, the router should begin flashing its four status LEDs sweeping from left to right, then right to left (or up down, down up). This means that the router is flashing itself with the new firmware. Once the router goes back to having only the power LED lit, the router has been successfully flashed."


The terminal will tell you "The firmware has been successfully sent to the router. In a few seconds, the router should begin flashing its four status LEDs sweeping from left to right, then right to left (or up down, down up). This means that the router is flashing itself with the new firmware. Once the router goes back to having only the power LED lit, the router has been successfully flashed."<br>
Wait until the antenna has only the power LED lit and you're done.
Wait until the antenna has only the power LED lit and you're done.
128

edits