Author Topic: Connecting two computers with USB (USB - USB)  (Read 9027 times)

0 Members and 1 Guest are viewing this topic.

Offline mtbolha

  • Contributor
  • Posts: 22
Connecting two computers with USB (USB - USB)
« on: October 17, 2013, 08:45:04 pm »
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 cables

I 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?
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #1 on: October 17, 2013, 08:58:25 pm »
 :palm: :palm: :palm:
 

Offline r3l3u

  • Contributor
  • Posts: 7
  • Country: ro
  • I don't believe in anything but i count everything
Re: Connecting two computers with USB (USB - USB)
« Reply #2 on: October 17, 2013, 09:00:50 pm »
come on ! are you serious with this ?  :palm:
 

Offline MinK

  • Contributor
  • Posts: 12
Re: Connecting two computers with USB (USB - USB)
« Reply #3 on: October 17, 2013, 09:01:07 pm »
In general it is bad idea to connect two switching power supplys. In your case USB +5 V to other USB +5 V.
« Last Edit: October 17, 2013, 09:04:50 pm by MinK »
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14749
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Connecting two computers with USB (USB - USB)
« Reply #4 on: October 17, 2013, 09:02:59 pm »
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.
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #5 on: October 17, 2013, 09:08:12 pm »
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?
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #6 on: October 17, 2013, 09:11:30 pm »
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.

I 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.
 

Offline DavidDLC

  • Frequent Contributor
  • **
  • Posts: 740
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #7 on: October 17, 2013, 09:14:21 pm »
There are special cables to connect two computers through USB.

Just google how to connect two computers through USB.

David.
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 14749
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Connecting two computers with USB (USB - USB)
« Reply #8 on: October 17, 2013, 09:16:29 pm »
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.

I 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.

Yep that is the one.
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #9 on: October 17, 2013, 09:23:34 pm »
Yep that is the one.

Well, 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).
« Last Edit: October 17, 2013, 09:34:17 pm by Zbig »
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: nl
Re: Connecting two computers with USB (USB - USB)
« Reply #10 on: October 17, 2013, 09:36:42 pm »
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.
« Last Edit: October 17, 2013, 09:38:35 pm by hans »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3938
  • Country: ro
  • .
Re: Connecting two computers with USB (USB - USB)
« Reply #11 on: October 17, 2013, 09:44:15 pm »
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
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #12 on: October 17, 2013, 09:49:45 pm »
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'.

First off all, not really ;) USB uses differential signalling and Data+ and Data- form a differential pair. It's not like "+" is 1 and "-" is 0 or something.

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.

I think it's not good to confuse OP with pullup transistors resistors (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.
« Last Edit: October 17, 2013, 10:01:39 pm by Zbig »
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: pl
Re: Connecting two computers with USB (USB - USB)
« Reply #13 on: October 17, 2013, 09:53:14 pm »
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.

A-ha, so that's how they solved it software-wise. Dzieki ;)
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: nl
Re: Connecting two computers with USB (USB - USB)
« Reply #14 on: October 17, 2013, 10:07:42 pm »
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'.

First off all, not really ;) USB uses differential signaling and Data+ and Data- form a differential pair. It's not like "+" is 1 and "-" is 0 or something.
The 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.

Quote
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.

I think it's not good to confuse OP with pullup transistors resistors (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.

There 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.
 

Offline Noize

  • Regular Contributor
  • *
  • Posts: 179
  • Country: gb
Re: Connecting two computers with USB (USB - USB)
« Reply #15 on: October 17, 2013, 10:44:18 pm »
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.
 

Offline fluxcapacitor

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: gb
Re: Connecting two computers with USB (USB - USB)
« Reply #16 on: October 17, 2013, 10:45:01 pm »
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

« Last Edit: October 17, 2013, 10:49:27 pm by fluxcapacitor »
 

Offline magnus0re

  • Contributor
  • Posts: 15
Re: Connecting two computers with USB (USB - USB)
« Reply #17 on: October 17, 2013, 10:51:22 pm »
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?


 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #18 on: October 17, 2013, 11:05:17 pm »
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 cables

USB



