To clarify, I am trying to make all of these Pi Zeros work as one computer with each one preforming a different task. Also, the battery can be any size or anything as long as it works and holds true to the height constraints.
If it speeds anything up, you can link a second wire to the hub for the Pi Zero Ws or standard Zero.
What are you trying to accomplish?
1 of 1 people found this helpful
I understand the programming logic so I am good on that.
What I am trying to accomplish is the following
Pi Zero: In charge of following through with commands received by the Pi Zero W with 16gb of storage. Also, managing system.
Pi Zero W with 16gb of storage: In charge of connecting to the remote host(me) and sending commands I would send to it to be processed by the normal Pi Zero.
Pi Zero W with 32gb of storage: In charge of following through with the network tasks the normal Zero gave it and recording results.
Also, I am trying to make it portable.
3 of 3 people found this helpful
Sorry your details missed the mark in helping me understand what you are trying to accomplish.
At first I thought maybe you are trying to cluster PiZero's and then after a second look I thought it might be server farm. After reading it once again I'm going to suggest you have a number of PiZero's in different flavours and you are trying to develop a project that utilises them? Communication between devices would be accomplished using the board interfaces readily available? The battery is to make the whole thing portable.
2 of 2 people found this helpful
Let me give a full run down if it just to give a full understanding.
Sorry that this might be a long read.
I would first off categorize this as a cluster server remote(It is what it sounds like).
It will be using any terminal based OS. For example, TinyCore Linux or Raspberry pi’s Terminal based OS.
Let me classify some things:
Host A: This is either a mobile smartphone with access to SSH or a computer(I am using Kali Linux on my PC).
Target Host: Any wireless device with access to the internet and can be in this example, pinged.
Pi Zero #1: in charge of recording tasks I give it and sending them to the “Normal Pi Zero” to be processed and maintaining a connection with “Host A.” Also, it can power the Product off if commanded.
Pi Zero #2: This thing is in charge of the carrying out of tasks given to it by the “Normal Pi Zero” which just processed them(In the current example it will Ping).
Normal Pi Zero: This thing is in charge of Receiving a task from “Pi Zero #1” and reading it(checking what it wants the Pi to do. If it is an error, it won’t send it to “Pi Zero #2”) to send a command to “Pi Zero #2.” In this case, let’s call it ping. After finishing this, it will listen to “Pi Zero #2” for information to record such as, the ping result(like, if it was successful and how long it took).
Portable Result Device: A combination of all the components that is a mobile device with a rechargeable battery because It needs to be in best way of explaining things, pocket sized. It will have a manual button or switch on it to turn it on and off.
— — —
User powers on Portable Result Device.
The Pi Zero #1 is given a task by Host A on the current port that it is listening to on the network(SSH) and immediately sends it off to Normal Pi Zero for examination. Normal Pi Zero then defines this task as a set of 3 pings to the ip address 192.168.11. It then records the command in a file, sends the command to Pi Zero #2 and waits to record the result message from Pi Zero #2. When it reaches Pi Zero #2, Pi Zero #2 will check what the best method of transmission.
Pi Zero #2 will first send out a Ping request to the router where it will then forward to the device and ask for a MAC Address and try to record that in a file. The MAC address is recorded in the Pi Zero #2 next to a seemingly random name with 8 characters inside a file name of [Action(in this case Ping)] records. After it is done recording, it will place a ‘$’ sign at the end to indicate the the end of a request. It will then send back the ping result to the Normal Pi Zero which will place the data under the the action it had already recorded from earlier like this:
All of this will be contained under a file with the name of the random 8 characters that it received from Pi Zero #2. Host A asks for the result of the action in which the Normal Pi Zero is asked for by Pi Zero #1. Pi Zero #1 then encrypts it using Diffie Hellman and sends it to Host A and the process is done. The Computer then sends a shut down request to the Pi Zero #1 in which the device instantly powers off.
Now that it is off, the only way to turn it back on now is by manually clicking a button.
Hopefully this helps clear some confusion
Why not run the whole thing on one Pi ?
And if one Pi isn't enough, run the whole thing twice on 2 Pis.
Your scheme involves loads of messages and waiting for replies between Pis, can only be scaled 4 Pis at a time, has 4 different kinds of Pi code.
What data/message throughput will this system handle ?
The reason I am using this trio setup is for the following reasons:
- One or Two normal Pis take up a lot of space.
- I need this to take up little height and if possible as a whole(If there was a way to take the Pi 4 B and remove the top layer of usb ports and the ethernet port, that would open my interest) [I don’t have experience removing components though which is problem B]
- The trio combo works together and restricts only specific points of access keeping the computer an “Onion” in the security world. Example: Pi Zero #1 only allows output of signals and only requests when it sends out a request.
- Pi 4 B gets hot and I can’t use a fan because of noise(prime reason) and battery consumption(Less so of the problem)
- Simplicity for the system. Having three different boards that only know how to do their assigned tasks is a huge advantage over one that knows all three.
- The final part of using a trio that I like is the fact that the boards will go through minimal downtime because they all check each other.
I understand your 2 Pi idea but, it just won’t work if I want this thing to be the size that it is(I will consider it if I could stack the two boards minus the ports because my design only includes the normal Pi Zero because it needs more power to process information while keeping its other processes at the same speed).
Finished product of my current project should be in total, the same if not a little bigger than the Pi 4 B according to the dimensions I am working with. The only reason I would skip Pi 3 is because of it lacking the ability to multitask in sending and receiving well(I have one at home).
For your throughput question, the SSDs support enough speed for writing after it communicates of a little over 90mbps. So, if you factor in the delay at which the systems receive information, roughly 90mbps for the speed in a perfect world(It needs to write the commands before executed so it should effect the network travel rate).
Would this work and if so, how could I improve it?
If not, how can I fix it and with what parts?
Also, I will be remotely controlling this device meaning that the extra ports can be used to improve it.
My constraints are:
-Size(Can be changed to a box by moving one Pie Zero W if it won’t work. You can use the spare corner of room to add a part for controlling battery)
-At least 1 hour of battery life(It can be any size as long as it can maintain very little height)
-Must use 3 Pi zeros(2 must be Zero W)
-It is rechargeable
-It won’t break(As in no technical errors)