Sponsored by
Melrose Labs

SMPP Testing & Development

SMPP Development

The following libraries are available for adding SMPP protocol support to an application:

 C++ cpp-smpp [others]
 C# SMPP.NET [others]
 Go gosmpp [others]
 Java OpenSMPP [others]
 Node.js node-smpp [others]
 Perl Net-SMPP [others]
 PHP php-smpp [others]
 Python python-smpplib [others]
 Ruby ruby-smpp [others]
 Rust smpp [others]

Tutorials with code samples showing how to Send SMS with SMPP can be found on the Melrose Labs website. Run SMPP code samples in your web browser at SMS Code Bench.

SMPP Testing

The following services can be used to test (i) an application that supports SMPP for sending SMS, receiving SMS or both, or (ii) the extent of SMPP support of an SMS gateway or Short Message Service Center:

SMSC Simulator

Use the SMSC simulator service from smpp.org for free to test SMS submission by your application. Your application can connect to the SMSC simulator, submit SMS, and receive message IDs for each message submitted. SMS delivery is simulated, with no messages delivered to mobiles, and delivery receipts indicating successful delivery are returned by the SMSC simulator.

• Host:smscsim.smpp.org
• Port:2775
• System ID:
• Password:

SMPP credentials are randomly generated.

The free SMSC simulator service has the following limitations:

For a comparison of the free smpp.org service with others available, see SMSC Simulator service from Melrose Labs.

SMPP tools

Capturing SMPP packets

Capturing SMPP packets using tshark/wireshark

Performing a packet capture of an SMPP session can be helpful in diagnosing problems. Wireshark and tshark can be used to capture the SMPP session and display the PDUs.

If tshark is not installed on your machine then run one of the following (or equivalent) to install:

sudo yum install wireshark

sudo apt install tshark

To perform a capture, where TCP port 2775 is being used for SMPP:

tshark -i eth0 port 2775 -Y smpp.command_id!=0

(alternatively, tshark -i eth0 port 2775 )

Example command output:

$ tshark -i eth0 port 2775 -Y smpp.command_id!=0
Capturing on 'eth0'
455 23.400286671 -> SMPP 107 SMPP Bind_receiver
457 23.400600221 -> SMPP 98 SMPP Bind_receiver - resp: "Ok"
460 23.410763283 -> SMPP 82 SMPP Unbind
461 23.410930297 -> SMPP 82 SMPP Unbind - resp: "Ok"

Use the -V option to dump the packet to the console:

tshark -i eth0 port 2775 -Y smpp.command_id!=0 -V

$ tshark -i eth0 port 2775 -Y smpp.command_id!=0 -V
Short Message Peer to Peer, Command: Deliver_sm, Seq: 6, Len: 295
    Length: 295
    Operation: Deliver_sm (0x00000005)
    Sequence #: 6
    Service type: (Default)
    Type of number (originator): International (0x01)
    Numbering plan indicator (originator): ISDN (E163/E164) (0x01)
    Originator address: 447799123456
    Type of number (recipient): International (0x01)
    Numbering plan indicator (recipient): ISDN (E163/E164) (0x01)
    Recipient address: 447700123456
    .... ..00 = Messaging mode: Default SMSC mode (0x00)
    ..00 01.. = Message type: Short message contains SMSC Delivery Receipt (0x01)
    00.. .... = GSM features: No specific features selected (0x00)
    Protocol id.: 0x00
    Priority level: GSM: None      ANSI-136: Bulk         IS-95: Normal (0x00)
    Scheduled delivery time: Immediate delivery
    Validity period: SMSC default validity period
    .... ..00 = Delivery receipt: No SMSC delivery receipt requested (0x00)
    .... 00.. = Message type: No recipient SME acknowledgement requested (0x00)
    ...0 .... = Intermediate notif: No intermediate notification requested (0x00)
    .... ...0 = Replace: Don't replace (0x00)
    Data coding: 0x00
        SMPP Data Coding Scheme: SMSC default alphabet (0x00)
        GSM SMS Data Coding
        0000 .... = DCS Coding Group for SMS: SMS DCS: General Data Coding indication - Uncompressed text, no message class (0x00)
        ..0. .... = DCS Text compression: Uncompressed text
        ...0 .... = DCS Class present: No message class
        .... 00.. = DCS Character set: GSM 7-bit default alphabet (0x00)
        GSM CBS Data Coding
        0000 .... = DCS Coding Group for CBS: CBS DCS: Language using the GSM 7-bit default alphabet (0x00)
        ..00 0000 = DCS CBS Message language: German (0x00)
    Predefined message: 0
    Message length: 157
    Optional parameters
        Optional parameter: message_state (0x0427)
            Tag: 0x0427
            Length: 1
            Message state: DELIVERED (2)
        Optional parameter: network_error_code (0x0423)
            Tag: 0x0423
            Length: 3
            Error type: GSM (3)
            Error code: 0x0000
        Optional parameter: receipted_message_id (0x001e)
            Tag: 0x001e
            Length: 65
            SMSC identifier: f87f71c64a2406af4cd58d2596fbc9eaed60eff3c217ffdc2cb2a9f12940ed0a

To show only the SMPP protocol and not the detail of the frame, ethernet, IP or TCP, use the following:

tshark -i eth0 -O smpp -Y smpp.command_id!=0

Frame 30281: 82 bytes on wire (656 bits), 82 bytes captured (656 bits) on interface 0
Ethernet II, Src: 06:54:7b:d8:21:1c (06:54:7b:d8:21:1c), Dst: 06:1d:d9:93:b2:e8 (06:1d:d9:93:b2:e8)
Internet Protocol Version 4, Src:, Dst:
Transmission Control Protocol, Src Port: 53690, Dst Port: 2775, Seq: 81, Ack: 97, Len: 16
Short Message Peer to Peer, Command: Enquire_link - resp, Status: "Ok", Seq: 493, Len: 16
    Length: 16
    Operation: Enquire_link - resp (0x80000015)
    Result: Ok (0x00000000)
    Sequence #: 493

Use the following to capture to file (/tmp/s.pcap) so you can view later in Wireshark:

tshark -i eth0 -w /tmp/s.pcap port 2775

Copyright © 2019-2024 SMPP.org