Internet sharing between a PC and a Pioreactor
Below is a way to physically connect your PC to your Pioreactor and be able to control the Pioreactor from your PC, without needing any wifi or external router. This is called internet sharing. Note that this method does scale to larger clusters (see below).
Below is a simple diagram of how this might look (these are random IPs, yours may be different).
+---------------------+
| Sharing PC |
| IP: 192.168.137.1 |
+----------+----------+
|
| Ethernet Cable
|
+----------+----------+
| leader |
| IP: 192.168.137.2 |
+---------------------+
Requirements
- The Pioreactor requires an ethernet port. Any Raspberry Pi B models have this, but also you can purchase inexpensive (micro)USB-to-ethernet dongles.
- You can use a freshly installed Pioreactor, or an existing Pioreactor.
- An ethernet cable
- A PC with an available ethernet connector (again, you can purchase dongles to connect ethernet to PC's that don't have an available ethernet port).
Steps
-
Power off the Pioreactor.
-
Connect the ethernet cable to the Pi.
-
Connect the other end of the ethernet cable to the PC.
-
If using a mac / OSX: turn on internet sharing with the following:
- Go to System Preferences -> Internet sharing.
- In "Share your connection from", choose the source of your internet. Ex: if connected over Wi-Fi, choose that.
- "To devices using": select the USB10/100/1000 LAN.
- Set "Internet Sharing" to "On".
- Click "Done"
-
If using a Windows, turn on internet sharing with the following:
- Open search bar and search for "View Network Connections"
- Find the interface that has your Internet connection on (green symbol), right click and select 'Properties'
- Select the sharing tab and in 'Home networking connection' select the interface the Pi is connected to (something like "Ethernet").
- Tick the box 'Allow other network users to connect through this computer's Internet connection' and click on 'OK'
-
Power up the Pioreactor. After a few minutes, you should be able to
ping your-leaders-hostname.local
and get back an address like192.168.xx.xx
. -
Try http://pioreactor.local in your browser. The UI should come up. Or try http://your-leaders-hostname.local.
-
Save the new config.
And you're done! Your Pioreactor should be able to be both accessed by the local PC, and be able to ping the internet (for updates, plugins, etc). You can also disconnect the ethernet cable as well, and your Pioreactor will still function (albeit it will lose internet connectivity).
Connecting multiple Pioreactors
From here, there are two ways to add more Pioreactors:
-
A simple way to set up a cluster of Pioreactor is to use internet sharing between your PC and the leader Pioreactor (see above), and use a local access point between the leader Pioreactor and the worker Pioreactors. Note this will not provide internet access to the other Pioreactors (by default).
+---------------------+
| Sharing PC |
| IP: 192.168.137.1 |
+----------+----------+
|
| Ethernet Cable
|
+----------+----------+
| leader with LAP |
| IP: 192.168.137.2 |
+----------+----------+
|
| Wireless AP (192.168.4.x subnet)
|
+-------+-------+
| |
| Wi-Fi |
| |
+--+---+ +--+---+
| pio1 | | pio2 |
| IP: | | IP: |
| 192.168.4.2 | 192.168.4.3
+------+ +------+ -
Alternatively, you can extend the above technique to multiple Pioreactors. Instead of connecting the ethernet directly to the Pioreactor, you can connect it to a network switch¹, and connect your Pioreactors to that switch (via ethernet).
+---------------------+
| Sharing PC |
| IP: 192.168.137.1 |
+----------+----------+
|
| Ethernet Cable
|
+------+------+
| Switch |
+------+------+
|
+-------+--------------+---------------+ Ethernet Cables
| | |
| | |
+--+---------+ +--+-=-+ +--+---+
| leader | | pio1 | | pio2 |
| IP: | | IP: | | IP: |
| 192.168.137.2 | 192.168.137.3 | 192.168.137.4
+------------+ +------+ +------+