Hi
I am trying to control my mobile from my WinXP machine. The
mobile is connected through USB which is mapped on COM 5. With
Hyperterminal everything looks good.
But when I try:
---------------------------------------------------------------
use Win32::SerialPort qw( :STAT 0.19 );
$ob = new Win32::SerialPort ('COM5') || die "Can't open COM5:
$^E\n";
my $baud = $ob->baudrate;
my $parity = $ob->parity;
my $data = $ob->databits;
my $stop = $ob->stopbits;
my $hshake = $ob->handshake;
print "\n\nCurrent Settings: ";
print "B = $baud, D = $data, S = $stop, P = $parity, H = $hshake\n";
$ob->baudrate($baud) || die "fail setting baud";
------------------------------------------------------------------
I get:
Current Settings: B = 115200, D = 8, S = , P = , H = none
Could not set baudrate on COM5 at C:\tools\Perl\Utility\COMS2.pl line
24
fail setting baud at C:\tools\Perl\Utility\COMS2.pl line 24, <DATA>
line 164.
---------------------------------------------------------------------
So I can not read the stop and parity and I can not set the baudrate
(which is required by Win32::SerialPort). A "mode COM5" from the
console give me:
Status for device COM5:
-----------------------
Baud: 115200
Parity: None
Data Bits: 8
Stop Bits: 1
Timeout: OFF
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: ON
RTS circuit: ON
Any idea??
Thanks
Carlo