There'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.
« Last Edit: October 17, 2013, 11:06:59 pm by Stonent »
The larger the government, the smaller the citizen.
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Connecting two computers with USB (USB - USB)
« Reply #19 on: October 18, 2013, 01:00:02 am »
Will someone just shoot me.  |O
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline MauriceS

  • Contributor
  • Posts: 22
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #20 on: October 18, 2013, 02:27:48 am »
Instead of blowing up stuff   :( there 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...

 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Connecting two computers with USB (USB - USB)
« Reply #21 on: October 18, 2013, 02:30:16 am »
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.
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #22 on: October 18, 2013, 02:47:40 am »
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.
The larger the government, the smaller the citizen.
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 678
Re: Connecting two computers with USB (USB - USB)
« Reply #23 on: October 18, 2013, 03:30:20 am »
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.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6298
  • Country: gb
Re: Connecting two computers with USB (USB - USB)
« Reply #24 on: October 18, 2013, 03:35:58 am »
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.

There'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.
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 678
Re: Connecting two computers with USB (USB - USB)
« Reply #25 on: October 18, 2013, 03:48:50 am »
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.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6298
  • Country: gb
Re: Connecting two computers with USB (USB - USB)
« Reply #26 on: October 18, 2013, 03:51:42 am »
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.

The 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.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6767
Re: Connecting two computers with USB (USB - USB)
« Reply #27 on: October 18, 2013, 12:04:16 pm »
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.
 

Offline redben

  • Contributor
  • Posts: 16
  • Country: ch
Re: Connecting two computers with USB (USB - USB)
« Reply #28 on: October 19, 2013, 09:20:26 am »
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.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6298
  • Country: gb
Re: Connecting two computers with USB (USB - USB)
« Reply #29 on: October 19, 2013, 01:59:41 pm »
The way to go is to use a simple USB Hub.

No, that won't work.
 

Offline mtbolha

  • Contributor
  • Posts: 22
Re: Connecting two computers with USB (USB - USB)
« Reply #30 on: October 21, 2013, 07:32:16 am »
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 imposible :P

PC 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
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 6767
  • Country: 00
  • +++ ATH1
Re: Connecting two computers with USB (USB - USB)
« Reply #31 on: October 21, 2013, 07:37:31 am »
So best PC-PC connection for me is direct cable LAN

For 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.

Offline mtbolha

  • Contributor
  • Posts: 22
Re: Connecting two computers with USB (USB - USB)
« Reply #32 on: October 21, 2013, 07:40:25 am »
Quote
For 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.

What is a GB NIC?
« Last Edit: October 21, 2013, 07:43:27 am by mtbolha »
 

Offline tsmith35

  • Regular Contributor
  • *
  • Posts: 240
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #33 on: October 21, 2013, 07:42:29 am »
For 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.
Yep. There is always the Belkin Easy Transfer Cable for simple Windows transfers, but otherwise just go with LAN transfers.
 

Offline tsmith35

  • Regular Contributor
  • *
  • Posts: 240
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #34 on: October 21, 2013, 07:44:28 am »
What is a GB NIC?

A gigabit (1.0 gbps) network interface controller, aka a 1.0 gigabit (or 1000 megabit / 1000 mbps) ethernet network port.
« Last Edit: October 21, 2013, 07:46:34 am by tsmith35 »
 

Offline mtbolha

  • Contributor
  • Posts: 22
Re: Connecting two computers with USB (USB - USB)
« Reply #35 on: October 21, 2013, 08:39:06 am »
What is a GB NIC?

A gigabit (1.0 gbps) network interface controller, aka a 1.0 gigabit (or 1000 megabit / 1000 mbps) ethernet network port.

Thanks
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Connecting two computers with USB (USB - USB)
« Reply #36 on: October 21, 2013, 08:46:19 am »
Maybe I get lucky and invent some hack that all of you think its imposible :P

PCs always operate in master mode, they do not identify themselves with a USB device ID. That part is at the hardware level.
The larger the government, the smaller the citizen.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6767
Re: Connecting two computers with USB (USB - USB)
« Reply #37 on: October 21, 2013, 10:56:52 am »
Maybe I get lucky and invent some hack that all of you think its imposible :P

PCs always operate in master mode, they do not identify themselves with a USB device ID. That part is at the hardware level.
Some can be programmed to act like a slave; I've read about it being done long ago.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf