32

I'm trying to connect a single PC with limited storage (Mini ITX) to a much bigger PC full tower that has a lot of hard drive storage. Both machines have USB-C on them so I was just wondering if I can just get a USB-C to USB-C cable to connect them together to begin transferring files? Does USB C act as both host/client? I've seen USB 3 crossover cables so I'd be willing to go with that if it's easier but I'm trying to get the best possible speed on the cheap.

4
  • Paging @AliChen.
    – Spiff
    Jun 3, 2017 at 22:01
  • 1
    Beware that the mere presence of a USB Type-C connector doesn’t necessarily tell us much about what that port is really capable of. Do you have any indication whether or not they’re Thunderbolt 3 ports?
    – Spiff
    Jun 3, 2017 at 22:04
  • Yea after some research I realized it's the TB circuitry that dictates who is client/server based on faux Ethernet IP addresses on the Thunderbolt adapter.
    – Brian
    Jun 5, 2017 at 0:46
  • It appears this question was bumped for some reason in spite of its age, and there's similar questions popping up still. I've seen people successfully transferring data over a USB-C-to-USB-C link but not by any regularly documented means. It will be hit and miss based on the hardware and software involved.
    – MacGuffin
    Apr 22, 2023 at 4:47

4 Answers 4

34

To connect one Type-C device (one PC) with another Type-C USB device (or another PC) and expect some connectivity, at least one of the "Type-C link partners" must support so-called DRD - Dual Role Device. The DRD port advertises its dual role by continuously switching its CC (communication channel) pins from 5.1k pull-down (signifying a USB device) to 56k-22k-10k pull-up (signifying USB host with different VBUS supply capability). It does this flip-flop several cycles per second.

However, to be a DRD Type-C device, it must have TWO USB controllers inside, one of xHCI (host controller interface), and another of "DCI" type - device controller interface. The IO of these two controllers must be multiplexed at the USB port pins. Currently only a few products (notably the Intel SoC aka "atom cheery trail" family, and other mobile-oriented chips found in mobile phones) have this capability. If a PC is made of desktop line of processors, no DRD is available yet.

If both PC are of the same kind, no connection (and no harm) will happen.

If one Type-C PC has DRD functionality, it will pick the phase of its "flip-flop advertising" with the role that is opposite to the connected single-role device. If the connecting device is host, the DRD device will lock as device, and vice-versa. If both devices are DRD, the roles will be selected at random, and later should be switchable in software.

ADDITION (2024), after 7 years of progress in USB connectivity:

With invention of USB4 (and its prototype Thunderbolt 3/4), a concept of PCIe tunnelling (and other protocols) was introduced, which provides an ability of having symmetrical endpoints, similar to Ethernet. As result, modern personal computers with USB4/TBT3/TBT4 support all have an ability of so-called "peer-to-peer" connection, which today is mandatory, with full Microsoft support.

7
  • 1
    If any newer Intel chipsets support DRD/DRP, I will be glad to correct my answer... Jun 4, 2017 at 1:19
  • Thanks for the detailed response. I figured it's just easier to go with a USB 3 transfer cable then since it's very rare to find PC motherboards with native ThunderBolt support unless it's with an addin card variety which wouldn't work for my setup.
    – Brian
    Jun 5, 2017 at 0:48
  • 1
    I found a datasheet for intel 200 series chipsets (Z270 on my motherboard), that states: the USB Host Controller can now be paired with a standalone USB device to provide dual role functionality. The USB subsystem incorporates a USB 3.0 device controller. This controller is instantiated as a separate PCI function and shares USB 2.0 port 1 and USB 3.0 port 1. and furrther: Bus 0: Device 20: Function 1 USB Device Controller (OTG) Whether there are drivers for this I don't know ...
    – Luciano
    Feb 10, 2018 at 17:44
  • 1
    Actually, after messing around on my computer, I found that the abovementioned PCI device is missing (disabled). But it may exist on other, more expensive motherboards. This was on an intel skylake platform.
    – Luciano
    Feb 10, 2018 at 18:03
  • What about Intel Kaby Lake chips, e.g. 8250? Do they support DRD?
    – Suncatcher
    Feb 4, 2020 at 10:06
7

I've been asking myself the same question and discovered a few things.

First is that Apple laptops have had this featured called "Target Disk Mode" for a very long time. This mode is in the computer firmware and allows many models of Apple computers to act like an external drive to another computer. This feature exists in Apple computers with USB-C ports. I've tested this with my own Apple laptop with USB-C ports by putting it into Target Disk Mode and using it like a USB drive to another Apple laptop with a USB-A male to USB-C male cable. Apple does this in firmware but there is no reason I can see why this cannot also be done in the operating system, and done in a way to support more than looking like a storage device.

A second thing I discovered is that the model of USB chip Apple puts in their laptops that are capable of this feat is widely used by other computer makers. There's evidence of this with the "hackintosh" crowd using Apple drivers on their non-Apple computers running macOS and seeing the USB ports working.

A third thing I discovered is that there is a project called "USB Gadgets" which intends to allow a computer running open source operating systems to act like a USB device to another computer. There is an abundance of information on this for USB 2.0 but not so much for the USB 3.x chips seen in newer systems.

