Serial Port Emulation

Started by February 17, 2019
I'm working to improve a test program for the hardware I use to test some boards I
make.  These boards are tested using a test fixture controlled over an RS-232 port
from the PC.  So I don't need to lug hardware around with me I emulate the test
fixture on the same PC I run the test program.  I need comm port emulation software
that will emulate a bridge between two serial ports to connect the test program and
the test fixture emulator.  

One I've been using is called, oddly enough, "Free Virtual Serial Ports".  It is
free to use, but only in a limited configuration which will do the job, but just
barely.  I have also noticed that if my programs are not closed properly (or some
other cause) this bridge software will hang one of the ports.  

I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually
restart both the test program and the emulator program.  There are a few
initialization steps that become tedious after doing them a few dozen times. 

Is there a serial port bridge program that works well and is not expensive?  

Rick C.
On 17/02/2019 11:08, gnuarm.deletethisbit@gmail.com wrote:
> I'm working to improve a test program for the hardware I use to test some boards I
make. These boards are tested using a test fixture controlled over an RS-232 port from the PC. So I don't need to lug hardware around with me I emulate the test fixture on the same PC I run the test program. I need comm port emulation software that will emulate a bridge between two serial ports to connect the test program and the test fixture emulator.
> > One I've been using is called, oddly enough, "Free Virtual Serial Ports". It is
free to use, but only in a limited configuration which will do the job, but just barely. I have also noticed that if my programs are not closed properly (or some other cause) this bridge software will hang one of the ports.
> > I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually restart both the test program and the emulator program. There are a few initialization steps that become tedious after doing them a few dozen times.
> > Is there a serial port bridge program that works well and is not expensive? > > Rick C. >
Have you considered simply having two serial ports and connecting them physically? It might not be quite as elegant as a "virtual" solution, but it would be very realistic (regarding timing and such). A couple of FTDI cables would cost something like $10. If you are running Linux, a "virtual serial port" is just a pipe, if you don't need virtual baud rates and the like. Windows is always more complicated - I am afraid I don't know of any suitable software as I've never had the need.
On 02/17/19 12:42, David Brown wrote:
> On 17/02/2019 11:08, gnuarm.deletethisbit@gmail.com wrote: >> I'm working to improve a test program for the hardware I use to test >> some boards I make. These boards are tested using a test fixture >> controlled over an RS-232 port from the PC. So I don't need to lug >> hardware around with me I emulate the test fixture on the same PC I >> run the test program. I need comm port emulation software that will >> emulate a bridge between two serial ports to connect the test program >> and the test fixture emulator. >> >> One I've been using is called, oddly enough, "Free Virtual Serial >> Ports". It is free to use, but only in a limited configuration which >> will do the job, but just barely. I have also noticed that if my >> programs are not closed properly (or some other cause) this bridge >> software will hang one of the ports. >> >> I don't want to emulate the serial port connection in my test fixture >> emulator because if I take the program down a lot while testing, I >> will have to continually restart both the test program and the >> emulator program. There are a few initialization steps that become >> tedious after doing them a few dozen times. >> >> Is there a serial port bridge program that works well and is not >> expensive? >> >> Rick C. >> > > Have you considered simply having two serial ports and connecting them > physically? It might not be quite as elegant as a "virtual" solution, > but it would be very realistic (regarding timing and such). A couple of > FTDI cables would cost something like $10. > > If you are running Linux, a "virtual serial port" is just a pipe, if you > don't need virtual baud rates and the like. Windows is always more > complicated - I am afraid I don't know of any suitable software as I've > never had the need. >
Hardware seems like the best route, since that includes modem control lines, xon/xoff etc. Many laptops don't have serial ports these days, but all Panasonic Toughbooks do. There are also usb to serial and network based serial ports available and have used both in the past with no issues, StarTech making some of the best "work out of the box" examples... Chris
On 17.2.19 12:08, gnuarm.deletethisbit@gmail.com wrote:
> I'm working to improve a test program for the hardware I use to test some boards I
make. These boards are tested using a test fixture controlled over an RS-232 port from the PC. So I don't need to lug hardware around with me I emulate the test fixture on the same PC I run the test program. I need comm port emulation software that will emulate a bridge between two serial ports to connect the test program and the test fixture emulator.
> > One I've been using is called, oddly enough, "Free Virtual Serial Ports". It is
free to use, but only in a limited configuration which will do the job, but just barely. I have also noticed that if my programs are not closed properly (or some other cause) this bridge software will hang one of the ports.
> > I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually restart both the test program and the emulator program. There are a few initialization steps that become tedious after doing them a few dozen times.
> > Is there a serial port bridge program that works well and is not expensive? > > Rick C. >
Get a USB serial port adapter and a null modem cable, so the test program does see any difference. The virtual serial ports are probably more part of the problem set than part of the solution set. -- -TV
Den 2019-02-17 kl. 11:08, skrev gnuarm.deletethisbit@gmail.com:
> I'm working to improve a test program for the hardware I use to test some boards I
make. These boards are tested using a test fixture controlled over an RS-232 port from the PC. So I don't need to lug hardware around with me I emulate the test fixture on the same PC I run the test program. I need comm port emulation software that will emulate a bridge between two serial ports to connect the test program and the test fixture emulator.
> > One I've been using is called, oddly enough, "Free Virtual Serial Ports". It is
free to use, but only in a limited configuration which will do the job, but just barely. I have also noticed that if my programs are not closed properly (or some other cause) this bridge software will hang one of the ports.
> > I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually restart both the test program and the emulator program. There are a few initialization steps that become tedious after doing them a few dozen times.
> > Is there a serial port bridge program that works well and is not expensive? > > Rick C. >
Why not have a switch so that you open a socket instead of a serial port? BR AP
On 17/02/2019 17:54, Tauno Voipio wrote:
> On 17.2.19 12:08, gnuarm.deletethisbit@gmail.com wrote: >> I'm working to improve a test program for the hardware I use to test >> some boards I make.  These boards are tested using a test fixture >> controlled over an RS-232 port from the PC.  So I don't need to lug >> hardware around with me I emulate the test fixture on the same PC I >> run the test program.  I need comm port emulation software that will >> emulate a bridge between two serial ports to connect the test program >> and the test fixture emulator. >> >> One I've been using is called, oddly enough, "Free Virtual Serial >> Ports".  It is free to use, but only in a limited configuration which >> will do the job, but just barely.  I have also noticed that if my >> programs are not closed properly (or some other cause) this bridge >> software will hang one of the ports. >> >> I don't want to emulate the serial port connection in my test fixture >> emulator because if I take the program down a lot while testing, I >> will have to continually restart both the test program and the >> emulator program.  There are a few initialization steps that become >> tedious after doing them a few dozen times. >> >> Is there a serial port bridge program that works well and is not >> expensive? >> >> Rick C. >> > > Get a USB serial port adapter and a null modem cable, > so the test program does see any difference. >
"Null modem cable" ? He doesn't need RS-232 converters and 9-pin DSUBs here. A couple of USB to TTL Uart cables is what he needs, with the wires tied together. <https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm>
> The virtual serial ports are probably more part of the > problem set than part of the solution set. >
duminic&#259;, 17 februarie 2019, 12:08:11 UTC+2, gnuarm.del...@gmail.com a scris:
> I'm working to improve a test program for the hardware I use to test some boards I
make. These boards are tested using a test fixture controlled over an RS-232 port from the PC. So I don't need to lug hardware around with me I emulate the test fixture on the same PC I run the test program. I need comm port emulation software that will emulate a bridge between two serial ports to connect the test program and the test fixture emulator.
> > One I've been using is called, oddly enough, "Free Virtual Serial Ports". It is
free to use, but only in a limited configuration which will do the job, but just barely. I have also noticed that if my programs are not closed properly (or some other cause) this bridge software will hang one of the ports.
> > I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually restart both the test program and the emulator program. There are a few initialization steps that become tedious after doing them a few dozen times.
> > Is there a serial port bridge program that works well and is not expensive? > > Rick C.
Google for "com0com"
On Monday, February 18, 2019 at 12:56:14 AM UTC-5, raimond....@gmail.com wrote:
> duminic&#259;, 17 februarie 2019, 12:08:11 UTC+2, gnuarm.del...@gmail.com a
scris:
> > I'm working to improve a test program for the hardware I use to test some boards
I make. These boards are tested using a test fixture controlled over an RS-232 port from the PC. So I don't need to lug hardware around with me I emulate the test fixture on the same PC I run the test program. I need comm port emulation software that will emulate a bridge between two serial ports to connect the test program and the test fixture emulator.
> > > > One I've been using is called, oddly enough, "Free Virtual Serial Ports". It is
free to use, but only in a limited configuration which will do the job, but just barely. I have also noticed that if my programs are not closed properly (or some other cause) this bridge software will hang one of the ports.
> > > > I don't want to emulate the serial port connection in my test fixture emulator
because if I take the program down a lot while testing, I will have to continually restart both the test program and the emulator program. There are a few initialization steps that become tedious after doing them a few dozen times.
> > > > Is there a serial port bridge program that works well and is not expensive? > > > > Rick C. > > Google for "com0com"
Yes, that was the one I had used before and it still seems to work just as well. Thanks! :) Rick C.
On 17.2.19 22:16, David Brown wrote:
> On 17/02/2019 17:54, Tauno Voipio wrote: >> On 17.2.19 12:08, gnuarm.deletethisbit@gmail.com wrote: >>> I'm working to improve a test program for the hardware I use to test >>> some boards I make.&nbsp; These boards are tested using a test fixture >>> controlled over an RS-232 port from the PC.&nbsp; So I don't need to lug >>> hardware around with me I emulate the test fixture on the same PC I >>> run the test program.&nbsp; I need comm port emulation software that will >>> emulate a bridge between two serial ports to connect the test program >>> and the test fixture emulator. >>> >>> One I've been using is called, oddly enough, "Free Virtual Serial >>> Ports".&nbsp; It is free to use, but only in a limited configuration which >>> will do the job, but just barely.&nbsp; I have also noticed that if my >>> programs are not closed properly (or some other cause) this bridge >>> software will hang one of the ports. >>> >>> I don't want to emulate the serial port connection in my test fixture >>> emulator because if I take the program down a lot while testing, I >>> will have to continually restart both the test program and the >>> emulator program.&nbsp; There are a few initialization steps that become >>> tedious after doing them a few dozen times. >>> >>> Is there a serial port bridge program that works well and is not >>> expensive? >>> >>> Rick C. >>> >> >> Get a USB serial port adapter and a null modem cable, >> so the test program does see any difference. >> > > "Null modem cable" ?&nbsp; He doesn't need RS-232 converters and 9-pin DSUBs > here.&nbsp; A couple of USB to TTL Uart cables is what he needs, with the > wires tied together. > > <https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm> > >> The virtual serial ports are probably more part of the >> problem set than part of the solution set. >>
Most of the off-the-shelf USB serial dongles have the 9 pin connectors with RS-232 DTE signals, which do need null modem to connect together. -- -TV
On 18/02/2019 09:38, Tauno Voipio wrote:
> On 17.2.19 22:16, David Brown wrote: >> On 17/02/2019 17:54, Tauno Voipio wrote: >>> On 17.2.19 12:08, gnuarm.deletethisbit@gmail.com wrote: >>>> I'm working to improve a test program for the hardware I use to test >>>> some boards I make.&nbsp; These boards are tested using a test fixture >>>> controlled over an RS-232 port from the PC.&nbsp; So I don't need to lug >>>> hardware around with me I emulate the test fixture on the same PC I >>>> run the test program.&nbsp; I need comm port emulation software that will >>>> emulate a bridge between two serial ports to connect the test >>>> program and the test fixture emulator. >>>> >>>> One I've been using is called, oddly enough, "Free Virtual Serial >>>> Ports".&nbsp; It is free to use, but only in a limited configuration >>>> which will do the job, but just barely.&nbsp; I have also noticed that if >>>> my programs are not closed properly (or some other cause) this >>>> bridge software will hang one of the ports. >>>> >>>> I don't want to emulate the serial port connection in my test >>>> fixture emulator because if I take the program down a lot while >>>> testing, I will have to continually restart both the test program >>>> and the emulator program.&nbsp; There are a few initialization steps that >>>> become tedious after doing them a few dozen times. >>>> >>>> Is there a serial port bridge program that works well and is not >>>> expensive? >>>> >>>> Rick C. >>>> >>> >>> Get a USB serial port adapter and a null modem cable, >>> so the test program does see any difference. >>> >> >> "Null modem cable" ?&nbsp; He doesn't need RS-232 converters and 9-pin >> DSUBs here.&nbsp; A couple of USB to TTL Uart cables is what he needs, with >> the wires tied together. >> >> <https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm> >> >>> The virtual serial ports are probably more part of the >>> problem set than part of the solution set. >>> > > > Most of the off-the-shelf USB serial dongles have the 9 pin connectors > with RS-232 DTE signals, which do need null modem to connect together. >
I guess it depends on which shelf you look on :-) It is /many/ years since I have had need of an RS-232 serial dongle. But TTL level UART to USB converters - we go through these at a high rate. Adding standard RS-232 to a board is big and expensive - you need RS-232 drivers and a bulky DSUB connector, and then the cables. Adding a TTL level UART is practically free - you need the Tx and Rx pins on the microcontroller (many of which have several UARTs - finding one spare is not nearly the challenge it used to be), and you need a 3-pin header. For convenience, when we have the space, we use a 6-pin header that matches the FTDI cables. So /my/ shelf has lots of FTDI TTL-level UART cables - and a single RS-232 dongle gathering dust in the corner.