jismake has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::SerialPort; use strict; use warnings; $| = 1; #enable autoflush my $PortName = "COM1"; my $sendData = "12345678"; ### SERIAL PORT SETUP ### my $PortObj = new Win32::SerialPort($PortName) or die "Can't open $Por +tName: $^E\n"; $PortObj->baudrate(57600); $PortObj->parity("none"); $PortObj->databits(8); $PortObj->stopbits(1); $PortObj->write_settings(); #very important! $PortObj->write($sendData); $PortObj->close() || warn "\nClose failed\n";
what could be wrong? I have windows 7, laptop with no real COM ports. i use a virtual serial port kit software to create virtual ports.
any help appreciated. jis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Virtual COM port write
by Anonymous Monk on Apr 20, 2014 at 10:53 UTC | |
by jismake (Initiate) on Apr 20, 2014 at 12:00 UTC | |
by Anonymous Monk on Apr 20, 2014 at 12:16 UTC | |
by jismake (Initiate) on Apr 20, 2014 at 13:05 UTC | |
by jismake (Initiate) on Apr 22, 2014 at 07:49 UTC |