Problem with Win32-SerialPort over bluetooth @ windows + active perl



Hello guys,

I encounter some problems with Wini32-SerialPort module. Not sure is
this is the correct place to ask....


What I want is to setup my mobile phone as a GSM modem and connect from
my laption using either IR or bluetooth.

In order to do that, I need to create a "config" file for different
comm port. However, setup the config which utilise IR did not give me
any problem. But the bluetooth is complaining about the Baud Rate.

Have anyone encounter this before ?

Here is the program that actually generate the config file.

use Win32::SerialPort 0.14;

if (@ARGV ne 2) {
print "\n\nUsage : $0 <COMM PORT> <outputfile>\nE.g $0 COM1

my $PortObj = new Win32::SerialPort ("$ARGV[0]" )
|| die "$0: Can't open COMM Port $ARGV[0] !\n$0: $!\n"; #
$quiet is optional

print "$0: Connected to $ARGV[0]...\n";

$PortObj->buffers(4096, 4096);

$PortObj->write_settings || undef $PortObj;


$PortObj->restart("./$ARGV[1]"); # back to 9600 baud

$PortObj->close || die "$0: Failed to close !";
undef $PortObj; # frees memory back to

print "\n\n$0: Config file created in $ARGV[1].\n";



Here is the error message with I try to setup a bluetooth config.

D:\MyPerl\>perl COM9 z1010-bluetooth-com9.cfg

- Connected to COM9...
Could not set baudrate on COM9 at line 17
Missing REQUIRED setting for BAUD at line 23
write_settings failed, closing port at line 23
Can't call method "save" on an undefined value at
line 26.

Appreciate if anyone can help.

Best Regards
Chi Tsung


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads