Hi, I haven't used Win32::SerialPort (or Win32API::CommPort) but from a quick google search I found this:
The Win32::SerialPort docs: http://members.aol.com/Bbirthisel/SerialPort.html An article by Bill Birthsiel: Controlling Modems with Win32::SerialPort http://library.cs.tuiasi.ro/programming/perl/tpj/issues/vol4_1/tpj0401-0020. html Good luck. -----Original Message----- From: Sushil Kumar Gupta [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 21, 2001 2:03 AM To: '[EMAIL PROTECTED]' Subject: serialport communication : urgent Hi all, I am trying to communicate to one machine through serial port ( COM port ) sau /etc/ttyS0. I am making use of serialPort.pm for this. The script is able to open the connection using new() method but after that nothing comes up . I want who lot of boot up messages to come on console. I am getting all these messages when i use minicom cli modem. This is the script i am using. Please help me . this is very urgent. **************************************************************************** *** test.pl **************************************************************************** **** #!/usr/bin/perl -w # cross-platform example6 use strict; use vars qw( $OS_win $ob $port ); BEGIN { $OS_win = ($^O eq "MSWin32") ? 1 : 0; if ($OS_win) { eval "use Win32::SerialPort 0.11"; die "$@\n" if ($@); } else { eval "use Device::SerialPort"; die "$@\n" if ($@); } } # End BEGIN $file = "test.cfg"; if ($OS_win) { $ob = Win32::SerialPort->start ($file); } else { $port = '/dev/ttyS0'; $ob = Device::SerialPort->new ($port); } die "Can't open serial port from $file: $^E\n" unless ($ob); my $baud = $ob->baudrate(9600); my $parity = $ob->parity('none'); my $data = $ob->databits(8); my $stop = $ob->stopbits(1); print "B = $baud, D = $data, S = $stop, P = $parity\n"; while(1) { ($count, $result) = $ob->read(10); print $result; } undef $ob; This program just prints few lines of the boot log. Can anybody points me to the mistake. I would highly appreciate a quick response. This is kind of urgent. If somebosy have some sample programs , pls send them to me. Regards, Sushil _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
