Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
how can i communicate between two PC's via the USB data cable in c#
Posted
Comments
Richard MacCutchan 7-Sep-13 5:35am    
You would need to write some form of device driver to handle the data transfers. It would be much simpler to use sockets through a network connection.
Hemant Singh Rautela 7-Sep-13 7:29am    
AND what do you mean my communication between two PC's.....

two connected PC can communicate withing LAN using LAN device... If you use crosscable to connect only two PC then it use for only share hardisk as a external hardisk...

AFAIK, you can't do it without a special cable: the PCs are both USB Hosts and expect to see USB clients at the other end. I haven't gone into the USB specification in that much detail, but I would not expect a direct Host->Host connection to work.

There are cable solutions available: Google[^] but if these are not what you are looking at then you are on your own! :laugh:

In all honesty, I wouldn't do it, personally. You almost certainly have a wired / wireless router in the form of your internet router, so I'd just hook another PC to that and do it that way.
 
Share this answer
 
Comments
SoMad 7-Sep-13 13:38pm    
If you could make it work using USB 3.0, you could be looking at throughputs higher than you can achieve with your 1 Gbit/s LAN connection (although not quite as flexible). I found a cable to do the connection, but it looks like there is still a lot of work to be done before we can actually use it.
http://www.datapro.net/products/usb-3-0-super-speed-a-a-debugging-cable.html[^]

Soren Madsen
OriginalGriff 7-Sep-13 13:50pm    
In theory, you're right - I hadn't thought of USB 3 @ 3Gb/s
Be interesting to see if there was a cable that could do it, it's gonna need a substantial uProcessor to keep up with that level of throughput!
:laugh:
Way out of PIC territory, but some of the ARM chips could do it, and probably at USB power levels as well...
SoMad 7-Sep-13 14:51pm    
There is work to be done for sure. Maybe Brisingr Aerowing[^] is looking for a new project:)

Soren Madsen
This is like a many-to-many relationship in a database. You need to break it down using a hardware chip you put together.
You can use 2 micro controllers sharing a data bus. Each of them is connected to one of the computers. Data traffic scheme is up to you. And you might need to write a driver (depending on the micro controller you are using).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900