How to correctly represent message class in SMPP
Asked Answered
R

1

8

I am currently trying to figure out how sms classes are correctly represented in SMPP. However I am by now completely confused by the standard and it's documentation.

In normal sms we have

  • Class0: Flash sms, which are shown on the display
  • Class1: Normal Sms to be stored on the sim or internally in the device

Looking at the SMPP spec, I first find the parameter data_coding in the submit_sm operation, which is used to set the DCS sent via MAP. As far as I understand this, if we want to explicitly set the message class we need to set the first four bits of this parameter to ones, then two bits indicating the coding and then another two bits indicating the message class. So for Class1 Sms, we would set 1111xx01. Is this correct so far?

If we try to set this DCS, however currently we also set the data coding to "8-Bit data". It seems, several phones are not able to understand this. Is this specified anywhere, and can we just change this, or is a special coding needed when sending other message classes.

More confusion arises, when we try to use the SMPPv3.4 recommended way of setting the Message class. Since 3.4 there is an optional parameter in the submit_sm operation, called dest_addr_subunit. According to the standard this parameter should be set to 0 for unknown, 1 for MS-Display, 2 for Mobile equipment, etc. If I look at this, it seems the parameters are shifted by one compared to GSM message classes. Class0 is encoded as 1, Class1 is encoded as 2 and so on. Is this correct or is there any more complicated mapping behind this?

Also, if we set dest_addr_subunit, do we still have to set DCS as well, or can we just leave this parameter at it's default value?

Rus answered 14/10, 2011 at 9:6 Comment(0)
I
11

I recommend to read 3GPP TS 23.038 specification with detailed DCS (Data Coding Scheme) description.

In case of DCS bits 7654 are 00xx, you should check DCS for bit 4 value.

  • bit 4 == 0 - no message class for this message (bits 1 and 0 are reserved)
  • bit 4 == 1 - bits 1 and 0 contains message class

So you should set data_coding SMPP parameter in accordance to 3GPP TS 23.038 specification to handle message_class properly.

By default GSM SMS message has no message_class and this is not the same as message_class = 1.

Isaac answered 27/1, 2012 at 15:52 Comment(3)
So if I understand this document correctly the main confusion comes from the fact that the message class can both be indicated by the scheme 1111xxyy where xx is the coding and yy is the message class or by the scheme 00c10xyy where c indicates compression x indicates coding and yy indicate the message class. What confuses me here, is that both methods seem absolutely the same, and one does not seem to work with all devices in our case.Rus
Usually I use the following representation: 0001ccmm where cc is a coding (00 for default GSM) and mmis message_class`` representation (00 for flash SMS) so example will be 00010000 for 7bit flash SMS. Option 11110cmm is possible but I never seen this one used in practice.Isaac
I've tested 0001cc00 and it doesn't work for class 0 messages ("flash" messages) on Android; 1111cc00 works as expected.Fictional

© 2022 - 2024 — McMap. All rights reserved.