Declarent has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl # Modem test use Device::SerialPort; $PortName="/dev/ttyS1"; $modem=new Device::SerialPort ($PortName); print "Modem Test...\n"; $modem->error_msg(ON); $modem->baudrate(115200); $modem->parity("none"); $modem->databits(8); $modem->stopbits(1); $modem->are_match("BUSY","CONNECT","OK","NO DIALTONE","ERROR","RING", "NO CARRIER","NO ANSWER"); #$modem->write("ATZ\r") || die "Could Not Reset\n"; $number="8885555555"; $modem->read_const_time(30000); $modem->write("ATDT$number\n\r") || die "Could Not Dial\n"; sleep 5; $modem->write("ATH\r") || die "Could Not Dial\n";
Edit by tye, add READMORE
|
|---|