6

I have a Pi Zero that I would like to use to communicate with a B+. In theory I can connect an adaptor cable and a WiFi or Ethernet USB dongle to the Zero, and do the same on the B+.

However, as an alternative, it is theoretically be possible to connect the two together either using USB or GPIO (e.g. off the top of my head, using PPP over the serial).

I would imagine the following may exist:

  • USB to USB (with special hardware & kernel drivers) - up to 400 Mbit/s

  • Serial to Serial (e.g. PPP) - up to 3.5 Mbit/s (Raspberry Pi: Increase UART speed)

  • SPI (with additional hardware) - ?? Mbit/s

  • I2C (with additional hardware) - 30 Mbit/s (What bitrate can I get from an i2c bus?)

  • Bit Banging GPIO - ?? Mbit/s

  • USB/Ethernet - 400 Mbit/s - e.g. with a USB 2 Gigabit Ethernet Adaptor - are there any already supported by the kernel, or use pi compatible drivers?

Could you confirm if they do exist, and if there are mature implementations (e.g. can be relatively easily used to transfer IP datagrams).

I am looking to implement a backup camera (camera on the zero, screen on the B+) so would need to transfer a fair amount of data fairly quickly.

xirt
  • 173
  • 1
  • 6

1 Answers1

1

Based on similar experimentation I'm going to second the conclusions in the link about UART, namely, at 1 Mbps it is reliable, above that less so.

If you want speeds that are anywhere near networking speeds, you need to use a networking interface -- ethernet or wifi. That you want to do datagram based transfers pretty much locks that down.

Something missing from your list is connecting the Zero to the B+ via USB as an OTG ethernet gadget, which means:

  • No additional hardware needed besides a standard microUSB cable.
  • High speed (100 Mbps+).
  • IP network based.

In light of that I don't see any point in monkeying around with the sketchy, and in context much more awkward, GPIO based options, none of which even promise anything like 100 Mbps anyway (although as a caveat I'll admit while I use the eth gadget setup, I have not payed enough attention to say exactly what the max transfer rate is -- but there's no reason to believe it should fall short).

You will find many explanations of how to configure the ethernet gadget setup here and elsewhere online, including the Foundation's own docs. It is simple enough from there to test how fast it potentially is.

goldilocks
  • 60,325
  • 17
  • 117
  • 234