Posted by pitombera on Wed 28 Jan 03:23
report abuse | download | new post
- #!/usr/bin/perl
- #
- use strict;
- use Device::Gsm;
- #
- # Conf
- my $myport = $^O =~ /freebsd/ ? '/dev/ttyU0' : '/dev/ttyACM0'; # Define device
- my $mypin = '0000'; # Define pin
- #
- # If you have problems with bad characters being trasmitted across serial link,
- # try different baud rates, as below...
- #
- # .---------------------------------.
- # | Model (phone/modem) | Baudrate |
- # |---------------------+-----------|
- # | Falcom Swing (A2D) | 9600 |
- # | Motorola v3/v550 | 9600 |
- # | Siemens C35/C45 | 19200 |
- # | Digicom | 9600 |
- # | Nokia Communicator | 9600 |
- # `---------------------------------'
- #
- print "\nok! connected and registered to network.\n";
- # +557188116605
- my $prefix = '+55';
- my $number = $prefix . $ARGV[0];
- my $content;
- do {
- # print "\nSMS Text (max 160 chars):\n";
- } until $content;
- my $lOk = $gsm->send_sms(
- content => $content,
- recipient => $number,
- class => 'normal' # try `flash'
- );
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.