You are not logged in.

#1 2017-12-21 08:05:03

KerrickStaley
Member
Registered: 2011-01-26
Posts: 31

File transfer via USB-C <-> USB-C cable

Is there a way to use a USB-C <-> USB-C cable to transfer files between two Linux hosts?

(I'm asking this because I'm interested in learning about USB, not because I want to transfer the files, so please don't suggest using Ethernet or WiFi or something :)

Last edited by KerrickStaley (2017-12-21 17:18:18)

Offline

#2 2017-12-21 13:51:37

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: File transfer via USB-C <-> USB-C cable

Mod note: moving to kernel/hardware.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2017-12-21 14:01:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: File transfer via USB-C <-> USB-C cable

Are you asking if it's possible, or if there are any out-of-the-box nicely polished 'apps' to do so?  In case of the latter, I don't think there is (yet).  If you are asking it it's possible - certainly.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2017-12-21 17:22:43

KerrickStaley
Member
Registered: 2011-01-26
Posts: 31

Re: File transfer via USB-C <-> USB-C cable

Asking whether it's possible, and for some pointers on how to do it. It's OK if I have to write some custom code (even a custom kernel module, although if it could be done with a userspace program without modifying the kernel that'd be great).

Offline

#5 2017-12-21 17:38:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: File transfer via USB-C <-> USB-C cable

Actually I may have spoken a bit too soon.  It does depend a bit on the computers themselves.  It is possible (and I would hope likely) that usb-c ports will be dual-role, but this is up to the hardware manufacturer, and it is possible for the usb-c ports on the computers in question to be host-only.  If either computer has a dual role port, then this can be done fully in software, but if both systems are host-only, then there may need to be another device on/in the cable if you actually want to use the USB protocol.

Of course depending on just how low-level you want to go, you could still hijack the wires and send your own data over them, but in this case you'd not be augmenting the kernel, you'd be working around it to such an extent that you may just need to write your own kernel and usb-protocol replacement.  So while not impossible it's so far from practical that it may as well be.

I've not yet had a chance to mess with usb-c systems, so I don't know if most computers are wired for host-only or not.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-12-21 21:00:33

KerrickStaley
Member
Registered: 2011-01-26
Posts: 31

Re: File transfer via USB-C <-> USB-C cable

The computers are a Dell Precision 5520 and a Dell XPS 13 9560 if that helps. Both are recent (2017 models). The Precision 5520's USB controller is a "Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)" (output from lspci).

Offline

#7 2017-12-21 21:09:52

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: File transfer via USB-C <-> USB-C cable

Have you tried a google search for this topic? I get several hits describing problems and possible solutions.

Offline

#8 2017-12-21 21:16:26

KerrickStaley
Member
Registered: 2011-01-26
Posts: 31

Re: File transfer via USB-C <-> USB-C cable

I've checked Google and I didn't find any solutions for this. If you found a website describing how to do this, it'd be awesome if you could link to it here.

Offline

#9 2017-12-21 22:08:52

seth
Member
Registered: 2012-09-03
Posts: 51,017

Offline

#10 2017-12-21 22:55:48

KerrickStaley
Member
Registered: 2011-01-26
Posts: 31

Re: File transfer via USB-C <-> USB-C cable

seth: that's not what I want to do. I want to use an ordinary USB C <-> USB C cable, without any additional hardware, to connect the computers.

Offline

#11 2017-12-21 23:34:39

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: File transfer via USB-C <-> USB-C cable

I know - and the linked page even explains *why* that doesn't work.
You cannot simply plug two usb hosts together with a dumb cable and magically transfer data.

Offline

#12 2017-12-22 01:23:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: File transfer via USB-C <-> USB-C cable

seth wrote:

You cannot simply plug two usb hosts together ...

This is what I was getting at.  With pre-USB-C devices, the host was always the host.  USB-OTG started changing this up, and USB-C opens up the possibilities even more.

There is nothing about USB-C that defines which end of the cable is the host, and so a USB-C socket can just as readily be used as host or slave.  Whether or not PC hardware with USB-C sockets only include host wiring, I have no idea, I'd hope not, but also would not be surprised.

So I suppose the answer to this question is: Yes that is certainly possible with a USB-C cable.  But it may or may not be possible with the USB-C socket on your computer.

Last edited by Trilby (2017-12-22 01:24:27)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2017-12-22 08:00:52

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: File transfer via USB-C <-> USB-C cable

otg is from 2001 ;-)

you need at least one drp, it will magically switch its role and the other device (remaining host) should register a new usb device.
you might be lucky with the xps to be drp, but i would not hold my breath.

Offline

#14 2017-12-22 09:01:41

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: File transfer via USB-C <-> USB-C cable

Dunno about usb-c,  but with usb 2.0 you needed the bridged cable, which is also known as a USB networking cable which acts as ethernet device but with usb speeds


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

Board footer

Powered by FluxBB