0

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

1

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:


| improve this answer | |
  • 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 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 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 at 20:56
  • The Beagle in that picture has a micro or mini port; these are usually slaves or OTGs 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: raspberrypi.org/documentation/hardware/raspberrypi/usb/… I don't actually have a 4 so haven't given this much thought. – goldilocks Jul 29 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: raspberrypi.stackexchange.com/q/102294/5538 – goldilocks Jul 29 at 21:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.