GSM::SMS::Transport::Serial - Send and receive SMS messages via a GSM modem
This class implements a serial transport. It uses Device::SerialPort to communicate to the modem. At the moment the modem that I recommend is the WAVECOM modem. The serial transport has also been tested for the M20 modem module from SIEMENS.
This module is in fact the root of the complete GSM::SMS package, as the project started as a simple perl script that talked to a Nokia6110 connected via a software modem ( as that model did not implement standard AT ) on a WINNT machine, using Win32::SerialPort and Activestate perl.
I first used the Nokia6110, then moved to the Falcom A1 GSM modem, then moved to the SIEMENS M20 and then moved to the WAVECOM series. Both M20 and WAVECOM work best, but I could crash the firmware in the M20 by sending some fake PDU messages. Therefore I only use the wavecom now.
my $s = GSM::SMS::Transport::Serial->new( -name => 'serial', -originator => 'GSM::SMS', -match => '.*', -pin_code => '0000', -csca => '+32475161616', -serial_port => '/dev/ttyS0', -baud_rate => '9600', -memorylimit => '10' }
The DESTRUCTOR is necessary for compatibility with Win32. It seems that the serial port needs to be closed explicitly before being able to reuse it in the same process.
Will return a PDU string in $pduref from the modem IF we have a message pending return: 0 if PDU received -1 if no message pending
No init file -> default initfile for transport
.. just return an informative string on success
The Device::SerialPort (Win32::SerialPort) puts a big load on your system (active polling).
The initialisation does not always work well and sometimes you have to initialize your modem manually using minicom or something like that. Win32 users can use terminal to connect to the modem and run these tests.
>minicom -s AT AT+CPIN? AT+CPIN="nnn" AT+CSCA? AT+CSCA="+32475161616"
+CPIN puts the pin-code in the modem; Be carefull, only 3 tries and then you have to provide the PUK code etc ...
+CSCA sets the service center address
Johan Van den Brande <email@example.com>