0

I've recently bought a new laptop. My old one has the traditional USB ports and my new one has a USB type C port.

If I connect the traditional USB end of my cord into the old laptop and the USB-C end of my cord into the new one, will I successfully be able to transfer files from one device to another?

If I can do this, what will this look like, on-screen?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Spring
  • 1
  • 1
  • 2
  • 1
    You would need a USB file transfer app on each end. Easier by far (vastly easier) to connect by Ethernet or Wireless and use TCP/IP. Folder sharing setup would be the same either way. – John Oct 09 '21 at 23:10
  • It all depends on the device and the supported applications and possibly the OS. Meaning there is no guarantee what you are trying to do can happen. – Giacomo1968 Oct 09 '21 at 23:24
  • 1
    Generally, *no*. though there are special-purpose ways, e.g., https://www.easeus.com/pc-transfer/file-transfer-from-pc-to-pc-usb.html . – DrMoishe Pippik Oct 10 '21 at 01:11
  • USB nodes are either host or devices. Host set the timing and initiated commands to devices. Devices wait patiently a command from a host and then answer to it. This is why we have type A and type B socket which in principle avoid connecting 2 host together or 2 devices together. With type C, the connection of 2 hosts seems electrically possible, but we still have the issue of the roles each node should have. See https://superuser.com/questions/1215710/is-it-possible-to-connect-two-pcs-via-usb-c for a more complete answer. – Frédéric Loyer Oct 09 '21 at 23:17
  • @DrMoishePippik, you should expand your comment into full answer, it will be useful for many people. – Ale..chenski Oct 10 '21 at 20:31
  • @FrédéricLoyer, USB3.x specifications do not define host-host communication, it is only one host, another as device, and usually PCs do not have data device function. USB4, however, does define Host-to-Host mode, but you will need to wait a little bit to have these kind of PCs. – Ale..chenski Oct 10 '21 at 20:34
  • Yes, host-host mode is not defined, but the link I propose indicates a DRD function which permits an host to switch to a device mode. It is similar with On-the-go smartphones, but I don’t think DRD host/devices are quite common (and we need a software to make use of it!). Note : there exist USB A to USB A cable designed to permits PC to PC transfer. – Frédéric Loyer Oct 10 '21 at 20:48
  • Virtutally all laptops shipped in the last 15 years have ethernet and/or wifi. Other than academic curiosity, is there a reason why USB is the method of choice here? – Yorik Oct 15 '21 at 17:47
  • @Ale..chenski " USB3.x specifications do not define host-host communication " Yes, they do. Host to host communications has been in the USB 3.x spec since USB 3.0 in 2010. – MacGuffin Oct 20 '21 at 00:14

2 Answers2

0

Since you have Type-A to type C cable, it means you have Type-C end with function "USB host". When A-end of the cable is plugged into your old laptop, the cable will look like USB Host to the other device.

Now, when you plug the C-end into your "a new laptop", the effect will depend on which specifically "the new laptop" is in question. I can't say much about Intel-based or Mac-based laptops, but AMD Ryzen-based laptops do not have hardware to act as USB device, so the answer is NO, no data connection will happen at all, and no software can fix this.

Ale..chenski
  • 12,414
  • 4
  • 35
  • 46
  • USB host to host communication has been defined in the USB 3.x spec since 2010. There is a software fix for this, at least in theory. Dual role ports might make things easier but they are not required. – MacGuffin Oct 20 '21 at 02:23
0

If I connect the traditional USB end of my cord into the old laptop and the USB-C end of my cord into the new one, will I successfully be able to transfer files from one device to another?

Depends on the laptops. I was able to do this with a pair of MacBooks. I booted the MacBook with USB-C into disk mode and then connected it to the MacBook with USB-A by a common USB-C to USB-A cable.

If I can do this, what will this look like, on-screen?

The MacBook with USB-A saw the MacBook with USB-C as an external USB drive.

The hardware for USB-C dual role ports are not unique to Apple hardware. Looking into the USB chips in most any laptop with USB-C ports will show that they use the same chips as Apple, and so should be capable of acting as a device with the right software. Even then this master/slave relationship not required for two computers to communicate by USB-C, a peer/peer system has been defined in the USB spec long ago.

Host to host communications by USB-A to USB-A cable has been in the USB spec since USB 3.0 in 2010. Use of USB-C on one computer, or both computers, isn't going to remove this functionality.

With USB-OTG in 2001 came the concept of a dual role device, and the dual role mini USB-AB port to make it work. USB-C brought dual role with more bandwidth in 2014, and this port became ubiquitous not long after. Oh, and micro USB-AB ports with the extra USB 3.x pins could bring dual role and gigabits per second too, I just didn't find the date that happened right away. It must have been introduced about the same time as USB 3.0. With a dual role port comes more options, like one computer pretending to be a USB drive. Apple took advantage of the dual role feature of USB-C but it seems nobody else has.

There is software to move data by USB from one computer to another but they will use a cable with an electronic lump in the middle. Well, it's not really a "cable" anymore with all the electronics in it, it's a two port USB device but it looks and acts like a cable to most people. These cables have become much faster and lower cost recently but the software I've seen for these cables are just horrible. The software I've seen looks like some FTP program from the 1990s. But then maybe I have not seen the latest options, and they have improved the user experience.

The electronics in these USB data transfer cables are all pretty much identical regardless of who's name is on it or where it was purchased, and some people wrote drivers in Linux to make them look like a standard network interface. If using Linux and one of these cables then it looks like an Ethernet connection, and people using them can transfer data with any of a number of means. That includes FTP programs from the 1990s.

There's documentation on how to set up USB ports for host to host communications with Windows and Linux but they are for outputting kernel debugging logs, not general purpose data transfer. To get software that allows for data transfer, and usable by the minimally skilled computer user, should only take someone sitting down to write it. Why isn't this a feature in every desktop OS by now? I have my theories but it would be nice to get a definitive answer.

I see questions like this come up often, and many people give the wrong answer on why it doesn't work. Any computer with ports that follow the USB 3.x spec has the hardware for USB host to host communications by a passive cable. This is a software problem, not a hardware problem.

MacGuffin
  • 1,246
  • 5
  • 13
  • "booted the MacBook with USB-C into disk mode" which means the MacBook drives the USB-C port in client mode, and simulates a USB-storage device. It doesn't do "host-to-host communication". "Host to host communications by USB-A to USB-A cable has been in the USB spec since USB 3.0 in 2010." But I've never seen hardware actually using this part of the spec. (For MacBooks, you can also use Thunderbolt alternate mode on USB-C and connect two MacBooks with a USB-C-to-C cable; then it simulates an ethernet connection. But still no host-to-host commuincation). – dirkt Oct 20 '21 at 07:41
  • Right, I gave a master/slave relationship example and then flipped to peer/peer relationship to show master/slave is not necessary for this to work. I can't rewrite now but I'll try to remember to come back to clarify my point later. Thanks. – MacGuffin Oct 20 '21 at 11:46
  • The thing is that I see the argument "but host-to-host USB is part of the spec" popping up frequently, but I've never found anything that actually **does** this. So maybe giving the impression "it's in the spec, so it totally works" doesn't match the reality of available USB controllers, and therefore I think this argument shouldn't be used (because others will believe it, and just copy it). – dirkt Oct 20 '21 at 11:50
  • @dirkt Saying USB-C to USB-C communication is impossible is not true, saying it's easily done is not true either. It is possible, and it is demonstrably possible. This is a software problem that has not been solved to where it is plug-n-play for the average user. I don't know what you want to see as an answer, I don't see anyone giving the wrong impression. There is nothing wrong with people believing this and spreading it along because as I see it this should prompt someone to write the software to make it work more easily. – MacGuffin Oct 22 '21 at 23:02
  • I'd be really really interested in seeing a demonstration of where USB host-to-host works. In particularly I am interested in the vendor and model of the USB host controllers used, and their datasheets, and how to configure it in the OS. If you have this information, and if you could provide it to me, I'd be very thankful. – dirkt Oct 23 '21 at 06:10
  • @dirkt Here's a link to Microsoft describing how to set up a USB A-to-A connection for kernel debugging: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-a-usb-3-0-debug-cable-connection Here's a description for Linux: https://www.kernel.org/doc/html/latest/driver-api/usb/usb3-debug-port.html The way it's described in the Linux documentation is that this is a generic serial connection and kernel debugging is just one application. – MacGuffin Oct 24 '21 at 03:27
  • 1
    No, this is using the Debug Port feature of the USB controller on the integrated chipset. It's **not** host-to-host communication. And this is exactly what I am talking about: You see some way of "connecting two computers with USB", and then you **think** it's host-to-host communication, because you don't understand the details. So you think host-to-host communication is somehow easily doable. But it's not, it's all something else. And then this idea gets spread via answers like "but host-to-host communication is in the USB spec, it's all there". – dirkt Oct 24 '21 at 15:25
  • @dirkt " So you think host-to-host communication is somehow easily doable. But it's not, it's all something else. " I did not claim this to be easily doable. I claim it can be done, that it is a software problem and not a hardware problem. USB kernel debugging is host-to-host communication by USB, there is no reason this cannot be extended to other purposes as it is creating a generic serial port between the two computers. Can you explain why this cannot be used to create means to transfer files or create a network? – MacGuffin Oct 24 '21 at 17:55
  • 1
    "that it is a software problem and not a hardware problem." And this is wrong: it's a hardware problem. The USB controller (at least the ones I know) cannot do generic host-to-host communication. "there is no reason this cannot be extended to other purposes" Your links refer to the Intel xHCI implementation section 7.6, I encourage you to read it. It's "completely independent of the xHCI interface described in the other sections", "automatically assigned to the first xHCI Root Hub Port [with some conditions]" (so you can't use it in any port), it uses an asymmetric ... – dirkt Oct 25 '21 at 04:39
  • 1
    ... "Debug Host" and "Debug Target" tree, just like the usual USB host and USB client, and "On the Debug Target, the Debug Capability Driver is completely independent of the OS Stack (USB Bus Driver, xHCI driver, etc.). The Debug Capability Driver is expected to be loaded immediately after POST so that the OS stack can be debugged." which means the target is either put into debug mode by the BIOS/some BIOS replacement, or it isn't. The "creating a generic serial port" you quickly googled is a **very** simplified description that lead you astray. – dirkt Oct 25 '21 at 04:42