Can SATA be used to connect computers?

Can SATA be used to connect two computers together, just like a crossover Ethernet cable would do ?

I know SATA has no "networking" features and even though a controller may have multiple ports, the drives don't "see" each other, and that in SATA one device acts as the host (the computer) and the other device is some kind of "client" (the storage drive).

But still, did anyone attempt to make a kernel module that would make one computer appear as a "client" (so that the host's SATA controller detects it as a standard hard drive) and then set up like a pseudo-Ethernet link or a very high speed serial link (and then run pppd on it and do networking) ?

Note : I know this is an unprofessional and totally stupid idea, I'm just asking out of curiosity.


Solution 1:

Having briefly looked at the SATA spec, I was initially hopeful as SATA doesn't only talk to disk devices, it can also talk to drive enclosures.

However it looks like it is not possible to use SATA to connect two computers together, mainly because it is a host/device topology. This means the host sends a special "host-to-device" command, and the device sends different "device-to-host" commands back.

There are generic bidirectional "data" commands which could be used for exchanging packets, however I suspect these would have to be preceded by the correct "host-to-device" request and an appropriate "device-to-host" response. I am guessing that PCs cannot send "device-to-host" messages (since they are the host) which is what this would require, but I could be wrong on this point. If it's possible for a PC to send a device-to-host command then yes, you could establish a host-to-host link over SATA.

However even if you could do this, you would also no doubt require custom cables, as using standard SATA cables would mean both PCs are transmitting on the same wire pair, and both are receiving on the same wire pair (where nobody is transmitting, so they'll never receive any data!) You would need to hack up the SATA equivalent of an Ethernet crossover cable, which swaps the TX and RX lines.

I think this problem closely mirrors that of USB. You can't connect two computers together with a bare USB cable, because they are both hosts with no devices to talk to. However there are USB devices that receive data from both hosts and pass it along so that each host's USB controller thinks it is talking to a device (which technically it is), allowing host-to-host communcation over USB.

It would be possible to do the same for SATA, where you have a device that both host controllers connect to, and they each think they are talking to a device. You'd still need custom drivers to make the SATA device appear as a network device, but it would be workable.

However this would only be useful for very short range connections, as SATA has a maximum cable length of one metre. So with your special SATA translator device in the middle, your two SATA ports will have to be less than two metres apart (including the distance to get from the motherboard or expansion card to the outside of the case.)

Solution 2:

Nope, as it's a storage protocol. But PATA can (sort of). And PCI Express can.