in reply to send command to RS232, then get data from RS232
hi, me again..
i found why i cant use perl -MCPAN -e 'install Device::SerialPort' and get an error message like i posted,
becoz this module need to run h2ph command, and i found in RedHat & Mandrake OS, had2 file maybe strange, the strange file are /usr/include/asm/string-486.h and checksum.h
i just move these 2 file to somewhee else then run h2ph -r -l . seen ok now, and i try a script from demo script:
===========================================================
#!/usr/bin/perl -w
use strict;
use vars qw( $OS_win $ob $file );
use Device::SerialPort;
$file = 'ttyS0.cfg';
$ob = Device::SerialPort->start ($file) ||
die "Can't open serial port from $file: $^E\n";
my $baud = $ob->baudrate;
print "baud from configuration: $baud\n";
my $databits = $ob->databits;
print "databits from configuration: $databits\n";
my $parity = $ob->parity;
print "parity from configuration: $parity\n";
my $stopbits = $ob->stopbits;
print "stopbits from configuration: $stopbits\n";
===========================================================
this was ok now, but my new problam is i read the DESCRIPTION on http://search.cpan.org/author/COOK/Device-SerialPort-0.12/SerialPort.pm hard to understand what cammand can let me send a command to /dev/ttyS0 and get the respond,
can someone help me!