GSM::SMS::PDU - Codec for Protocol Data Units.
This module implements 2 PDUs ( Protocol Data Units ) ,SMS-DELIVER and SMS-SUBMIT, as defined in the SM-TL (Short Message Transport Layer ) specifications. These PDUs are defined in the GSM03.40 specification from the ETSI ( www.etsi.org ). These PDUs are sufficient to implement NBS ( Narrow Bandwidth Sockets ). Specification GSM07.05 explains the MMI ( Man Machine Interface ) for the AT+Cellular commands to be able to talk to a GSM modem.
use GSM::SMS::PDU; my $pdu = GSM::SMS::PDU->new();
Decode a short message that comes from the SMSC (Short Message Service Center) to the MS (Mobile Station) (SMS-DELIVER). Returns itself as a hash and you can access values the following way:
my $originating_address = $pdu->{'TP-OA'};
Encode a short message for sending from the MS to the SMSC (SMS-SUBMIT).
my $encoded = $pdu->SMSSubmit( $servicecenteraddress, $phonenumber, $payload, $datacodingscheme, $validityperiod, $userdataincluded );
Decode a SMS-SUBMIT PDU.
No real OO design. The NBS part that filters out the port-number in the UD ( User Data ) should be migrated to a higher (abstraction) layer. No support for charsets.
Johan Van den Brande <johan@vandenbrande.com>
To install GSM::SMS::NBS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GSM::SMS::NBS
CPAN shell
perl -MCPAN -e shell install GSM::SMS::NBS
For more information on module installation, please visit the detailed CPAN module installation guide.