Difference between revisions of "Mesh/WalkThrough"

From Sudo Room
Jump to navigation Jump to search
m
(Adding link to home node info in mesh walkthrough)
Line 28: Line 28:
==Confirm Installation==
==Confirm Installation==
In order to confirm that the installation has proceeded correctly, use an ethernet cable to  connect your computer to the "internet/WAN" port of  your router and set your IP address to an address on the 172.22.0.0/24 subnet:
In order to confirm that the installation has proceeded correctly, use an ethernet cable to  connect your computer to the "internet/WAN" port of  your router and set your IP address to an address on the 172.22.0.0/24 subnet:
<code>$ ip addr add 172.22.0.9/24 dev IF_NAME</code>
<code>$ ip addr add 172.22.0.9/24 dev IF_NAME</code>
(where IF_NAME is the name of your ethernet interface)
(where IF_NAME is the name of your ethernet interface)
You ''may'' want to stop network-manager (not all distros use this, but Ubuntu does):
You ''may'' want to stop network-manager (not all distros use this, but Ubuntu does):
<code>$ /etc/init.d/network-manager stop</code>
<code>$ /etc/init.d/network-manager stop</code>


Line 43: Line 40:


You ''may'' need to restart the router, but be careful not to restart it while it's in the process of flashing.
You ''may'' need to restart the router, but be careful not to restart it while it's in the process of flashing.


=Configuring=
=Configuring=
Line 57: Line 55:


Then you need to install nodejs/npm packages:
Then you need to install nodejs/npm packages:
<code>$ cd makenode</code>
<code>$ cd makenode</code>
<code>$ npm install</code>
<code>$ npm install</code>
<code>$ cp settings.js.example settings.js</code>
<code>$ cp settings.js.example settings.js</code>
 
The default settings in `settings.js` should suffice in most cases, but if you need to make changes, do them there.  
The default settings in `settings.js` should suffice in most cases, but if you need to make changes, do them there.  


Line 79: Line 73:
* The max downstream and upstream bandwidth are the maximum amount of bandwidth you want to share on the "peoplesopen.net" network. They are measured in kbps (kilobits per second), so if you'd like to share 10mbps (megabits per second), enter 10000. 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.  
* The max downstream and upstream bandwidth are the maximum amount of bandwidth you want to share on the "peoplesopen.net" network. They are measured in kbps (kilobits per second), so if you'd like to share 10mbps (megabits per second), enter 10000. 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.  


==Step Five: Testing ==
==What now?==
 
If configuration proceeded correctly, you should see the 'peoplesopen.net' and 'pplsopen.net-node2node' wifi interfaces when running `sudo iwlist wlan0 scan` or when looking at available wifi networks.


You should see the 'peoplesopen.net' and 'pplsopen.net-node2node' wifi interfaces when running `sudo iwlist wlan0 scan` or when looking at available wifi networks.
It's recommended that you read the [[Home and extender nodes#Home_nodes|Home node info]] to find out more about the way that your new mesh node works.

Revision as of 12:19, 7 January 2016

This a walkthrough for flashing a node with the sudomesh firmware and then configuring it with makenode. At the end of the walkthrough, you'll be able to plug in your router and join the mesh. The walkthrough assumes you're using a linux-ish (OSX should mostly work) OS and that you have basic knowledge of the terminal. The basic idea of getting a node (router) on the mesh consists of flashing (copying files to flash memory) an operating system to the node and then using a software configurator finish setup .

To build an OpenWRT image from scratch, visit this How To: Mesh/Build An OpenWRT Image

Build Environment

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 :/

Installing OpenWRT

Supported Hardware

At the moment, we are supporting the following routers for home nodes:

Images

Sudomesh firmware images can be found here: https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/

Download the image according to your hardware. For example, if you have a Western Digital MyNet N600, download the image named: openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin, or use the links above

Flashing

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.

Confirm Installation

In order to confirm that the installation has proceeded correctly, use an ethernet cable to connect your computer to the "internet/WAN" port of your router and set your IP address to an address on the 172.22.0.0/24 subnet: $ ip addr add 172.22.0.9/24 dev IF_NAME (where IF_NAME is the name of your ethernet interface) You may want to stop network-manager (not all distros use this, but Ubuntu does): $ /etc/init.d/network-manager stop

You can also assign yourself the address via a network manager, both in linux and OSX.

$ ssh root@172.22.0.1

The default password will be: `meshtheplanet`

You may need to restart the router, but be careful not to restart it while it's in the process of flashing.


Configuring

These are the steps for configuring your newly flashed router. It will retrieve hardware information about the node, prompt you for a few config settings, and then query the meshnode database to get an available IP address and subnet.

Prerequisites

You'll need:

  • A newish version of nodejs and npm. Follow the recommended instructions at npmjs.com.
  • Git. In Debian based distros you can do: $ apt-get install git. For OSX you can probably use homebrew or your preferred package manager.

Setup

Download makenode. The easiest way to do this will likely be with git: $ git clone https://github.com/sudomesh/makenode.git

Then you need to install nodejs/npm packages: $ cd makenode $ npm install $ cp settings.js.example settings.js

The default settings in `settings.js` should suffice in most cases, but if you need to make changes, do them there.

If you'd like to add your ssh key to the router, 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.

Running

You should now be able to run makenode: $ ./makenode.js

Makenode will detect the hardware on the router and ask you to input some data about the node. Some notes:

  • Set the "txpower" to 20. This should be set in the code, but hasn't been just yet.
  • The password for the private ssid should be at least 8 characters or you will not be able to connect
  • For info on what constitutes a valid hostname, see: valid characters of a hostname
  • The max downstream and upstream bandwidth are the maximum amount of bandwidth you want to share on the "peoplesopen.net" network. They are measured in kbps (kilobits per second), so if you'd like to share 10mbps (megabits per second), enter 10000. You may want to run a speed test to find out how much bandwidth you have and determine how much you want to share.

What now?

If configuration proceeded correctly, you should see the 'peoplesopen.net' and 'pplsopen.net-node2node' wifi interfaces when running `sudo iwlist wlan0 scan` or when looking at available wifi networks.

It's recommended that you read the Home node info to find out more about the way that your new mesh node works.