Difference between revisions of "Mesh/WalkThrough"

From Sudo Room
Jump to navigation Jump to search
(replace latest link with link to working 0.3.0 image)
(41 intermediate revisions by 8 users 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 the SudoMesh's sudowrt-firmware (a custom build of OpenWRT) and then configuring it with makenode (a custom javascript tool developed by SudoMesh). 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 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).


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 ensure your router works as a mesh node.


= Download/Build =
= Download/Build =
Line 12: Line 12:
! Name !! OpenWRT Doc !! Firmware Image
! Name !! OpenWRT Doc !! Firmware Image
|-
|-
| 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://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin 0.2.0] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin 0.2.2]
| 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]
|-
| 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://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] ||  
| 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://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin 0.2.0] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin 0.2.2]
'''[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://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]


|-
|-
| TP-Link WDR4300 || [https://wiki.openwrt.org/toh/tp-link/tl-wdr4300 OpenWRT Docs] ||  
| 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://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin 0.2.0] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.2/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin 0.2.2]
'''[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://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]  
| Western Digital MyNet N600 || [https://wiki.openwrt.org/toh/wd/n600 OpenWRT Docs] || [https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin latest] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.0] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.2/ar71xx/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.2]
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n600-squashfs-factory.bin 0.2.3]
|-
| 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://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.0] [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.2/ar71xx/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.2]
[https://zenodo.org/record/1205601/files/openwrt-ar71xx-generic-mynet-n750-squashfs-factory.bin 0.2.3]
|-
|-
|}
|}


Builds for other routers can be found on our [https://builds.sudomesh.org/builds/sudowrt/fledgling/0.2.0/ar71xx/ builds server] or on [https://doi.org/10.5281/zenodo.1205601 zenodo], though there is no guarantee the firmware will work with any given router. For release notes, please go to our [https://github.com/sudomesh/sudowrt-firmware/releases github release pages].
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].


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 a SudoMesh'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.


= Flash/Upload =
= Flash/Upload =
Line 46: Line 50:


== Reset your new N750/N600 router ==
== 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 (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 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.
* With the pin held down, turn on the router power button.
* With the pin 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.
Line 81: Line 87:
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. 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 =
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:


= makenode/Configure =
* IP address: 172.30.0.10  
After flashing sudowrt-firmware to your router you will need to configure it work on a People's Open Network.
 
== Reconfigure your computer's network settings ==
A freshly flashed node automatically sets its IP address to 172.22.0.1. You will need to configure your laptop to use the following network settings to communicate with the node.
 
* IP address: 172.22.0.10  
* Subnet mask:  255.255.255.0
* Subnet mask:  255.255.255.0
* Gateway: 0.0.0.0
* Gateway: 0.0.0.0
Line 94: Line 96:
Or use the commands
Or use the commands
   sudo ip link set <eth_interface> down  
   sudo ip link set <eth_interface> down  
   sudo ip addr add 172.22.0.10/24 dev <eth_interface>  
   sudo ip addr add 172.30.0.10/24 dev <eth_interface>  
   sudo ip link set <eth_interface> up
   sudo ip link set <eth_interface> up


Line 101: Line 103:
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]


To test that the flashing was successful, feel free to try connecting to your unconfigured router by opening a browser and navigating to http://172.22.0.1
== Autoconf (v.0.3.0) ==
if the flash was successfull you should be brought to the following screen:
'''''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.'''''
 
[[File:Peoplesopen-dash.png|thumb|center|upright=2]]
 
