I need to use the modem to connect to another one
and particularly pay attention to errors. Many errors are possible, but here I want to focus on the case where the other side is not a modem(i.e. has unplugged the PC and plugged in the normal phone)
Here is an
use Device::SerialPort;
#
my $dialled_no='......';
&start_dialing($dialled_no);
sub start_dialing
{my $number=shift;
my $modem=new Device::SerialPort('/dev/cuad0') or die
"Unable to pen /dev/cuad0\n";
### Question no 1: What do I use instead of /dev/cuad0 if
### this will be used from a Windows machine?
# $modem->baudrate(115200);
$modem->baudrate(9600);
$modem->parity("none");
$modem->databits(8);
$modem->stopbits(1);
$modem->write("ATH;\n");
$modem->write("ATDT $number;\n");
### here I am unsure as to how you actually make the call and grab the other modem responses.
}
and particularly pay attention to errors. Many errors are possible, but here I want to focus on the case where the other side is not a modem(i.e. has unplugged the PC and plugged in the normal phone)
Here is an
use Device::SerialPort;
#
my $dialled_no='......';
&start_dialing($dialled_no);
sub start_dialing
{my $number=shift;
my $modem=new Device::SerialPort('/dev/cuad0') or die
"Unable to pen /dev/cuad0\n";
### Question no 1: What do I use instead of /dev/cuad0 if
### this will be used from a Windows machine?
# $modem->baudrate(115200);
$modem->baudrate(9600);
$modem->parity("none");
$modem->databits(8);
$modem->stopbits(1);
$modem->write("ATH;\n");
$modem->write("ATDT $number;\n");
### here I am unsure as to how you actually make the call and grab the other modem responses.
}