Difference between revisions of "Mesh/WalkThrough"

From Sudo Room
Jump to navigation Jump to search
(adding additional post-setup link to home node info)
(adds troubleshooting and reset button soldering section)
 
(141 intermediate revisions by 16 users not shown)
Line 1: Line 1:
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 [https://help.ubuntu.com/community/UsingTheTerminal basic knowledge of the terminal]. The basic idea of getting a node (router) on the mesh consists of flashing (copying files to [https://en.wikipedia.org/wiki/Flash_memory flash memory]) an operating system to the node and then using a software configurator finish setup .
+
'''Congratulations''' on choosing to become part of the [https://peoplesopen.net/ People's Open Network]!
  
If you do not want to use a per-compiled OpenWRT image, you can build your own from scratch using this how to: [[Mesh/Build An OpenWRT Image]]
+
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]].
  
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.
+
= 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.
  
= Preparing Your Laptop =
+
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].
  
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 :/
+
= Prerequisites =
  
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:
+
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.
  
  sudo apt-get install nodejs
+
The general idea of building your own mesh node consists of three steps:
  sudo apt-get install git
+
# [[#Download/Build|downloading or compiling]] the custom firmware
  sudo apt-get install npm
+
# [[#Flash/Upload|flashing that firmware]] to the node (i.e. copying firmware to [https://en.wikipedia.org/wiki/Flash_memory '''flash''' memory])
  sudo apt-get install dropbear
+
# [[#Configure|configuring the node]] to function as part of a mesh.
  
= Install OpenWRT on your Router =
+
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 the Sudomesh OpenWRT Image File For a Supported Router ==
+
= Download/Build =
  
Sudomesh firmware images can be found at [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/ https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/]
+
Now that you have a node, you can flash 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 for home nodes:
+
{| class="wikitable"
* [https://wiki.openwrt.org/toh/tp-link/tl-wdr3500 TP-Link WDR3500] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin firmware image]
+
! Name !! OpenWRT Doc !! Firmware Image
* [https://wiki.openwrt.org/toh/tp-link/tl-wdr3600 TP-Link WDR3600] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin firmware image]
+
|-
* [https://wiki.openwrt.org/toh/tp-link/tl-wdr4300 TP-Link WDR4300] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin firmware image]
+
| Western Digital MyNet N600 || [https://wiki.openwrt.org/toh/wd/n600 OpenWRT Docs] || '''[https://builds.sudomesh.org/sudowrt-firmware/0.3.0/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory-0.3.0.bin 0.3.0]''' [https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.3] [https://builds.sudomesh.org/sudowrt-firmware/0.2.2/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.2][https://builds.sudomesh.org/sudowrt-firmware/0.2.0/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.0]  
* [https://wiki.openwrt.org/toh/wd/n600 Western Digital MyNet N600] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin firmware image]
+
|-
* [https://wiki.openwrt.org/toh/wd/n750 Western Digital MyNet N750] - [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin firmware image]
+
| Western Digital MyNet N750 || [https://wiki.openwrt.org/toh/wd/n750 OpenWRT Docs] ||
 +
'''[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin latest]'''
 +
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.3]
 +
[https://builds.sudomesh.org/sudowrt-firmware/0.2.2/ar71xx/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.2][https://builds.sudomesh.org/sudowrt-firmware/0.2.0/ar71xx/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.0]  
 +
|-
 +
| TP-Link WDR3500 || [https://wiki.openwrt.org/toh/tp-link/tl-wdr3500 OpenWRT Docs] ||
 +
'''[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin latest]'''
 +
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin 0.2.3]
 +
[https://builds.sudomesh.org/sudowrt-firmware/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin 0.2.2] [https://builds.sudomesh.org/sudowrt-firmware/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin 0.2.0]  
 +
|-
 +
| TP-Link WDR3600 || [https://wiki.openwrt.org/toh/tp-link/tl-wdr3600 OpenWRT Docs] ||
 +
'''[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin latest]'''
 +
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin 0.2.3]
 +
[https://builds.sudomesh.org/sudowrt-firmware/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin 0.2.2][https://builds.sudomesh.org/sudowrt-firmware/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin 0.2.0]
  
Download the image file for your supported router.
+
|-
 +
| TP-Link WDR4300 || [https://wiki.openwrt.org/toh/tp-link/tl-wdr4300 OpenWRT Docs] ||
 +
'''[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin latest]'''
 +
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin 0.2.3]
 +
[https://builds.sudomesh.org/sudowrt-firmware/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin 0.2.2][https://builds.sudomesh.org/sudowrt-firmware/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin 0.2.0]
 +
|-
 +
|}
  
== Flash your Router with OpenWRT ==
+
Builds for other routers can be found on our [http://builds.sudomesh.org/sudowrt-firmware/ builds server] or on [https://doi.org/10.5281/zenodo.1205601 zenodo], though most builds for routers not listed above have not been tested. For release notes, please go to our [https://github.com/sudomesh/sudowrt-firmware/releases github release pages].
  
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.
+
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].
  
For example, if you have a Western Digital MyNet N600, follow these instructions:
+
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 =
 +
 +
Once you have a copy of the sudowrt-firmware intended for your router, you can proceed with flashing it to your router. 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 convenience, if you have a Western Digital MyNet N600 or N750, follow these instructions:
 +
 +
== Reset your new N750/N600 router ==
 +
[[File:Router_reset_mynet.png|200px|thumb|right|Reset hole location!]]
 +
Instructions to reset / default a WD MyNet N600 or N750 router:
 
* 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 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 into the reset hole and hold it.
+
* 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.
  
On your laptop (instructions for Ubuntu) edit your network settings by doing the following:
+
== Configure your computer's network settings ==
 +
On your laptop edit your network settings to reflect the following:
  
* Click on the network icon on the top right of the toolbar.
+
* Network Manager Method: Manual
* Click "Edit connections..."
+
* IP Address: <code>192.168.1.10</code> (some devices will only accept from this IP)
* Click on Ethernet connection "Wired connection 1" and click Edit
+
* Subnet Mask: <code>255.255.255.0</code>
* Click on the "IPv4 Settings" tab
+
* Gateway: <code>0.0.0.0</code> (Or leave blank)
* Change method to "Manual"
 
* Click Add
 
* Under "Address" type "192.168.1.10" (some devices will only accept from this IP)
 
* Under "Netmask" type "255.255.255.0"
 
* Under "Gateway" type "0.0.0.0"
 
* Click Save
 
* Click Close
 
  
In your web browser:
+
You can also use the commands:
 +
  sudo ip link set <eth_interface> down
 +
  sudo ip addr add 192.168.1.10/24 dev <eth_interface>
 +
  sudo ip link set <eth_interface> up
  
* Go to "192.168.1.1"
+
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>, ...)
* Click Browse and select the firmware you downloaded
 
* Click Install
 
** Sometimes the interface will hang. 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.
 
  
= Configuring Your OpenWRT Router to Work on the Sudomesh Network =
+
See Network Configuration Guides: [[Mesh/Network%20Configuration%20for%20Linux | Linux]], [[Mesh/Network%20Configuration%20for%20MacOS%20X | Mac]]
  
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.
+
== Upload sudowrt-firmware ==
 +
In your web browser:
  
Open your terminal in Linux and type:
+
* 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]]
 +
* 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 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]]
 +
* Make sure not to disconnect or lose power at this stage, wait for the timer to complete.
  
  git clone https://github.com/sudomesh/makenode.git
+
'''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.
  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 in 'settings.js'.
+
= Configure =
  
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). On your laptop (instructions for Ubuntu) edit your network settings by doing the following:
+
'''''If you are configuring something other than a WD MyNet N600, or firmware version 0.2.3 or earlier, follow ([[#Makenode_.28v.0.2.3_and_earlier.29|these instructions]])'''''
  
    Click on the network icon on the top right of the toolbar.
+
[[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]]
    Click "Edit connections..."
+
# 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'''.
    Click on Ethernet connection "Wired connection 1" and click Edit
+
# 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:
    Click on the "IPv4 Settings" tab
+
#* <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.
    Change method to "Manual"
+
#* <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.
    Click Add
+
#* <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.
    Under "Address" type "172.22.0.9"
+
#* <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).
    Under "Netmask" type "255.255.255.0"
 
    Under "Gateway" type "0.0.0.0"
 
    Click Save
 
    Click Close
 
  
If you are using a Mac and configuring the network settings, you may need to simply leave the "Gateway" setting blank when configuring your network settings.
+
Learn more about the [[Mesh/Network topology|network's topology here]].
  
Make sure the ethernet cable is connected to the 4th port on the router (closest to the yellow internet port).
+
== Configuring the Web Dashboard ==
  
Once your network configuration is refreshed, use the following command to run the script and configure your node:
+
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]
  
  ./makenode.js
+
If the flash was successful you should be brought to the following screen:
  
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:
+
[[File:Peoplesopen-dash.jpg|frame|center|upright=2]]
  
  sudo ln -s nodejs node
+
The default password is <code>meshtheplanet</code>.
  
In the new terminal, return to the 'makenode' source code directory and try again:
+
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):
  
  npm install
+
[[File:homeScreen.jpg|frame|center|upright=2]]
  ./makenode.js
 
  
Now the configuration wizard will ask you a number of questions:
+
[[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>
  
* "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]
+
== Changing Admin and Root User Passwords ==
* "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 downstream bandwidth" - how much of your home network upstream bandwidth you wish to share with the mesh network - eg. "512" would share 512 kbps
 
* "admin user password" - this is the password for for changing wifi settings on the node
 
* "root user password" - this is the root password for the router - Make sure that your root password is strong! If you don't enter a root password, a strong one will be generated and will be logged to screen. It's generally preferable to not use the root password at all and instead add an ssh key to the device - see details below.
 
* "wifi transmit power" - set this to 23 dBm (which is equivalent to 200 milliwatts)
 
* "operator name" - this is the name that the network admins can associate with the node - so use a unique name like your first name or location name
 
* "private wifi SSID" - this is the wireless SSID name for the private wireless network that will run on this router
 
* "private wifi password" - this is the password for the private wireless network that will run on this router - it must be at least 8 characters long
 
  
== Testing ==
+
'''''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.'''''
  
After you're finished with the setup, you can do the following to test out your new home node.
+
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
 +
Enter the following password: <code>meshtheplanet</code>
  
=== Network Settings ===
+
Set the root password.
 +
    passwd
 +
Now set the admin password for logging into the web dashboard:
 +
    passwd admin
  
Reconfigure your machine to use the following network settings:
+
== Testing ==
  
* IP Address: 172.22.0.9
+
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]!
* Netmask: 255.255.255.0
 
* Gateway: 0.0.0.0 (or leave blank if error)
 
  
Ubuntu users can reconfigure their network settings using the command line. In a separate terminal you will log into the node using these directions:
+
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.
  
Find the name of your ethernet port by running `ifconfig`
+
At this point you're setup. Reach out to the [[Mesh#How_To_Participate|rest of the network]]!
  
  ifconfig
+
== 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.'''''
  
In the example below, the wired Ethernet port was "eth0"
+
Makenode's documentation has been consolidated to [[Mesh/Makenode|its page.]]
  
In the terminal type the following, replacing "eth0" with the name of your Ethernet port:
+
= Flashing TP-Link Routers =
 +
If you happen to come across a TP-Link router, such as a WDR4300, you may discover that the above instructions absolutely do not work. This is especially true if the router has previously been flashed with the sudowrt firmware (or any kind of OpenWRT or DD-WRT?). If you find yourself attempting to reflash a TP-Link router, you will first need to reset the router to its factory default firmware. Luckily, redconfetti has provided instructions on how to do this, http://www.rubycoloredglasses.com/2016/04/tp-link-wdr4300-recovery/ (TODO, test/update these instructions and copy them to this wiki)
  
  sudo ip addr add 172.22.0.9/24 dev eth0
+
Next, upload the sudort-firmware manually through the router's gui? Presumably, I haven't gotten that far yet...
 
 
=== SSH into your Home Node ===
 
 
 
Your home node is now running a Secure Shell (SSH) server. You can run the following command to attempt to log into your home node.
 
 
 
  ssh root@172.22.0.1
 
 
 
After accepting the key by entering 'yes' and pressing ENTER, 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.
 
 
 
=== Confirm that the Node is Running ===
 
 
 
Click on the network icon on the top right of the toolbar to see the available 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.
 
 
 
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]]
 
 
 
= Flashing Extender Antennas =
 
 
 
This step is optional.
 
 
 
== Download the Image File For a Extender Node ==
 
 
 
The extender nodes that we currently support are:
 
 
 
{| class="wikitable"
 
! Name !! Model No. !! OpenWRT Doc !! Firmware Image
 
|-
 
| Ubiquiti Nanostation M5 || NSM5 || [https://wiki.openwrt.org/toh/ubiquiti/nanostationm5 OpenWRT Docs] || firmware: [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin pre 2015] or [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-ubnt-nano-m-xw-squashfs-factory.bin 2015-2016]
 
|-
 
| Ubiquiti Nanostation M2 || NSM2 || [https://wiki.openwrt.org/toh/ubiquiti/nanostationm2 OpenWRT Docs] || [https://builds.sudomesh.org/builds/chaos_calmer/ar71xx.extender-node/openwrt-ar71xx-generic-om2p-squashfs-factory.bin firmware image]
 
|-
 
| Ubiquiti Picostation 2 || || [https://wiki.openwrt.org/toh/ubiquiti/picostation2 OpenWRT Docs] || [https://builds.sudomesh.org/builds/chaos_calmer/ath25.extender-node/openwrt-ath25-ubnt2-pico2-squashfs.bin firmware image]
 
|-
 
| Ubiquiti Picostation M2 || || [https://wiki.openwrt.org/toh/ubiquiti/picostationm2 OpenWRT Docs] ||
 
|-
 
| Ubiquiti Nanobeam M2 and M5 || || [https://wiki.openwrt.org/toh/ubiquiti/nanobeam OpenWRT Docs] ||
 
|-
 
| Ubiquiti Bullet M2 and M5 || || [https://wiki.openwrt.org/toh/ubiquiti/bullet OpenWRT Docs] ||
 
|}
 
  
== Flash the Extender Node ==
+
After that, makenode should just work right?
  
* 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
+
There also exists something called tp-flasher, https://github.com/sudomesh/tp-flasher. However, it is highly recommended that you avoid using this because there is a very good chance you will brick your router if you use it incorrectly. Of course, we don't want to discourage anyone from improving tp-flasher.
* 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.
 
* 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.
 
* 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.
 
  
You should be able to ping the extender at 192.168.1.20.
 
  
  $ ping 192.168.1.20
+
= Flashing Extender Nodes =
  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
 
  
In your Linux terminal, type:
+
If you would like to make long distance point-to-point connections between two or more home nodes, you'll want to setup an extender node (a roof mounted antenna).
  
  git clone https://github.com/sudomesh/ubi-flasher
+
See [[Mesh/Flashing extender nodes]]
  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."
+
[[Category:Mesh]]
  
Wait until the antenna has only the power LED lit and you're done.
+
= Troubleshooting =
  
=== Nanostation M5 ===
+
== Soldering A Reset Button ==
  
If you attempt to flash the extender and receive a 'Firmware check failed' error, then you have a version of the NSM5 that is protected from being flashed via the TFTP method. You will need to obtain a serial to USB interface (USB to UART TTL Module Serial Converter, 5 pin) and use it to flash the firmware.
+
As you are resetting routers, you may end up having a component, such as the reset button itself, fall off of the PCB (printed circuit board). The WD MyNet n600 has security screws, so you may need a [https://www.google.com/search?hl=en&ei=Zz30XZ-iLurJ0PEP8Mq90As&q=site%3Aaliexpress.com+torx+t10+security+bit&oq=site%3Aaliexpress.com+torx+t10+security+bit&gs_l=psy-ab.3...15707.23122..23261...0.0..2.605.6423.23j13j6j1j1j1......0....1..gws-wiz.......0i273j0j0i131j0i67.SQrobDcWg6U&ved=0ahUKEwjf8eHvgLTmAhXqJDQIHXBlD7oQ4dUDCAs&uact=5 Torx T10 Security Bit] to remove the case.  
  
  $ ./flasher.js openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin
+
<gallery mode="traditional">
  Accessing http://192.168.1.20/login.cgi
+
File:Wd_n600_naked_board.jpg|WD MyNet n600 naked (without case)
  Connection timed out
+
File:Wd_n600_reset_button_resolder.jpg|WD MyNet n600 resolder of the reset button that fell off
  Sending openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin to 192.168.1.20 using tftp put
+
</gallery>
  [Error: (Server) Firmware check failed]
 

Latest revision as of 17:39, 13 December 2019

Congratulations on choosing to become part of the People's Open Network!

Continue reading to follow these do-it-yourself / do-it-together instructions, or read more about how to participate and get help.

Summary

This is a 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 sudowrt-firmware (a custom build of 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 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 basic knowledge of the command-line interface terminal ('terminal' for short). Contact us if you can contribute instructions for other systems.

The general idea of building your own mesh node consists of three steps:

  1. downloading or compiling the custom firmware
  2. flashing that firmware to the node (i.e. copying firmware to flash memory)
  3. configuring the node to function as part of a mesh.

Before you flash your router, it is recommended that you read the home node info to ensure your router is compatible to work as a mesh node.

Download/Build

Now that you have a node, you can flash 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:

Name OpenWRT Doc Firmware Image
Western Digital MyNet N600 OpenWRT Docs 0.3.0 0.2.3 0.2.20.2.0
Western Digital MyNet N750 OpenWRT Docs

latest 0.2.3 0.2.20.2.0

TP-Link WDR3500 OpenWRT Docs

latest 0.2.3 0.2.2 0.2.0

TP-Link WDR3600 OpenWRT Docs

latest 0.2.3 0.2.20.2.0

TP-Link WDR4300 OpenWRT Docs

latest 0.2.3 0.2.20.2.0

Builds for other routers can be found on our builds server or on zenodo, though most builds for routers not listed above have not been tested. For release notes, please go to our github release pages.

Alternatively, you can build your own copy of the firmware images by following the guide in the sudowrt-firmware source.

If you do not want to use Sudo Mesh's OpenWRT image, you can also install a standard OpenWRT release and configure it from scratch, (read more on github).

Flash/Upload

Once you have a copy of the sudowrt-firmware intended for your router, you can proceed with flashing it to your router. 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 convenience, if you have a Western Digital MyNet N600 or N750, follow these instructions:

Reset your new N750/N600 router

Reset hole location!

Instructions to reset / default a WD MyNet N600 or N750 router:

  • 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).
  • 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 still held down, turn on the router power button.
  • 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.

Configure your computer's network settings

On your laptop edit your network settings to reflect the following:

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

You can also use the commands:

 sudo ip link set <eth_interface> down 
 sudo ip addr add 192.168.1.10/24 dev <eth_interface> 
 sudo ip link set <eth_interface> up

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

See Network Configuration Guides: Linux, Mac

Upload sudowrt-firmware

In your web browser:

Screenshot from 2017-04-04 18-27-09.png
  • 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 Upload and you will be taken to an exciting countdown timer:
Screenshot from 2017-04-02 17-20-51.png
  • 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 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

If you are configuring something other than a WD MyNet N600, or firmware version 0.2.3 or earlier, follow (these instructions)

Plug into port 3 to access the private network from your laptop. Port 2 connects to the public 'peoplesopen.net' network
  1. 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.
  2. 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:
    • peoplesopen.net - This is the public network broadcast on the 2.4ghz band; it has no password, and is suitable for access to the internet.
    • peoplesopen.net fast - This is the same public network, but broadcast on the 5ghz band, which is more ideal for high-bandwidth activities such as streaming media.
    • peoplesopen.net-node2node - 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.
    • pplsopen-admin 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 meshtheworld. 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).

Learn more about the network's topology here.

Configuring the Web Dashboard

While connected to the private network (default pplsopen-admin), try connecting to the home node's web dashboard by opening a web browser and navigating to 172.30.0.1

If the flash was successful you should be brought to the following screen:

Peoplesopen-dash.jpg

The default password is meshtheplanet.

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

HomeScreen.jpg
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
See all devices connected to your node via the 'Connections' tab


Changing Admin and Root User Passwords

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 pplsopen-admin private network (or whatever new SSID you may have chosen):

   ssh root@172.30.0.1

Enter the following password: meshtheplanet

Set the root password.

   passwd

Now set the admin password for logging into the web dashboard:

   passwd admin

Testing

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

A fourth 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 rest of the network!

Makenode (v.0.2.3 and earlier)

Note: If you installed autoconfiguring 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 its page.

Flashing TP-Link Routers

If you happen to come across a TP-Link router, such as a WDR4300, you may discover that the above instructions absolutely do not work. This is especially true if the router has previously been flashed with the sudowrt firmware (or any kind of OpenWRT or DD-WRT?). If you find yourself attempting to reflash a TP-Link router, you will first need to reset the router to its factory default firmware. Luckily, redconfetti has provided instructions on how to do this, http://www.rubycoloredglasses.com/2016/04/tp-link-wdr4300-recovery/ (TODO, test/update these instructions and copy them to this wiki)

Next, upload the sudort-firmware manually through the router's gui? Presumably, I haven't gotten that far yet...

After that, makenode should just work right?

There also exists something called tp-flasher, https://github.com/sudomesh/tp-flasher. However, it is highly recommended that you avoid using this because there is a very good chance you will brick your router if you use it incorrectly. Of course, we don't want to discourage anyone from improving tp-flasher.


Flashing Extender Nodes

If you would like to make long distance point-to-point connections between two or more home nodes, you'll want to setup an extender node (a roof mounted antenna).

See Mesh/Flashing extender nodes

Troubleshooting

Soldering A Reset Button

As you are resetting routers, you may end up having a component, such as the reset button itself, fall off of the PCB (printed circuit board). The WD MyNet n600 has security screws, so you may need a Torx T10 Security Bit to remove the case.