daneast
Posts: 39
Joined: Wed Feb 08, 2012 6:55 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Wed Feb 08, 2012 7:39 pm

What is the maximum bandwidth possible when networking two Raspberry Pis together using GPIO or other ports that are NOT USB or ethernet?

Would that method of networking (whatever it is) be supported by a standard network stack under linux allowing TCP/IP, etc, or would it be proprietary and thus require custom drivers or software?

slacer
Posts: 32
Joined: Mon Dec 26, 2011 9:13 am

Re: pi pi connectivity bandwidth, without USB or Ethernet

Wed Feb 08, 2012 8:42 pm

If you are able to use GPIO for serial connections you could try to use SLIP or PPP in order to connect two boards with tcp/ip.

I cannot even guess what the maxium bandwidth could be in this case, because there are several factors which may reduce the bandwidth.

Can you use data compression?

Can you use error correcting protocols (possibly low bandwidth) or do you depend on tcp/ip error detection? (possibly high error count for tcp/ip transmit/receive packets)

Do you use (un)shielded twisted pair? How long is the distance (1m vs 20m)...

I don't know if there is a way to use a kind of parallel port...

SLIP and PPP are standard protocols, but I guess you need a custom driver for serial/parallel data transfer over GPIO

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: pi pi connectivity bandwidth, without USB or Ethernet

Wed Feb 08, 2012 9:00 pm

As Slacer ask: what is your distance?

For back-to-back, connecting DSI to CSI will give you >1 Gbits/sec but unfortunately the DSI and CSI are GPU controlled so you have to wait for such a utility to come from within Broadcom.

daneast
Posts: 39
Joined: Wed Feb 08, 2012 6:55 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Wed Feb 08, 2012 10:16 pm

The distance would be inches.

Since the r-pi can't drive the composite and HDMI video outputs independently, I'm wondering about using a pair of raspberry pis.  A typical automotive use would be one display for control, GPS, etc, and secondary display(s) showing video in the back of the vehicle.

Having the master device control the video-playback-only device would require only trivial bandwidth, however I'd like to have the video device playing media residing on the master pi's storage devices.

Or the video pi could have it's own storage, but that media would be synced via the master device which would have connectivity to the outside world.

Baconator
Posts: 7
Joined: Fri Jan 27, 2012 4:25 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Wed Feb 08, 2012 10:50 pm

Gert said:


As Slacer ask: what is your distance?

For back-to-back, connecting DSI to CSI will give you >1 Gbits/sec but unfortunately the DSI and CSI are GPU controlled so you have to wait for such a utility to come from within Broadcom.


And here I though those pinouts/connectors were only for cameras and screens (respectively).

Would it (theoretically) be possible to use it in a token-ring like setup, or is it only possible between two devices?

I would be interested in a demo of that if it was possible (when said utility has been released ofc)

boarsblood
Posts: 29
Joined: Mon Jan 30, 2012 8:13 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 1:15 am

If I could address Gert for a moment; what's the fastest we could achieve without resorting to the GPU, by any means.

Why is the answer to the "Math Required!" (Not a question; and maths, surely.) always 13?

N.B. Never trust client side verification.

Phil Spiegel
Posts: 210
Joined: Tue Jan 17, 2012 8:17 am
Contact: Website

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 7:59 am

For this car application (daneast's) with 2 sets of screens; wouldn't it be simpler to use the internal video-source switch of the monitor? - albeit under (optional control) of the master unit (and the ignition-off/handbrake on circuit too, of course) ... seems like a CANbus interface would therefore be a useful add-on?

User avatar
riffraff
Posts: 307
Joined: Tue Sep 27, 2011 3:17 am
Location: Newnan, Georgia, US

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 8:57 am

I'm kinda thinking about something similar, but for a different purpose. Thinking about what hardware I could cobble up to permit two Pi's to share a common 1Gb block of RAM through GPIO with one device devoted to program execution and I/O and the other acting purely as a rendering engine.

drgeoff
Posts: 10325
Joined: Wed Jan 25, 2012 6:39 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 10:42 am

riFFraFF said:


I'm kinda thinking about something similar, but for a different purpose. Thinking about what hardware I could cobble up to permit two Pi's to share a common 1Gb block of RAM through GPIO with one device devoted to program execution and I/O and the other acting purely as a rendering engine.


Do you really need the 1 Gbyte of RAM?  If you can make do with much less supplemented by an SD card, a single RP has the CPU for program execution and the GPU for rendering.

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 11:57 am


boarsblood asks:

If I could address Gert for a moment; what's the fastest we could achieve without resorting to the GPU, by any means.


Good question! Long and, I know, unsatisfactory answer coming (You just hit my sweet spot )

So you have to use the GPIOs which means you are limited by their speed. The limiting factor is physical. The input speed of the GPIO's is higher then their output speed so we can concentrate on driving out.

The pads have a maximum drive speed ~100MHz, but that is with no load and it looks more like a sine wave. (Yes, we tried all that)  Also at any high speed you have to look at impedance matching and reflection. The GPIO connector is not ideal as it is a simple dual-in-line header with no controlled impedance.

This implies that ideally you want to use a parallel interface as that give the highest bandwidth. At the same time you want to use existing hardware to handle your data because you do not want your CPU 100% occupied by transporting the data.
Taking all those requirements you will find that the Raspberry-Pi does not have an interface which meets all those demands (Note that I do not say that the BCM2835 does not have an answer. It does, but it is not available on the Raspberry-Pi.)

So you have to compromise and, I am afraid, you have to experiment. I would go for a serial interface as to not load the CPU with getting each bit/byte out in SW. But if somebody wants to try a byte-interface: please try it out. That is exactly what the board is for.

Which leaves the choice between SPI and UART. I have no idea what the maximum serial speed is as it depends greatly on the quality of your connection. So again: you have to try. My guess is that 50MHz is do-able (with good cabling and signal termination) and then you just have to try how far up you can go.

Beware that you have to back-down from your maximum speed as not all devices will have the same characteristics. Also if you realy want to be sure you have to test over temperature as well as voltage.

Final note: As the speed question is likely to appear again and again maybe somebody can clean up my answer and put it in the Wiki.

daneast
Posts: 39
Joined: Wed Feb 08, 2012 6:55 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 4:54 pm

Phil Spiegel said:


For this car application (daneast's) with 2 sets of screens; wouldn't it be simpler to use the internal video-source switch of the monitor? - albeit under (optional control) of the master unit (and the ignition-off/handbrake on circuit too, of course) ... seems like a CANbus interface would therefore be a useful add-on?



The primary reason that wouldn't work for me is that the two outputs can't be driven independently (extended desktop or whatever you want to call it).  Worse, I'm pretty sure I read that the two outputs can't be driven simultaneously to provide mirroring type functionality either, and I also thought that the outputs were not software controlled - IE when you plugged in an HDMI device, the composite output is automatically switched off.  I'm not 100% certain about no mirroring or software control of the output, so you should verify that and not take my word on it.

So if you've got a touchscreen in the front of the vehicle with your media controls, GPS, etc, then if you want to play a video on the rear screens then the front would just go blank (or if I'm wrong and mirroring is indeed possible, then the video would play up front too, which is actually illegal here in the USA, and of course prevents any GPS functionality, etc).

Using two Pis is ideal, because not only can the video work independently, but so would the audio, allowing IR headsets in the back for the kids' video, while those up front can listen to MP3s, etc, out the speakers.  That's how our Nissan Quest's system works for example.

daneast
Posts: 39
Joined: Wed Feb 08, 2012 6:55 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Thu Feb 09, 2012 5:08 pm

I searched the faq, forums and wiki, and this is the best I could come up with regarding mirroring the same video out the HDMI and composite outputs at the same time. It doesn't sound like it's been attempted yet.

http://www.raspberrypi.org/for.....al-monitor

Gert said:

I don"t think that works. Something to do with one shared resource which provides the raw video data. The Analog and HDMI block after that resource need to be in absolute sync. I don't think that is possible.

stormy1
Posts: 60
Joined: Fri Jan 06, 2012 3:44 am

Re: pi pi connectivity bandwidth, without USB or Ethernet

Fri Feb 10, 2012 8:04 am

3 rpi

front computer

rear computer

file server

ethernet switch…..

or



2 rpi connected by a Ethernet crossover cable

front computer >>> rear computer

usb switch to usb hard drive connected to both rPi

http://www.monoprice.com/produ.....8;format=2

These work very well to share a usb hard drive between 2 computers.

Just unmount them before switching.

The second rpi could mount it read only so you would only have to worry about unmounting on the first one.

I would have the fist rpi mount it r/w only when copying data to it.

Then unmount.

It is possible to make one rpi control the usb switch by replacing the switch with a transistor or relay controlled using an io port.

The control link between the 2 can be done a dozen different ways.. from trivial to complex.

netcat would be my knife of choice for sending and receiving commands :}

