Skip to content

Instantly share code, notes, and snippets.

@ksurent
Created May 12, 2009 14:22
Show Gist options
  • Save ksurent/110514 to your computer and use it in GitHub Desktop.
Save ksurent/110514 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use Device::Gsm;
$| = 1;
my $modem = Device::Gsm->new(
port => 'COM3',
pin => '0000',
log => 'file,call.log',
);
print "Init...";
$modem->connect(baudrate => 115200) or die 'Modem connection failed';
print "OK\n";
for(1..int shift) {
print "Dialing...";
$modem->atsend('ATD 89195685942IG' . Device::Modem::CR);
print $modem->answer(undef, 5000) || '<no modem response>', "\n";
$modem->atsend('ATH' . Device::Modem::CR);
$modem->answer(undef, 1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment