Connecting two computers with USB (USB - USB) - Page 1
Forum section: electronics / beginners

author: mtbolha
author_rank: Contributor
timestamp: October 17, 2013, 08:45:04 pm
content: Hi,I have tryed to connect my laptop with my desktop computer by using old usb cables that I have cut and soldered togeather, so that both ends are the same and fit into classic 2.0. USB port, but nothing happens when I connect it.First time i have soldered the USB cables like this: + Data+ Data- -after that I have chagled the polarity in data connection: + Data- Data+ -Nothing happens as I did not even pluged in the cablesI have seen that you can buy allready made cables, that include a chipset in the middle that controles the cable. But what can this chipset do more smarter then some program or driver on both PC cannot do? I'm supprised that this does not work. Or does it work and I'm doing something wrong?

author: r3l3u
author_rank: Newbie
timestamp: October 17, 2013, 09:00:50 pm
content: come on ! are you serious with this ?

author: MinK
author_rank: Contributor
timestamp: October 17, 2013, 09:01:07 pm
content: In general it is bad idea to connect two switching power supplys. In your case USB +5 V to other USB +5 V.

author: Simon
author_rank: Unknown
timestamp: October 17, 2013, 09:02:59 pm
content: The usb protocol is based on a host/client system. you will find that any device that does both has two separate ports (like a printer). I did here of a new type of protocol for the ports that allows two hosts (computers) to talk but as of yet (10ish years later) nothing has emerged as a standard. You can't do it the way you are trying unless you can rewrite the protocol and/or driver for the usb chip. So the solution was those cables that adapt the signals so that the two can talk.

author: Zbig
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:08:12 pm
content: I have lost my laptop power supply so I've just cut a cable from the lamp in half, shoved the bare wires into the laptop and it's gone PUFF, smoke, sparks and all. I noticed that there was something inside the original power supply but come on, what could it do anyway? I'm sure the laptop should be smart enough to deal with that, furthermore I've just installed new Windows 8.1 on it today. I have no idea, how this could go wrong?

author: Zbig
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:11:30 pm
content: Quote from: Simon on October 17, 2013, 09:02:59 pmI think the standard you're talking about is USB OTG (On-The-Go). It's already in the wild since some time, that's how many smartphones can act as USB hosts using just an adapter.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:14:21 pm
content: There are special cables to connect two computers through USB.Just google how to connect two computers through USB.David.

author: Simon
author_rank: Unknown
timestamp: October 17, 2013, 09:16:29 pm
content: Quote from: Zbig on October 17, 2013, 09:11:30 pmYep that is the one.

author: Zbig
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:23:34 pm
content: Quote from: Simon on October 17, 2013, 09:16:29 pmWell, it's here and it's real, then. That's how you can connect a USB mouse or flash drive to the Android tablet, among other things. It's fully specified and it uses some nice tricks to detect when to begin to source power.But back to the point,mtbolha: splicing and soldering random things together is not the way to go. There's a very good reason this cable didn't fit two computers at once originally as there is an equally valid reason that the PC-to-PC USB transfer cable has some circuitry inside.Generally, it makes one computer a "master" (USB host) and the other one a "slave" (USB device).Scratch that, I feel I'm confusing things further and this is not the proper explanation as both PCs are USB hosts technically. Enough to say there's some relatively advanced trickery going on the protocol (not bare wire) level and possibly some supporting software on the OS level as well (unless one PC presents to the other as a Mass Storage Class device).

