0

Is it possible to SSH connect via USB-C -> USB to Rasberry Pi 4 in Ubuntu? Like this

goldilocks
  • 56,430
  • 17
  • 109
  • 217
Nikta
  • 1
  • 1
  • 1

1 Answers1

2

EDIT: Apologies - I mis-read your question, and what follows is a revised answer. It also turns out that a full answer to your question is a bit more complicated than I thought initially. I'm going to leave this answer here, although it's probably less an answer than a guide for further reading. Please let us know if you have further questions.

The Pi Zero has an additional USB connector (in addition to the one for Power, see figure below) that supports the functionality described in your link. The Pi4 has only one USB-C connector.

Pi Zero USB ports

However, based on this discussion, the Pi4 supports the OTG specification on its USB-C connector. In summary, the forum participants reported the Pi4 supported full networking over the USB-C connector via use of the g_ether option. Some of the forum participants also reported that access to the SD card could be problematic. CAUTION: You really should read the entire thread if you're keen to try this. This "how-to guide" may also be useful in getting this feature working on your RPi 4.

In response to your question then: "Is it possible to SSH connect via USB-C -> USB to Rasberry Pi 4 in Ubuntu?"

I'll answer it this way for now:

As a general proposition, "Yes - it is certainly possible", and given the forum discussion referenced above, I would say it seems almost certain. I hedge here only because I've not yet tried this myself on the Pi4.

It further seems likely because Ethernet-over-USB has been around for about 20 years, and was built into the Linux kernel some time ago - this is not new technology! Also, there are several embedded devices that have been on the market for some time that successfully employ this technology - this "pocket Beagle" device for example:. Like the RPi it uses ARM-based SoC processor, but is built without serial ports, WiFi, BT or Ethernet; it relies on Ethernet-over-USB exclusively for all external communication. I have used this device, and know first-hand that Ethernet over USB works.

pocket beagle

FWIW, this question has gotten a fair amount of play here on RPi SE. Here are a few you may find useful:


Seamus
  • 18,728
  • 2
  • 27
  • 57
  • Do you know whether the USB-C port on the Pi 4 can be used this way? I am not so sure... the zero has a fully functional OTG port, I think it is the only model with one operational. Note you can't just do this with any old pair of ports. – goldilocks Jul 29 '20 at 20:00
  • @goldilocks: Clarification first: The link in the OP, and I assumed the question, concerned a Pi Zero. Wrt Pi 4, the (partial) Pi4 schematics don't show me that the USB-C connector connects the data lines in a way that might support this - but I'm guessing mostly. However, Pi4 does have other USB connectors that could be used... do you see it differently? – Seamus Jul 29 '20 at 20:16
  • If you mean the normal USB ports, that's my point: *No* you cannot use them that way; it is not just a matter of whether there are data lines. USB is asymmetrical, and (excepting the zero OTG) pretty much all the ports on a Pi are *masters*. As are the ones on your laptop, etc. You cannot connect a master to a master. In fact w/ standard USB-A ports you may cause damage this way -- which is probably why male-to-male cables are usual: they don't have much purpose. If you find one, you can test that premise by plugging two laptops together! >_ – goldilocks Jul 29 '20 at 20:56
  • The Beagle in that picture has a micro or mini port; these are usually slaves or [OTGs](https://en.wikipedia.org/wiki/USB_On-The-Go) like on the zero. That said, here's a promising bit: *"The OTG hardware present on previous models of Pi is still available and it has moved to a single connection on the USB-C port. The OTG hardware is intended to be used in device-only mode on Pi 4."* From the horses mouth: https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md#overview I don't actually have a 4 so haven't given this much thought. – goldilocks Jul 29 '20 at 21:02
  • Unfortunately though, the "OTG hardware present on previous models" is I think hamstrung in practical terms. Meaning either not really usable, or very awkwardly so. But the USB-C port available may change that, see also: https://raspberrypi.stackexchange.com/q/102294/5538 – goldilocks Jul 29 '20 at 21:05
  • @goldilocks: Yes, I'm aware that there is a *computer-device* relationship in USB 2 & 3, and that's enforced by the physical differences in the two ends of the cable. But I was under the impression that has fallen by the wayside in USB-C implementations - do you know differently? Bottom line: After re-reading the question, I think my answer needs a major edit :) I'm working that now. – Seamus Jul 29 '20 at 21:10
  • @goldilocks: Just read your last cmt re "OTG". That's a very interesting twist on this. I've followed a couple of links that led to [this answer from @jdonald](https://raspberrypi.stackexchange.com/a/73911/83790), and perhaps more relevant to the Q&A here this post re [Very simple OTG on pi4](https://www.raspberrypi.org/forums/viewtopic.php?t=243966). Wow! Looks llke more edits are needed... or you could flag this as a `duplicate` with a pointer to [the answer from @jdonald](https://raspberrypi.stackexchange.com/a/73911/83790), WHADDYA' THINK?? – Seamus Jul 29 '20 at 22:51
  • Looks like someone else took care of things! – goldilocks Jul 30 '20 at 14:20
  • @goldilocks: Yeah, I shouldn't have put any more time into this answer. It's got some useful information that's not in the other answer, but it does need still more work I think. Should I move this answer to the [other question](https://raspberrypi.stackexchange.com/questions/100583/where-is-the-usb2-otg-port-on-the-rpi-4-model-b-located)? – Seamus Jul 30 '20 at 22:03
  • Up to you. You could put what's not in that Q&A already into your answer there and then just leave this as is. – goldilocks Jul 31 '20 at 14:15