Difference between revisions of "Mesh/WalkThrough"

Jump to navigation Jump to search
1,953 bytes added ,  00:18, 14 November 2019
(replace latest link with link to working 0.3.0 image)
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
Congratulations on choosing to become part of a People's Open Network! This is a walkthrough for flashing a node (a home router) with Sudo Mesh's sudowrt-firmware (a custom build of OpenWRT) and then configuring it with makenode (a custom javascript tool developed by Sudo Mesh). 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 OS (mac OSX should work also) and that you have [https://help.ubuntu.com/community/UsingTheTerminal basic knowledge of the terminal]. The general idea of building your own mesh node consists of three steps, [[#Download/Build|downloading or compiling]] custom firmware, [[#Flash/Upload|flashing that firmware]] to the node (i.e. copying firmware to [https://en.wikipedia.org/wiki/Flash_memory flash memory]), and [[#makenode/Configure|configuring the node]] to function as part of a mesh (with a software tool such as makenode).
'''Congratulations''' on choosing to become part of the [https://peoplesopen.net/ People's Open Network]!


Before you flash your router, it is recommended that you read the [[Home and extender nodes#Home_nodes|home node info]] to ensure your router works as a mesh node.
Continue reading to follow these do-it-yourself / do-it-together instructions, or read more about [[Mesh#How_To_Participate|how to participate and get help]].
 
= Summary =
This is a [[Mesh/WalkThrough#linkback|WalkThrough]] to install a custom operating system on a compatible network device for use as a '''node''' (e.g. your home router) on the network. You will learn how to flash Sudo Mesh's [https://github.com/sudomesh/sudowrt-firmware sudowrt-firmware] (a custom build of [https://openwrt.org/ OpenWRT]) and then configure it.
 
At the end of this walkthrough, you'll be able to plug in your router and join the mesh. '''Note:''' In order to access the internet, you will likely need your own connection with an existing Internet Service Provider (ISP), or otherwise be located near [https://peoplesopen.net/map/ another mesh node with its own route to the internet].
 
= Prerequisites =
 
This walkthrough assumes you're using linux or another unix-like operating system (such as Mac OS X, Ubuntu, FreeBSD, etc) and that you have [https://help.ubuntu.com/community/UsingTheTerminal basic knowledge of the command-line interface terminal] ('terminal' for short). [https://github.com/sudomesh/sudowrt-firmware/issues/new Contact us] if you can contribute instructions for other systems.
 
The general idea of building your own mesh node consists of three steps:
# [[#Download/Build|downloading or compiling]] the custom firmware
# [[#Flash/Upload|flashing that firmware]] to the node (i.e. copying firmware to [https://en.wikipedia.org/wiki/Flash_memory '''flash''' memory])
# [[#Configure|configuring the node]] to function as part of a mesh.
 
Before you flash your router, it is recommended that you read the [[Home and extender nodes#Home_nodes|home node info]] to ensure your router is compatible to work as a mesh node.


= Download/Build =
= Download/Build =


Now that you have a node, you will probably want to learn how to flash it with the latest sudowrt-firmware. The first step is to download the firmware image file for your supported router.  
Now that you have a node, you canflash it with the latest sudowrt-firmware. The first step is to download the firmware image file for your supported router. At the moment, we are supporting the following firmware builds:
 
At the moment, we are supporting the following routers:


{| class="wikitable"
{| class="wikitable"
Line 41: Line 55:
Alternatively, you can build your own copy of the firmware images by following the guide in the [https://github.com/sudomesh/sudowrt-firmware sudowrt-firmware source].
Alternatively, you can build your own copy of the firmware images by following the guide in the [https://github.com/sudomesh/sudowrt-firmware sudowrt-firmware source].


If you do not want to use Sudo Mesh's OpenWRT image, you can also install [https://downloads.openwrt.org/ a standard OpenWRT] release and configure it from scratch.
If you do not want to use Sudo Mesh's OpenWRT image, you can also install [https://downloads.openwrt.org/ a standard OpenWRT] release and configure it from scratch, ([https://github.com/sudomesh/sudowrt-firmware read more on github]).


= Flash/Upload =
= Flash/Upload =
Line 54: Line 68:
* Plug one end of the Ethernet cable into your laptop.
* Plug one end of the Ethernet cable into your laptop.
* Plug the other end of the Ethernet cable into one of the normal ports (LAN) on the router (not the Internet/WAN port).
* Plug the other end of the Ethernet cable into one of the normal ports (LAN) on the router (not the Internet/WAN port).
* With the router plugged in and power turned off, push a pin / paperclip / tiny screwdriver into the reset hole and hold it for at least 15 seconds.
* With the router plugged in and power turned off, push a pin / paperclip / tiny screwdriver into the reset hole and hold it for at least 15 seconds. Keep another hand free.  
* With the pin held down, turn on the router power button.
* With the pin still held down, turn on the router power button.
* Watch the front blue light - they will flash on and off a few times.
* 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.
* Once the front blue is flashing, you can let go of the pin.
Line 63: Line 77:


* Network Manager Method: Manual
* Network Manager Method: Manual
* IP Address: 192.168.1.10 (some devices will only accept from this IP)
* IP Address: <code>192.168.1.10</code> (some devices will only accept from this IP)
* Subnet Mask: 255.255.255.0
* Subnet Mask: <code>255.255.255.0</code>
* Gateway: 0.0.0.0 (Or leave blank)
* Gateway: <code>0.0.0.0</code> (Or leave blank)


You can also use the commands:
You can also use the commands:
Line 72: Line 86:
   sudo ip link set <eth_interface> up
   sudo ip link set <eth_interface> up


where <eth_interface> is the name of your ethernet interface found using `ip addr` (common names include eth0, enp3s0, ...)
where <code><eth_interface></code> is the name of your ethernet interface found using the <code>ip addr</code> command (common names include <code>eth0</code>, <code>enp3s0</code>, ...)


See Network Configuration Guides: [[Mesh/Network%20Configuration%20for%20Linux | Linux]], [[Mesh/Network%20Configuration%20for%20MacOS%20X | Mac]]
See Network Configuration Guides: [[Mesh/Network%20Configuration%20for%20Linux | Linux]], [[Mesh/Network%20Configuration%20for%20MacOS%20X | Mac]]
Line 81: Line 95:
* Go to [http://192.168.1.1 http://192.168.1.1], if the reset was successful, you should see the following page:
* Go to [http://192.168.1.1 http://192.168.1.1], if the reset was successful, you should see the following page:
[[File:Screenshot from 2017-04-04 18-27-09.png|thumb|center|upright=2]]
[[File:Screenshot from 2017-04-04 18-27-09.png|thumb|center|upright=2]]
* If your reset was not successful, try debugging your network configuration described in the previous step.
** If you continue to have issues consider reloading network settings or restarting your computer.
** If you are still unable to access this firmware upload page, turn off your router and try to reset it again as instructed above.
* Click 'Browse' and select the firmware file you downloaded
* Click 'Browse' and select the firmware file you downloaded
* Click Upload and you will be taken to an exciting countdown timer:
* Click Upload and you will be taken to an exciting countdown timer:
[[File:Screenshot from 2017-04-02 17-20-51.png|thumb|center|upright=2]]
[[File:Screenshot from 2017-04-02 17-20-51.png|thumb|center|upright=2]]
* Make sure not to disconnect or lose power at this stage, wait for the timer to complete.


Note: Sometimes the firmware upload will not complete. After you click on 'Upload' You should get a page with a countdown of 120+ seconds. If this does not occur, reboot the router with the pin reset button depressed (as noted above), and try again.
'''Note:''' Sometimes the firmware upload will not complete correctly. After you click on 'Upload' You should get a page with a countdown of 120+ seconds. If this does not occur, reboot the router with the pin reset button depressed (as noted above), and try again.


= Configure =
= Configure =
A freshly flashed node automatically sets its IP address to 172.30.0.xx. You will need to configure your laptop to use the following network settings to communicate with the node:
A freshly flashed node automatically sets its IP address to <code>172.30.0.xx</code>. You will need to configure your laptop to use the following network settings to communicate with the node:


* IP address: 172.30.0.10  
* IP address: <code>172.30.0.10</code>
* Subnet mask:  255.255.255.0
* Subnet mask:  <code>255.255.255.0</code>
* Gateway: 0.0.0.0
* Gateway: <code>0.0.0.0</code>


Or use the commands
Or use the commands
Line 99: Line 117:
   sudo ip link set <eth_interface> up
   sudo ip link set <eth_interface> up


where <eth_interface> is the name of your ethernet interface found using `ip addr` (common names include eth0, enp3s0, ...)
where <code><eth_interface></code> is the name of your ethernet interface found using <code>ip addr</code> (common names include <code>eth0</code>, <code>enp3s0</code>, ...)


See Network Configuration Guides: [https://sudoroom.org/wiki/Mesh/Network%20Configuration%20for%20Linux Linux] [https://sudoroom.org/wiki/Mesh/Network%20Configuration%20for%20MacOS%20X Mac]
See Network Configuration Guides: [https://sudoroom.org/wiki/Mesh/Network%20Configuration%20for%20Linux Linux] [https://sudoroom.org/wiki/Mesh/Network%20Configuration%20for%20MacOS%20X Mac]


== Autoconf (v.0.3.0) ==
== Autoconf (v.0.3.0) ==
'''''Note: If you installed autoconfiguring [https://github.com/sudomesh/sudowrt-firmware/releases/tag/0.3.0 release 0.3.0] for myNet N600 routers, you will not need to use makenode ([[#Makenode_.28v.0.2.3_and_earlier.29|instructions further down]]) after flashing the sudowrt-firmware to your router to configure it to work on People's Open Network.'''''
'''''Note: If you installed [https://github.com/sudomesh/sudowrt-firmware/releases/tag/0.3.0 release 0.3.0] for myNet N600 routers, your node can be autoconfigured. You will not need to use the previous solution <code>makenode</code>, otherwise you may need to read the ([[#Makenode_.28v.0.2.3_and_earlier.29|instructions further down]])'''''


[[File:Nodeports titles.png|400px|thumb|right|Plug into port 3 to access the private network from your laptop. Port 2 connects to the public 'peoplesopen.net' network]] Connect your newly-flashed MyNet N600 to your existing Internet router via ethernet from your existing router's LAN port to your new node's Internet port. Wait a few minutes for your new node to connect to the Internet and obtain its private IP address. Once this happens, the node will broadcast a new WiFi network starting with 'peoplesopen.net' (and ending with a unique IP address). This is the public network, has no password, and is suitable for day-to-day internet access.
[[File:Nodeports titles.png|400px|thumb|right|Plug into port 3 to access the private network from your laptop. Port 2 connects to the public 'peoplesopen.net' network]]
# Connect your newly-flashed MyNet N600 to your existing Internet router via ethernet cable from your existing router's '''LAN port''' to your new node's '''Internet port'''.
# Wait several minutes for your new node autoconfigure, connect to the Internet, and obtain its private IP address from the sudo mesh build server. When this process is complete, the node should broadcast several WiFi networks with the following SSIDs and purposes:
#* <code>peoplesopen.net</code> - This is the public network broadcast on the 2.4ghz band; it has no password, and is suitable for access to the internet.
#* <code>peoplesopen.net fast</code> - This is the same public network, but broadcast on the 5ghz band, which is more ideal for high-bandwidth activities such as streaming media.
#* <code>peoplesopen.net-node2node</code> - This is the public network used for mesh nodes to discover and communicate with one another. You should not need to connect or use this network, but you will want to verify it is active.
#* <code>pplsopen-admin</code> This is the private network, and you can use it to access a web dashboard to configure some settings, such as its SSID. The default WiFi password is <code>meshtheworld</code>. Try connecting to it (you can also connect to the private network using an ethernet cable connected to '''port 3''' on an N600 -- see diagram for details).


There is also a wireless network called 'pplsopen-admin'. This is the private network, and you can use it to access a web dashboard to configure some settings. The default WiFi password is 'meshtheworld'. Try connecting to it (you can also connect to the private network using an ethernet cable connected to port 3 on an N600).
Learn more about the [[Mesh/Network topology|network's topology here]].


While connected to the ''private'' network, try connecting to the home node's web dashboard by opening a web browser and navigating to http://172.30.0.1  
=== Configuring the Web Dashboard ===
 
While connected to the ''private'' network (default <code>pplsopen-admin</code>), try connecting to the home node's web dashboard by opening a web browser and navigating to [http://172.30.0.1 172.30.0.1]


If the flash was successful you should be brought to the following screen:
If the flash was successful you should be brought to the following screen:
Line 116: Line 142:
[[File:Peoplesopen-dash.jpg|frame|center|upright=2]]
[[File:Peoplesopen-dash.jpg|frame|center|upright=2]]


The default password is 'meshtheplanet'.
The default password is <code>meshtheplanet</code>.
 
Here you can set the amount of downstream and upstream bandwidth you're willing to share on the public <code>peoplesopen.net</code> network (default is set to 4096kb, or roughly 4 megabits/second):


Here you can set the amount of downstream and upstream bandwidth you're willing to share (default is set to 4096kb, or roughly 4 megabits/second):
[[File:homeScreen.jpg|frame|center|upright=2]]
[[File:homeScreen.jpg|frame|center|upright=2]]


[[File:WifiSettings.jpg|frame|left|upright=2|Set your private SSID and password via the 'WIFi Settings' tab. NOTE: When you first set your private SSID name and hit 'Save', you will have to reconnect to the newly-named SSID using the original default password ('meshtheworld') and then reconnect again with the new password after setting it in the dashboard]] [[File:newrouter.png|frame|right|upright=2|See all devices connected to your node via the 'Connections' tab]]
[[File:WifiSettings.jpg|frame|left|upright=2|Set your private SSID and password via the 'WIFi Settings' tab. NOTE: When you first set your private SSID name and hit 'Save', you will have to reconnect to the newly-named SSID using the original default password (<code>meshtheworld</code>) and then reconnect again with the new password after setting it in the dashboard]] [[File:newrouter.png|frame|right|upright=2|See all devices connected to your node via the 'Connections' tab]]
<br clear=all>
<br clear=all>


'''''Note: If you would like to be able to change these settings in the future, or ssh into your router, you will need to change the admin and root passwords within 12 hours.'''''
=== Changing Admin and Root User Passwords ===


To do so, open a terminal while connected to the 'pplsopen-admin' SSID:
'''''Note: If you would like to be able to change the above wifi settings in the future, or ssh into your router, you will need to change the admin and root passwords within 12 hours.'''''
 
To do so, open a terminal while connected to the <code>pplsopen-admin</code> private network (or whatever new SSID you may have chosen):
     ssh root@172.30.0.1
     ssh root@172.30.0.1
Enter the following password: meshtheplanet
Enter the following password: <code>meshtheplanet</code>


Set the root password.
Set the root password.
Line 135: Line 164:
     passwd admin
     passwd admin


== Makenode (v.0.2.3 and earlier) ==
== Testing ==
'''''Note: If you installed autoconfiguring [https://github.com/sudomesh/sudowrt-firmware/releases/tag/0.3.0 release 0.3.0] for myNet N600 routers, you do not need to use makenode. See the autoconf instructions above.'''''
 
Makenode's documentation has been consolidated to [[Mesh/Makenode|its page.]]


= Testing =
After you're finished with the flashing and configuration, your home node should be available for connections via your private WiFi SSID (default <code>pplsopen-admin</code>). Additionally the public SSIDs <code>peoplesopen.net <your mesh IP></code> and <code>peoplesopen.net fast <your mesh IP></code> will be available. It should also be populated on the [https://peoplesopen.herokuapp.com monitor]!


After you're finished with the flashing and configuration, your home node should be available for connections via your private WiFi SSID. Additionally the public SSID 'peoplesopen.net' will be available. It should also be populated on the [https://peoplesopen.herokuapp.com monitor]!
A fourth interface named <code>pplsopen.net-node2node'</code> will be detectable as well. This is the interface used for the nodes to mesh with each other.


A third interface named 'pplsopen.net-node2node' will be detectable as well. This is the interface used for the nodes to mesh with each other.
At this point you're setup. Reach out to the [[Mesh#How_To_Participate|rest of the network]]!


At this point you're setup. For more information on using your node, such as accessing the web-based management interface, see [[Home and extender nodes#Home_nodes|Home node info]]
== Makenode (v.0.2.3 and earlier) ==
'''''Note: If you installed autoconfiguring [https://github.com/sudomesh/sudowrt-firmware/releases/tag/0.3.0 release 0.3.0] for myNet N600 routers, you do not need to use makenode. See the autoconf instructions above.'''''


For more technical details on the internals of the home node, see the [[Mesh/Technical_Overview]]
Makenode's documentation has been consolidated to [[Mesh/Makenode|its page.]]
 
For more in depth testing procedures, see our [https://github.com/sudomesh/babeld-lab/blob/master/operator_manual.md mesh node operator's manual].
 
= Troubleshooting =
If you get the error "no such file or directory", open a new terminal and run this command to ensure that <tt>node</tt> points to your NodeJS executable:
 
  sudo ln -s nodejs node
 
In the new terminal, return to the 'makenode' source code directory and try again:
 
  npm install
  ./makenode.js


= Flashing TP-Link Routers =
= Flashing TP-Link Routers =

Navigation menu