stormy1
Posts: 60
Joined: Fri Jan 06, 2012 3:44 am

Re: pi pi connectivity bandwidth, without USB or Ethernet

Fri Feb 10, 2012 8:17 am

actually I was over thinking it.

You could use nfs over crossover Ethernet to share the usb hd on one rpi and use 2 rpi instead of a file server or usb switch.

depending on load/speed issues.

daneast
Posts: 39
Joined: Wed Feb 08, 2012 6:55 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Fri Feb 10, 2012 2:00 pm

Using ethernet is definitely the sure-fire way to pull this off.  However, I think that networking multiple r-pis is going to be very commonplace, and if a method exists that avoids ethernet but that can provide similar bandwidth and plug-in-play software support (network stack, etc) then it will be very popular.

To me, ethernet is overkill for directly interfacing a homogenous cluster of these kinds of devices.  Downsides of using ethernet for the sole purpose of networking r-pis that are in close proximity:


More expensive r-pi model required.
Additional hardware (switch / hub) required if networking more than 2 devices. Maybe they exist, but I don't know of any hub that is not massive in size compared to the r-pi.
Bulky connectors and cabling.
Even if only networking 2 devices, a hub would still be required for wan / lan connectivity.
Greater power consumption.

Do r-pis have an additional USB port that is not wired to a connector? If so that might be a good method of coupling two devices together. Still wouldn't solve the problem of 3+ devices without requiring additional complex hardware though (USB hub).

XAPBob
Posts: 92
Joined: Tue Jan 03, 2012 2:40 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Fri Feb 10, 2012 3:16 pm

The "Expensive" model has both Ethernet and Dual USB>

That's one USB port for another network device (wireless maybe, to connect to your house, when you are parked outside, or for your smartphone to connect to as a control mechanism), and one for the USB storage media.  Leaving the ethernet for patching between the two RPis (or you could drop the A model for the second unit and grab another USB->Ethernet adaptor)

Use GPIO to make a basic, "Play, Pause, Skip" set of buttons for the rear seat passengers.

stormy1
Posts: 60
Joined: Fri Jan 06, 2012 3:44 am

Re: pi pi connectivity bandwidth, without USB or Ethernet

Fri Feb 10, 2012 6:48 pm

daneast said:



More expensive r-pi model required.


You are going to want the B model for a media player anyway because of the extra RAM.

It will probably help with the GPS also.

Joel_BENG
Posts: 11
Joined: Tue Nov 11, 2014 1:02 pm

Re: pi pi connectivity bandwidth, without USB or Ethernet

Tue Nov 25, 2014 2:28 pm

How did this project go in the end?

I am trying to get a Raw HD video onto the RPi for my project at university. This was very helpful did you get it working?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: pi pi connectivity bandwidth, without USB or Ethernet

Tue Nov 25, 2014 8:28 pm

I'd suspect it was largely pie in the sky, seeing as the Pi hadn't been officially launched when it was written, and most of the participants in the thread wouldn't have seen a Pi in the flesh
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Return to “General discussion”