Connecting 2 USB ports together over a "Null Modem" like in the old days with COM ports?
Asked Answered
D

3

6

I was curious if anybody knows a way to connect two different computers together over a USB line and what API's exist to program this interface.

For Serial Ports its common to buy a "Null Modem" adapter to cross over the Transmit and Receive lines of the UART so that the computers can talk together. And then You would read and write them like normal windows files over special system files called "COM1", "COM2", etc.

I was wondering if there was an Adapter of some kind that could emulate this same behavior except for native USB protocol. I realize they have USB-to-UART adapters. That's not really what i'm interested in because the baud rate is very slow for uarts. I was looking for something with USB speeds to transfer from one computer to another that is not going over a network link such as ethernet or wifi.

This is what I have: COMPUTER A<-->USB<-->UART<-->NULL_MODEM<-->UART<--->USB<-->COMPUTER B Speed 110,000 Baud, whatever... to slow to transfer files... ok for text...

This is what I want:

COMPUTER A<-->USB<-->Crossover_Adapter<--->USB<-->COMPUTER B Speed 480 megabits per second

Assuming this beast exists, how do you program it and where do you buy it?

Darkness answered 9/3, 2016 at 2:9 Comment(3)
RS-232 is point-to-point and non-hierarchical at the physical-layer. USB is hierarchical. PCs typically only have host (master) ports, and rarely have device (slave) ports. So you cannot connect two PC host ports together with a simple male-A-to-male-A cable (although they exist, and I have one). There are A-to-A "cables" with proprietary electronics in the middle (i.e. it's back-to-back USB slave devices) to facilitate the connection.Potboiler
Sawdust, I have two pc's connected together in a way you said is impossible.. The key is the Null-Modem crossover adapter to connect the two USB serial ports together. The Null-Modem crosses over the Transmit and Receive bits of the UART. Also, a PC serial port is not inherently a master or a slave ... its all a matter of how you write the software that determines this configuration. For instance I have software on one pc that makes its a client/master serial port, and on the other pc i have software that makes it a server/slave port. You just need to null modem in the middle.Darkness
Seems like you don't comprehend what I wrote. "...in a way you said is impossible"* -- I wrote that a USB-to-USB connection is not valid. You have a RS232 connection using USB adapters. That's not the same type of connection. "PC serial port is not inherently a master or a slave" -- And that's why I wrote "RS-232 is ... non-hierarchical at the physical-layer". You're just restating what I already wrote. And FYI I didn't downvote your question or answer (although your disagreement is beginning to give me a reason to),Potboiler
K
2

The only solution that I know of is the "FTDI Chip USB-to-USB Null modem cable" that can transfer between computers two computers using USB ports at a rate of 3 MBaud (384 kbytes/s) That's a lot faster than using older serial ports with null modem cable that maxs out at say 115200 baud (14 kbytes/s). The FTDI chip cable can be programed in c/c++/c# just like a standard windows serial port by way of a virtual serial port.

http://shop.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=92&title=Null+Modem+Cables

From Their Website:

USB NMC-2.5m

NMC In the era of legacy PCs with onboard RS232 COM Ports, it was common practice to establish a simple communications network between PCs using a cable popularly known as a Null-Modem cable. Typically, such a cable would have DB9 female connectors on each end with the TX / RX and handshaking signals cross-connected so that the PCs could communicate with each other via legacy COM ports.

On modern PCs the legacy COM Port connector is rapidly disappearing as USB becomes the multi-function communication port of choice. However, this presents a dilemma in application areas that previously relied on legacy COM Ports for inter-PC communication.

A convenient solution to the problem is the FTDI USB NMC cable. From the outside, this cable appears to be two USB type “A” sockets wired together, however each of the USB sockets conceal a small PCB with a FT232RQ based USB-UART converter IC plus support components inside. The interconnect cable cross-connects the TXD / RXD data signals, RTS / CTS handshaking signals and interconnects the common GND reference rail betwen the two converter PCBs.

When used together with FTDI’s supplied Virtual COM Port ( VCP ) drivers, the USB NMC cable may be used to establish inter-PC COM Port based communication at baud rates of up to 3M baud. The standard USB NMC cable p/n USB NMC-2.5m comes with an interconnect length of 2.5m ( 8.2ft ) - other lengths may be available on request. Multiple operating systems are supported including Windows, Linux, Mac OS etc. single cable

Another Alternative is to use Bluetooth which is also programmable just like a the older serial port.

Kudu answered 7/5, 2016 at 11:29 Comment(0)
D
0

I think I found the solution: Avnet Spartan-6 LX9 MicroBoard.

It has a USB on one end and an ethernet port on the other end. http://www.xilinx.com/products/boards-and-kits/1-3i2dfk.html

I can put the fpga/microblaze-cpu in the middle to filter out traffic to make sure the link doesn't get hacked and maybe encrypted it as well.

Darkness answered 9/3, 2016 at 7:27 Comment(0)
M
0

Easy Computer Sync sells the null modem cable plus the data transfer software. The SW is versatile and easy to use. https://www.bravurasoftware.com/easy-computer-sync/ (I have no connection with other than being a satisfied user.)

Mecklenburg answered 7/7, 2022 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.