A fourth thing I discovered is that USB-C ports used for charging/powering a laptop must enter into device mode for the charging to work. You can see this by plugging a "device" computer, one that takes power in from USB-C, into a "host" computer, one capable of providing power out from USB-C, and every USB-C port in a computer will provide some power. If one were to look at the connected USB devices on the "host" computer the "device" computer will be listed. The negotiation of which direction the power flows, and how much, is done over the data pins of the USB port. Unlike the previous systems that used resistors on the data pins for a very passive means of conveying this information this new protocol requires an actual data connection.

Fifth is that in the USB 3.x spec is a provision for host to host communications by the "superspeed" data pins. This means all four twisted pair data wires in the cable are available for host to host communications, and each is capable of 5 Gbps of data. That means a 20 Gbps connection is possible.

So, if you have two computers with USB-C ports, and a USB-C cable, then the chances are that all the hardware is there to make a 20 Gbps connection between the two. All it takes is one computer to have the right software to support a network device on a USB-C port, and the other to have the right software to emulate a network device on a USB-C port.

If that software exists then I haven't found it. If it does not exist then someone is likely writing it right now.

12
  • 1
    Importantly, "USB gadgets" are not a software-only solution, they still need the device-side hardware (possibly as part of a DRD or OTG port)
    – Ben Voigt
    Oct 13, 2021 at 17:18
  • "then the chances are that all the hardware is there to make a 20 Gbps connection between the two. All it takes is one computer to have the right software" - wrong, the chances are dim as explained in the accepted answer. The computers must have "device-side hardware", as Ben Voigt commented. Oct 13, 2021 at 17:45
  • @BenVoigt " Importantly, "USB gadgets" are not a software-only solution, they still need the device-side hardware (possibly as part of a DRD or OTG port) " The point of my answer is that the device side hardware is common in most laptops on the market today. A laptop that charges from USB-C must support device mode, that is required to communicate with a USB-C charger host. Without device side hardware it cannot charge. With this also comes features like Target Disk Mode, another function that requires device side hardware.
    – MacGuffin
    Oct 18, 2021 at 0:53
  • @Ale..chenski " wrong, the chances are dim as explained in the accepted answer. The computers must have "device-side hardware", as Ben Voigt commented. " For a MacBook to act in Target disk mode it must have device side hardware so the chances a MacBook has the hardware is 100%. The USB-C hardware Apple uses is not unique, many other manufacturers use the same chips which can be demonstrated a number of ways including the "hackintosh" users using Apple drivers to get USB-C to work. There is also a hot-to-host mode in the USB-C and USB 3.x specs to allow this.
    – MacGuffin
    Oct 18, 2021 at 1:05
  • 1
    @MacGuffin: Target Disk Mode requires device-side hardware, USB PD does not. You seem to be assuming that the power provider is always a host and the power consumer is always a device but that is not the case with USB PD.
    – Ben Voigt
    Oct 18, 2021 at 15:43
7

This likely won't help the original poster, but if your PC's both have Thunderbolt, and you have a Thunderbolt cable, it is supported (TB3 and TB4 cables use USB-C connectors but are typically thicker and rarely longer than 50cm).

I just connected two laptops that are on different networks, and a new Ethernet connection appeared and I can browse shared folders and use Remote Desktop from one to the other, without any manual configuration.

One laptop is Windows 10, the other is Windows 11.

PC can be seen via TB3 network connection

Copying a file between 2 PC's via TB3 at 70 MB/s

Thunderbolt 3 Ethernet using just a TB3 cable

I also used a separate USB-C cable to charge the laptop because my other laptop was not charging it via TB3

5

I can confirm that works also on Ubuntu 22.04. I connected a Dell Latitude 7400 and a Lenovo T14 i7 Gen4, both running Ubuntu 22.04, with a USB-C male to male (both supporting USB 3). An Ethernet connection is created automatically. So from there, the rules of any network apply. And the transfer speed depends on the method chosen. FTP is a clear winner in what I tested:

  • FTP : nearly 1 GB / s
  • rcp, rsync (command-line), SFTP: I got transfer rates between 200 and 400 MB / s
  • the same as the above two, but over WIFI (using my smartphone as hotspot): 12-20 MB / s (so plugging it in was worth something :) )
  • SMB (samba), which I understand has a history of being used for local printer networks in Windows, and the transfer rates are similar to what is shown by @Ekus (50 MB/s)

Very brief setup info if that can help someone. I call the computer from which you trigger the transfers the client, and the other the server, or "remote" computer. In only tested transfers from remote to client, so you might say "download". On the remote you need to install the following packages:

  • for FTP: sudo apt install vsftpd
  • for SSH-related protocols (SFTP, rcp, rsync): sudo apt install sshd
  • for SAMBA: sudo apt install samba

On the client computer the simplest is to just use the GUI Files > Other Locations. For SAMBA, the network should appear directly (though I can't remember if I had to setup anything else... anyway that's not the way to go). For the others "connect to server: ", either ftp://169.XXX.XX.XXX (the fastest) or sftp://169.XXX.XX.XXX (slower due to encryption, not needed on a local network obviously). Username and password and here you go.

Note that as I plug and unplug cables, the connection from my older DELL sometimes disappears (not during the transfer, fortunately!). This does not happen on the newer LENOVO. In case this happens, this can be solved by rebooting (suboptimal !) or by following this advice to reset all USB3.1 ports:

for port in $(lspci | grep xHCI | cut -d' ' -f1); do
    echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
    sleep 5;
    echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
    sleep 5;
done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .