avo has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I've been looking on Google for some time now but with no luck. I would like to make a virtual COM port in Win32 (Example COM12:) in perl, where the perl application / daemon receives all data sent to that com port.

Replies are listed 'Best First'.
Re: Virtual COM port
by afoken (Chancellor) on Oct 13, 2009 at 20:51 UTC

    You need a Windows device driver for that. I doubt it can be written in Perl. It could expose a second interface that the Perl application can use. A very simple and generic solution would be a device driver that creates two virtual COM ports that seem to be connected by a crossover cable.

    Some versions of VMWare allow to redirect a guest's COM port to a named pipe on the host. Named pipes can be accessed by Perl.

    You could also buy a cheap dual-port RS232 PCI card and a null modem cable, insert it into your machine, and use the two real ports. There are Win32::SerialPort and Win32API::CommPort that should be able to connect to the COM port.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: Virtual COM port
by gman (Friar) on Oct 13, 2009 at 22:23 UTC
    Hello,

    I think a serial to ip virtual driver would probably suit your needs. But not actually knowing what you need this for it my be presumptuous of me :)

    A Google search for something like "serial port to ip +sourceforge", should turn up something, I did find at least one on source forge. Sounds like an interesting project.

    Good Luck, Cory

    LINK: http://com0com.sourceforge.net/

      Hi This is what I use http://realterm.sourceforge.net/ Cheers