treefella wrote: ↑
Tue May 21, 2019 1:16 am
Oh hey guys didn't mean to start a riot here haha....
Not sure if "Mesh Network" is the correct term here. Open to correcting my terminology as it may help me in my searches.
Not gonna go there
Some details on my use case:
I was wondering if it is possible to just have 2 USB ports on each pi in a system (lets say 2-4 devices) and send around these NDI packets over a network connection. I have this working with ethernet on a switch on my PI3s and it works well. However the LAN controller takes a bunch of current and when I found out its implemented through the USB channels anyway I figured there must be some way to just pass the network along via USB.
So my question is:
Hardware wise, how do I have 2 devices connected to a given pi, sharing a network and passing it along a larger chain of pis? Is it possible to have this be "effectively" de-centralized as far as the end user is concerned?
Firstly, I would advise against using a daisy chain approach. For two main reasons (using A - B - C - D as an example config):
- Performance. Every packet from machine A to machine D has to go through machines B and C. This reduces available bandwidth between them and adds load on their CPUs.
- Vulnerability. If B goes down A can no longer reach C or D.
As you're using Pi 3, you cannot go down the USB ethernet gadget route as the on board USB hub prevents them acting as USB slave devices.
If you're determined to go down the daisy chain route, each Pi (except the ones at each end) will need two ethernet interfaces and you'll need to configure those as a bridge. Or you alternate the links between ethernet and WiFi (A wired to B, B to C via WiFi, C wired to D, etc.) or bluetooth but that would require routing/NAT rather than bridging so would add complexity.
Addiditonal ethernet interfaces can be added by USB (fastest) and SPI (slow). There are SPI to USB chips out there, and at least one person has used them with Pi but I've no idea if they can do slave mode and will likely not provide enough bandwidth.
Given that you're using Pi 3, that they have on board WiFI, that you don't want a network switch, and subject to bandwidth requirements you should probably investiagte WiFi AdHoc networks (https://wiki.debian.org/WiFi/AdHoc
that link is for debian from which raspbian is derived) or true WiFi mesh networks (hit your favourite search engine)
You could build a mesh network over wired ethernet but bear in mind that:
- Each node must have as many ethernet interfaces as there are other nodes (for N nodes that's N - 1 interfaces)
- Because the ethernet intefaces are connected via USB total bandwidth will be limited by that provided by USB. Expect slow downs for high bandwidth applications once you go beyond two or three interfaces (USB 2 provides 480Mb/s bandwidth less overhead)
Another alternative would be to have one of your Pi 3 with multiple ethernet interfaces each connected to one other PI and those interfaces configured as a bridge. That doesn't decentralise your network but does remove the need for a switch as a Pi performs that job. Though, again, this won't scale well due to limitation in USB bandwidth.
Frankly, if you need high performance you need to find a switch whose current draw fits within what you have available.
I'm not able to help further with AdHoc or mesh networking as I've never had to use either.
Don't forget that you'll likely need to provide a DHCP server somewhere or configure static IPs for everything.
Oh, and your link to newtek is broken.