win32 serial port
- From: Saran.j.jegan@xxxxxxxxx (Saran j jegan)
- Date: Wed, 26 Sep 2007 11:23:07 -0000
Hello , am using win32::serialport module to communicate with my
serial port device, this is my code
use Win32::SerialPort;
my $serial_port;
my $return;
my $quiet = 1;
$serial_port = Win32::SerialPort->new ($port,1) die "Can't open serial
port $port: $^E\n" unless ($serial_port);
my $configFile= 'ER400TRS.conf';
print LOG "configuration file: $configFile\n";
print "$configFile";
my $baud = $serial_port->baudrate(4800);
my $par = $serial_port->parity("even");
my $rint=$serial_port->read_interval;
my $data=$serial_port->databits(7);
my $stop=$serial_port->stopbits(1);
my $hshake=$serial_port->handshake;
my $rconst=$serial_port->read_const_time(100);
my $rchar=$serial_port->read_char_time(5);
my $wconst=$serial_port->write_const_time(100);
my $wchar=$serial_port->write_char_time(5);
my ($rbuf, $wbuf)= $serial_port->buffers;
$serial_port = tie (*FOO, 'Win32::SerialPort', $configFile)
|| die "Can't tie: $^E\n"; ## TIEHANDLE ##
$serial_port->close || die "\n close problem with $port\n";
undef $serial_port;
the code works fine i can write my data to the buffer but when am try
to use file handle to tie with config file
am getting the error access denied can't tie....can any suggest me ?
.
- Follow-Ups:
- Re: win32 serial port
- From: Matthew Whipple
- Re: win32 serial port
- From: Dr.Ruud
- Re: win32 serial port
- Prev by Date: help regarding Comparision of two lines
- Next by Date: Displaying a Link on A Web PAge with image/png header.
- Previous by thread: help regarding Comparision of two lines
- Next by thread: Re: win32 serial port
- Index(es):