Wael Khalil wrote:
Hi guys
I'm only a student
I'm trying to connect two computers together using the usual USB cable which ends with two male connectors on both sides
so I cut the power wire within the cable
and connected the two computers to their USB ports
I used the jusb API for Windows and javax-usb to do that
but java didn't recognize any device on any port even though I know that the root hub
is a device (isn't it)


So I'm asking your help because I have to handle this project to my supervisor in no time (Pleeeeeeeeeeeeeeease)
1- I want to ask you guys is it about the cable:
I mean that did I ruin the cable when I cut the power wire in it?!!!
Could it work if I didn't cut that wire (I thought that the ports might be damaged or even the motherboard culd be damaged also) is my thought right or not.

You should NOT connect the 2 computers with a home made cable, it will not work, and if the computers are on different potential levels you could get a power rush.

(Earlier I connected 2 ungrounded computers using a BNC cable, and you could actually see sparks going from from one of the computers to the shield of the cable before they connected and had a common ground via the cable shield.)

Not e: There's a USB device in the market which can be used to connect two windows systems together, I am not allowed to use it.

Too bad, that's probably the only way you could connect two computers using USB.

2- Or is the whole idea is wrong and I can't connect two PCs through usb ports
using Javax-usb?

Javax.usb is for communicating with the devices. With the special cables used to connect two computers there is actually a device in the middle which both computers (hosts) talks to.

3- Can I do this through USB hub?
If the answer is Yes I can connect the PCs by the help of Java over USB ports
please send me a solution (How to connect the PCs) and a code to begin with.
and if I can't do it please tell me why.

There are several technical reasons why this can not work, USb does not use a protocol with collision detection or some other kind of collaboration to get multiple devices to share a common cable. Instead there is a host (the computer) which tells each device when it can send data. Now, if you take 2 computers and connect them together they will both try to control the bus.

For more information of how this actually works I'd recommend reading the specifications at www.usb.org.

//Roger


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to