Device-Gsm
view release on metacpan or search on metacpan
lib/Device/Gsm.pm view on Meta::CPAN
If present with a true value, it enables sending of SMS messages (only for PDU
mode, text mode SMS won't be influenced by this parameter) with the status
report, also known as delivery report, that is a short message that reports the
status of your sent message.
Usually this is only available if your mobile company supports this feature,
and probably you will be charged a small amount for this service.
More information on this would be welcome.
=back
=head2 service_center()
If called without parameters, returns the actual SMS Service Center phone
number. This is the number your phone automatically calls when receiving and
sending SMS text messages, and your network operator should tell you what this
number is.
Example:
my $gsm = Device::Gsm->new( port => 'COM1' );
$gsm->connect() or die "Can't connect";
$srv_cnt = $gsm->service_center();
print "My service center number is: $srv_cnt\n";
If you want to set or change this number (if used improperly this can disable
sending of SMS messages, so be warned!), you can try something like:
my $ok = $gsm->service_center('+99001234567');
print "Service center changed!\n" if $ok;
=head1 REQUIRES
=over 4
=item *
Device::Modem, which in turn requires
=item *
Device::SerialPort (or Win32::SerialPort on Windows machines)
=back
=head1 EXPORT
None
=head1 TROUBLESHOOTING
If you experience problems, please double check:
=over 4
=item Device permissions
Maybe you don't have necessary permissions to access your serial,
irda or bluetooth port device. Try executing your script as root, or
try, if you don't mind, C<chmod a+rw /dev/ttyS1> (or whatever device
you use instead of C</dev/ttyS1>).
=item Connection speed
Try switching C<baudrate> parameter from 19200 (the default value)
to 9600 or viceversa. This one is the responsible of 80% of the problems,
because there is no baudrate auto-detection.
=item Device autoscan
If all else fails, please use the B<autoscan> utility in the C<bin/> folder
of the C<Device::Gsm> distribution. Try running this autoscan utility and
examine the log file produced in the current directory.
If you lose any hope, send me this log file so I can eventually
have any clue about the problem / failure.
Also this is a profiling tool, to know which commands are supported
by your device, so please send me profiles of your devices, so
I can add better support for all devices in the future!
=back
=head1 TO-DO
=over 4
=item Spooler
Build a simple spooler program that sends all SMS stored in a special
queue (that could be a simple filesystem folder).
=item Validity Period
Support C<validity> period option on SMS sending. Tells how much time the SMS
Service Center must hold the SMS for delivery when not received.
=back
=head1 AUTHOR
Cosimo Streppone, cosimo@cpan.org
=head1 SEE ALSO
L<Device::Modem>, L<Device::SerialPort>, L<Win32::SerialPort>, perl(1)
=cut
( run in 1.389 second using v1.01-cache-2.11-cpan-39bf76dae61 )