author: hans
author_rank: Super Contributor
timestamp: October 17, 2013, 09:36:42 pm
content: First of all, Data pins are bidirectional so there is no need to change to + and - pins. You just made a '0' an 1 and an 1 a '0'.In USB there always is a master and a slave. The master is for example a PC. The slave is your mouse, USB stick, etc. The master initiates everything, the slave just has to implement the right messages and let the PC know what it's capabilities are.Moreover, the slave has a pull-up resistor on one of the data pins to let the PC know it has been attached. Depending on the USB speed, this is on DATA+ or DATA-. Without this pull-up, nothing happens as the master isn't notified a device has been attached.However if you would add this pull-up then both PC's see a device being attached simultaneously. They don't know how to talk the USB OTG as of today (don't think they will implement this anytime soon , neither). So.. this still wouldn't work because one PC isn't going to play master, and the other is going to play as a slave.If you want 2 computers directly talking to each other, use ethernet crosscable... or your normal network.

author: mariush
author_rank: Super Contributor
timestamp: October 17, 2013, 09:44:15 pm
content: There are USB cables that can connect two computers together, but those are not PLAIN usb cables.Inside them there's a chip or a couple of chips that work like network cards ... each end of the cable simulates a network card connected to the computer through the USB cable and both network cards are connected together as if there was a crossover cable between them.If you just connect two usb cables together, in the first place you're just going to get 5v from both computers "fighting" on the cable ... if one PC outputs 5.1v on the usb jack, and the other PC outputs 4.9v do you think the computers are gonna like what happens?Just imagine two of these connected together with a virtual network cable (which is directly on the pcb instead of having connectors :http://www.ebay.co.uk/bhp/usb-to-ethernet-adapter

author: Zbig
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:49:45 pm
content: Quote from: hans on October 17, 2013, 09:36:42 pmFirst off all, not reallyUSB uses differential signalling and Data+ and Data- form a differential pair. It's not like "+" is 1 and "-" is 0 or something.Quote from: hans on October 17, 2013, 09:36:42 pmI think it's not good to confuse OP with pulluptransistorsresistors(geez, I think I'll just shut up now and go to sleep), etc. This could only lead him to false assumptions that all he needs now is just some resistor or two. I think at this stage it's enough to say there are multiple abstraction layers in USB implementation and USB in general is infinitely more complex than your garden variety serial interface.

author: Zbig
author_rank: Frequent Contributor
timestamp: October 17, 2013, 09:53:14 pm
content: Quote from: mariush on October 17, 2013, 09:44:15 pmA-ha, so that's how they solved it software-wise. Dzieki

author: hans
author_rank: Super Contributor
timestamp: October 17, 2013, 10:07:42 pm
content: Quote from: Zbig on October 17, 2013, 09:49:45 pmThe differential voltage on the USB pair is applied wrong way around, in which I make the assumption the digital bits are inverted as well.At any way, it's not intended to be connected this way.QuoteThere are multiple stages of why I see this is failing, and one is because there is no pull-up resistor.If he did try this a PC would likely say 'enumeration failed' (which can be a protocol error), blow up or do nothing at all.If I am confusing the OP, I need to try harder at explaining.

author: Noize
author_rank: Regular Contributor
timestamp: October 17, 2013, 10:44:18 pm
content: I bought a cable years ago to transfer files by usb from one computer to another. It was different from the normal cable, as in crossed over. I'll have to have a look for it, because I don't remember it having larger than norm plugs to hold a chip.

author: fluxcapacitor
author_rank: Frequent Contributor
timestamp: October 17, 2013, 10:45:01 pm
content: Ive got an old usb transfer cable, the main chip is a Prolific PL-25A1 USB Host To Host Bridge Controller .Cutting and splicing old usb cables just isnt going to work .http://www.datasheetdir.com/PL-25A1+USB

author: magnus0re
author_rank: Contributor
timestamp: October 17, 2013, 10:51:22 pm
content: Indeed USB works as a Host <-> device thing, so as everyone has said before me, Host <-> Host does not work..Going to use this chance to generally complain about the USB standard. I am not happy, not at all. Does firewire work better ? if so, how?

author: Stonent
author_rank: Super Contributor
timestamp: October 17, 2013, 11:05:17 pm
content: Quote from: mtbolha on October 17, 2013, 08:45:04 pmUSBThere's a cable called an easy transfer cable that you can use for moving data from a vista/7/8 computer to another.But USB is not an RS-232 serial cable so this won't work as you're trying to do it. Neither computer is a "device" so even if the electrical connections were sound, they won't talk.

author: echen1024
author_rank: Super Contributor
timestamp: October 18, 2013, 01:00:02 am
content: Will someone just shoot me.

author: MauriceS
author_rank: Contributor
timestamp: October 18, 2013, 02:27:48 am
content: Instead of blowing up stuffthere might be a much simpler - and cheaper solution... And that is the use of a regular or crossover ethernet cable. I think a lot of laptops still have ethernet... Which might not be as fast as USB 2.0 if it just is 100BaseT...When hooking 2 windows machines together - both will get an IP address in the 169.254.x.x range and then can talk together... Look for network transfer software...

author: echen1024
author_rank: Super Contributor
timestamp: October 18, 2013, 02:30:16 am
content: You can hook 2 windows machines up together via Ethernet. I have tried before, and the limit is basically the speed of the hard drives if both computers support gigabit.

author: Stonent
author_rank: Super Contributor
timestamp: October 18, 2013, 02:47:40 am
content: Yeah if both computers are set to DHCP and there's no DHCP server, they'll pick a random address that will let them talk. Crossover cables can be bought at most computer stores.

author: Nerull
author_rank: Frequent Contributor
timestamp: October 18, 2013, 03:30:20 am
content: Any computer from the last several years isn't going to need a crossover cable. Autosense has been around since 1998, and almost everything implements it by now.It's pretty rare to actually see a crossover cable anymore.

author: Monkeh
author_rank: Super Contributor
timestamp: October 18, 2013, 03:35:58 am
content: Quote from: Nerull on October 18, 2013, 03:30:20 amThere's still stuff with 10/100 NICs, which don't generally do Auto-MDI/MDIX. Then there's the fatal assumption of assuming it'll work even if present.

author: Nerull
author_rank: Frequent Contributor
timestamp: October 18, 2013, 03:48:50 am
content: Many 10/100 nics do autosense. Controllers that didn't support it started vanishing around 2000/2001.Sure, it's possible you'll still find one in use. But most people won't. There's certainly no reason to run out and buy one before trying a regular cable you probably have lying around.

author: Monkeh
author_rank: Super Contributor
timestamp: October 18, 2013, 03:51:42 am
content: Quote from: Nerull on October 18, 2013, 03:48:50 amThe 8139 is still doing the rounds, never has supported Auto-MDI/MDIX.But I agree, always try first.. usually one end will end up supporting it. Just hope you don't run into those odd configurations where a link just won't be established between two gigabit NICs.

author: amyk
author_rank: Super Contributor
timestamp: October 18, 2013, 12:04:16 pm
content: I can't remember exactly which one it is (it's the one with simpler hardware) but either UHCI or OHCI will let you interact with the hardware non-standardly to enable communication via a direct cable connection. Of course this requires the appropriate driver software, which is going to be difficult to implement unless you're writing your own OS.

author: redben
author_rank: Contributor
timestamp: October 19, 2013, 09:20:26 am
content: The way to go is to use a simple USB Hub.Inside those devices there are some logic chip which transfers the datas correctly.Ti is basically the same as plugin two computer with an ethernet cable together.You have to use a crossover ethernet cable OR an hub which will do that automatically.

author: Monkeh
author_rank: Super Contributor
timestamp: October 19, 2013, 01:59:41 pm
content: Quote from: redben on October 19, 2013, 09:20:26 amNo, that won't work.

author: mtbolha
author_rank: Contributor
timestamp: October 21, 2013, 07:32:16 am
content: Hehe, thanks guys for explaining, did not expect this much of replys. I'm a beginer so I experiment things.. Maybe I get lucky and invent some hack that all of you think its imposiblePC is smart, it can be programed for many things, I know now that its imposible to do what I wanted but I think this should be possible, printers, mouses and other slave devices have slave usb receiver/transmiter, PC has a master usb receiver/transmiter I get it now. Master has to be connected with Slave in order to work.For this purpose is best to use LAN if you want to trasfer files, just to let know if someone reads this post in future.I have connected 2 computers over normal LAN cable, everything detected automaticly (as both computers was allready registred to same workgroup in windows) and just went to my network places, and took all the files I've needed from one computer to another.So best PC-PC connection for me is direct cable LAN

author: BravoV
author_rank: Super Contributor
timestamp: October 21, 2013, 07:37:31 am
content: Quote from: mtbolha on October 21, 2013, 07:32:16 amFor cheap, reliable and pretty fast (assuming you're using GB NIC), currently there is nothing beats LAN cable transfer for casual computer user at home.

author: mtbolha
author_rank: Contributor
timestamp: October 21, 2013, 07:40:25 am
content: QuoteWhat is a GB NIC?

author: tsmith35
author_rank: Frequent Contributor
timestamp: October 21, 2013, 07:42:29 am
content: Quote from: BravoV on October 21, 2013, 07:37:31 amYep. There is always theBelkin Easy Transfer Cablefor simple Windows transfers, but otherwise just go with LAN transfers.

author: tsmith35
author_rank: Frequent Contributor
timestamp: October 21, 2013, 07:44:28 am
content: Quote from: mtbolha on October 21, 2013, 07:40:25 amA gigabit (1.0 gbps) network interface controller, aka a 1.0 gigabit (or 1000 megabit / 1000 mbps) ethernet network port.

author: mtbolha
author_rank: Contributor
timestamp: October 21, 2013, 08:39:06 am
content: Quote from: tsmith35 on October 21, 2013, 07:44:28 amThanks

author: Stonent
author_rank: Super Contributor
timestamp: October 21, 2013, 08:46:19 am
content: Quote from: mtbolha on October 21, 2013, 07:32:16 amPCs always operate in master mode, they do not identify themselves with a USB device ID. That part is at the hardware level.

author: amyk
author_rank: Super Contributor
timestamp: October 21, 2013, 10:56:52 am
content: Quote from: Stonent on October 21, 2013, 08:46:19 amSome can be programmed to act like a slave; I've read about it being done long ago.