Sponsored by CPaaS provider 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-smpp [others]
 Ruby ruby-smpp [others]

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:

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 35.176.139.169 -> 172.31.39.100 SMPP 107 SMPP Bind_receiver
457 23.400600221 172.31.39.100 -> 35.176.139.169 SMPP 98 SMPP Bind_receiver - resp: "Ok"
460 23.410763283 35.176.139.169 -> 172.31.39.100 SMPP 82 SMPP Unbind
461 23.410930297 172.31.39.100 -> 35.176.139.169 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
    Message
    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: 172.31.17.209, Dst: 95.138.154.73
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-2021 SMPP.org


Privacy Policy | Home