How to use the short_message object with UDH and message properties?
See original GitHub issueHi. I’m having trouble using UDH to concatenate the messages. Can someone show me a simple example? The below is what I have tried:
` // begin const config = require(‘…/src/config.json’);
var smpp = require(‘smpp’); var session = smpp.connect(config.smppSession);
smpp.encodings.default = ‘UCS2’;
session.bind_transceiver({ system_id: config.systemId, password: config.systemPassword }, (pdu) => { if (pdu.command_status === 0) {
// here I try to send some messages
session.submit_sm({
source_addr: config.sourceAddress,
destination_addr: config.destinationAddress,
short_message: {
udh: Buffer.from([0x05, 0x00, 0x03, 0x05, 0x02, 0x01]),
message: "Hello World!"
}
}, (pdu) => {
if (pdu.command_status === 0) {
console.log("First OK");
} else {
console.log("First Error");
}
});
// here's the second message I want to concatenate with
// the first
session.submit_sm({
source_addr: config.sourceAddress,
destination_addr: config.destinationAddress,
short_message: {
udh: Buffer.from([0x05, 0x00, 0x03, 0x05, 0x02, 0x02]),
message: "Hello from Another World!"
}
}, (pdu) => {
if (pdu.command_status === 0) {
console.log("Second OK");
} else {
console.log("Second Error");
}
});
} }); // end `
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Short Message Peer to Peer Protocol Specification v3.4 - SMPP
WARRANT THE ACCURACY OR SUITABILITY OF SAME FOR ANY SPECIFIC USE. SMPP ... The Short Message Peer to Peer (SMPP) protocol is an...
Read more >17 Binary Short Messaging
udh. String in base64Binary. Specifies if the TP-User Data (TP-UD) field contains only the short message, or if it also contains the header...
Read more >ETSI TS 131 115 V9.1.1 (2013-08)
The generalised structure of the UDH in the Short Message element is contained in the User Data part of the Short. Message element...
Read more >TimeSent Property (Message Object) - Microsoft Learn
The TimeReceived and TimeSent properties set and return dates and times as the local time for the users system. When you send messages...
Read more >3GPP TS 23.040 V9.3.0 (2010-09)
Technical realization of the Short Message Service (SMS) ... The Organizational Partners accept no liability for any use of this ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try this code snippet (that’s what I’m using):
If that does not resolve your issue, probably you need to debug on server side.
The error turned out to be server side. I’m not sure why and how it was fixed. Sorry. I think some changes were made on server-connection.js file in this https://github.com/Roave/shorty in lib and that caused the issue with UDH messages. After it was fixed, I could run your code. Thanks!