Messaging reference · SMPP
SMPP Protocol
& Error Codes
A practical reference for sessions, PDUs, receipts, throughput, status codes and resilient messaging operations.
Profile before assumption. SMPP implementations vary. Confirm the negotiated version, optional parameters, receipt format and provider-specific error mapping.
Session lifecycle
An ESME establishes TCP connectivity and binds as transmitter, receiver or transceiver. A transceiver can submit and receive on one session. Keepalive traffic commonly uses enquire_link; orderly closure uses unbind. Reconnection should use backoff and avoid duplicate submissions.
Essential PDUs
bind_transceiverAuthenticate and open a bidirectional session.
submit_smSubmit a short message to the SMSC.
submit_sm_respReturns command status and, on acceptance, a provider message ID.
deliver_smDelivers a mobile-originated message or delivery receipt to the ESME.
data_smTransfers message data using TLV-oriented semantics where supported.
enquire_linkChecks that an idle SMPP session remains responsive.
unbindRequests orderly session termination.
generic_nackReports an invalid or unsupported PDU header condition.
Delivery receipts
A successful submit_sm_resp means the SMSC accepted the submission; it does not prove handset delivery. A later receipt may report DELIVRD, EXPIRED, UNDELIV, REJECTD or another provider-defined state. Correlate the receipt message ID with the original submission and normalise formats cautiously.
Common command-status codes
ESME_ROKRequest completed successfully.
ESME_RINVMSGLENMessage length is invalid.
ESME_RINVCMDLENPDU command length is invalid.
ESME_RINVCMDIDCommand ID is invalid or unsupported.
ESME_RINVBNDSTSCommand is not permitted in the current bind state.
ESME_RALYBNDThe session is already bound.
ESME_RSYSERRA system error occurred at the SMSC.
ESME_RINVSRCADRSource address is invalid.
ESME_RINVDSTADRDestination address is invalid.
ESME_RBINDFAILBind failed; verify credentials, bind type and source IP.
ESME_RINVPASWDPassword is invalid.
ESME_RINVSYSIDSystem ID is invalid.
ESME_RMSGQFULThe message queue is full.
ESME_RSUBMITFAILThe submit operation failed.
ESME_RTHROTTLEDSubmission rate exceeded the permitted limit.
These are common SMPP 3.4 values. Networks may return additional standard or vendor-specific codes; consult the provider profile before retrying or rerouting.
Windowing and throughput
Windowing permits several unanswered requests at once. Throughput depends on the agreed messages-per-second rate, response latency, window size and multipart segmentation. On throttling, slow down according to the provider policy; aggressive immediate retries can amplify congestion and create duplicates.
Operational checklist
- Validate system_id, password, bind mode and source IP
- Monitor bind state, enquire-link response and reconnect rate
- Track sequence numbers and outstanding window depth
- Normalise message IDs without losing the raw value
- Separate submission acceptance from final delivery
- Make retry rules status-aware and duplication-safe
Reference behaviour against the SMS Forum SMPP v3.4 specification and the exact bilateral provider profile in use.
