serverclientusbadhoc

How to connect two laptops through USB?


I'd like to connect multiple laptops through a wire such as USB. For example one of laptops is host and the others are going to be client. The client server will send a data buffer, and the host server will listen client's data streaming. It will be kind of simple web server and client one. However in this case, in order to use even unstable Wi-fi environment, they will be connected through USB(It can be different one, but it is not ethernet port. this is because some laptop might not have ethernet port.)

I'm going to use make their connection by node js. do you have any good idea about good way to connect them?


Solution

  • USB is designed to be used in host / device situations, where the host is something with an operating system, and the device is a small cheap low compute power item. It is not designed for direct host to host connections and does not support it.

    You could use a USB to rs232 adapter on each computer, and connect the adapters with a null modem cable. Or you could get USB to ethernet adapters.

    If you want multiple host devices to talk to each other, you want a network wire, like ethernet, which was designed for this specific purpose.

    Many systems have ethernet ports built in, and USB to ethernet adapters are cheaper and higher bandwidth than just about any other USB host to host communications adapter.