After you have successfully flashed your router with OpenWRT, you will need to use [https://github.com/sudomesh/makenode makenode] to complete the setup. makenode registers your node on the peoplesopen network, resulting in the assignment of a 64 IPv4 address subnet to your node, in addition to applying basic configuration.
 
== Preparing your laptop for makenode ==
 
You will need to install the dependencies for [https://github.com/sudomesh/makenode makenode].
 
=== Linux ===
 
If you are working with a fresh installation of one of the operating systems listed in the compatibility checklist, you will need to install a few pieces of software.  
To install them, open your terminal and enter the following commands.
 
  sudo apt update
  sudo apt install curl git dropbear
  curl -o- ht<span>tps://</span>raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
  export NVM_DIR="$HOME/.nvm"  # or you can close and reopen your terminal before using nvm
  nvm install 7.10
 
==== OS Compatibility checklist ====
 
{| class="wikitable"
! OS !! Compatible !! Link to ISO !! Notes
|-
| Ubuntu 16.04 LTS || yes || http://releases.ubuntu.com/16.04/ ||
|-
| Ubuntu 14.04 LTS || please verify || http://releases.ubuntu.com/14.04/ ||
|-
| Debian 9.3 Stretch || yes || https://www.debian.org/distrib/ ||
|-
| Debian 8.1 Jessie || yes || https://www.debian.org/releases/jessie/debian-installer/ ||
|-
| Arch Linux || yes || https://www.archlinux.org/download/ || you may have to build dropbear from [https://github.com/mkj/dropbear source]
|-
|}
 
=== Mac ===


Install the [http://brew.sh/ Homebrew] package manager, then install the required binaries.
[[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.


  brew install nodejs
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).
  brew install git
  brew install npm
  brew install dropbear
  brew install gnu-tar
  brew install fakeroot
  brew install iproute2mac


=== Windows 10 (Experimental)===
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


'''Note: Windows is not currently recommened for setting up a node due to Dropbear not supporting Windows. What follows is instructions for Windows Subsytem for Linux.'''
If the flash was successful you should be brought to the following screen:


Due to Dropbear requirements your best bet is to use [[Windows Subsystem for Linux]] (WSL) and follow the instructions for Linux with additional instructions to get WSL set up. Follow the instructions for [https://docs.microsoft.com/en-us/windows/wsl/install-win10 installing] WSL on your Windows 10 PC. For now Ubuntu has been tested and appears to work. SUSE and other WSL flavors have not been tested.
[[File:Peoplesopen-dash.jpg|frame|center|upright=2]]


Once WSL is installed. Install dependencies (assuming Ubuntu).
The default password is 'meshtheplanet'.


  sudo apt update
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):
  sudo apt install python
[[File:homeScreen.jpg|frame|center|upright=2]]
  sudo apt install make
  sudo apt install build-essential


WSL doesn't fully support SYSV IPC so fakeroot needs to be rebuilt using tcp.
[[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]]
<br clear=all>


  sudo update-alternatives --set fakeroot /usr/bin/fakeroot-tcp
'''''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.'''''


Replace 'node-uuid' with 'uuid'
To do so, open a terminal while connected to the 'pplsopen-admin' SSID:
    ssh root@172.30.0.1
Enter the following password: meshtheplanet


  npm uninstall --save node-uuid
Set the root password.
  npm install --save uuid
    passwd
Now set the admin password for logging into the web dashboard:
    passwd admin


Follow Linux [[Mesh/WalkThrough#Linux | instructions]] for installing Dropbear and dependencies.
== 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.'''''


== Install and run makenode ==
Makenode's documentation has been consolidated to [[Mesh/Makenode|its page.]]
 
From your terminal, run the following:
 
  git clone https://github.com/sudomesh/makenode.git
  cd makenode
  npm install
  cp settings.js.example settings.js
 
The default settings in <tt>settings.js</tt> should suffice in most cases, but if you need to make changes, do them in <tt>settings.js</tt>.
 
Make sure the Ethernet cable is connected to the 4th port on the router.
 
Once your network configuration is refreshed, use the following command to run the script and configure your node:
 
  ./makenode.js
 
Now the configuration wizard will ask you a number of questions:
 
* "enter valid hostname" - name of the box, will only be seen when you SSH into the router - 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 (kilobits 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" - used to log into the admin dashboard where you can modify some settings at http://172.22.0.1 (if on wired connection) or http://172.30.0.1 (if on private wifi network)
* "root user password" - used to SSH into the router so you modify files and manually configure your 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, ssh keys are stored in /etc/dropbear/authorized_keys.
* "wifi transmit power" - set this to 23 dBm (which is equivalent to 200 milliwatts)
* "private wifi SSID" - name of the private wireless network that can be used to administer this router. It will be publicly visible so pick something amusing or descriptive.
* "private wifi password" - password for the private wireless network named in the previous step. It's the one you'll want to give to friends, so come up with something amusing or memorable. Note: it must be at least 8 characters long.
* "operator name" - name that the network admins can associate with the node - so use a unique name like your first name or location name
* "Operator email" - email that network admis can contact you at
* "Expected node address (optional)" - address location of node


= Testing =
= Testing =


After you're finished with the makenode configuration, your home node should be available for connections via your private WiFi SSID. Additionally the public SSID 'peoplesopen.net' will be available.  
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 third interface named 'pplsopen.net-node2node' 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.
Line 220: Line 153:


= Troubleshooting =
= Troubleshooting =
You may need to replace the `node-uuid` module with `uuid` for makenode to work, to fix this using the following commands:
  npm uninstall --save node-uuid
  npm install --save uuid
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:
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:


Line 237: Line 165:
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)
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, updload the sudort-firmware manually through the router's gui? Presumably, I haven't gotten that far yet...
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?
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.




Line 247: Line 177:


See [[Mesh/Flashing extender nodes]]
See [[Mesh/Flashing extender nodes]]
[[Category:Mesh]]

Revision as of 18:02, 30 May 2019

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 basic knowledge of the terminal. The general idea of building your own mesh node consists of three steps, downloading or compiling custom firmware, flashing that firmware to the node (i.e. copying firmware to flash memory), and configuring the node to function as part of a mesh (with a software tool such as makenode).

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

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.

At the moment, we are supporting the following routers:

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.

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.
  • With the pin 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 `ip addr` (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
  • 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

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.

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:

  • IP address: 172.30.0.10
  • Subnet mask: 255.255.255.0
  • Gateway: 0.0.0.0

Or use the commands

 sudo ip link set <eth_interface> down 
 sudo ip addr add 172.30.0.10/24 dev <eth_interface> 
 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, ...)

See Network Configuration Guides: Linux Mac

Autoconf (v.0.3.0)

Note: If you installed autoconfiguring release 0.3.0 for myNet N600 routers, you will not need to use makenode (instructions further down) after flashing the sudowrt-firmware to your router to configure it to work on People's Open Network.

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.

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).

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

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 (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


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.

To do so, open a terminal while connected to the 'pplsopen-admin' SSID:

   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

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.

Testing

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 monitor!

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. For more information on using your node, such as accessing the web-based management interface, see Home node info

For more technical details on the internals of the home node, see the Mesh/Technical_Overview

For more in depth testing procedures, see our 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 node 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

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