Difference between revisions of "Mesh/WalkThrough"

From Sudo Room
Jump to navigation Jump to search
(updates intro and creates more logical sections with more helpful links.)
(→‎Download/Build: adds link to github for rolling-your-own)
Line 21: Line 21:
= 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 57: 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 =

Revision as of 18:28, 13 November 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 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:

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