简体   繁体   中英

C# - Emulate device - Parallel to Serial Port

We are trying to emulate a device that runs off a parallel port.

We have the exact same model that runs on RS232, and can run a null modem cable from one port to another and emulate the device with the following settings:

_port = new SerialPort
                {
                    PortName = comport,
                    BaudRate = 9600,
                    DataBits = 8,
                    Parity = Parity.None,
                    StopBits = StopBits.One,
                    DtrEnable = true,
                    RtsEnable = true,
                };

So to emulate the same device with a parallel port, we merely got a cable that runs from parallel to a RS-232 port. Although, we are not sure if it is the correct cable we need.

What are the System.IO.Ports.SerialPort settings that would allow the parallel device to work?

We have a serial port monitoring program and no data is coming through, this makes us think that our baud rate, stop bits, data bits, etc. are incorrect.

Does anyone know how parallel communication is translated to RS-232 on the other end?

Any suggestions? Is this even possible? We want to avoid having 2 parallel ports and using C# to communicate over parallel (it would be time consuming).

You need more than just a cable, you need a converter. Here is one such device . I haven't used this model, but I've used other converters in the past successfully.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM