Typically SMS messages are sent with no data class in GSM 7-bit format. When sent
this way the data coding scheme is the octet 00. Updating our example TPDU and
assuming we are sending a regular SMS message (PID is 00) our TPDU now looks like
this:
PDU
Type
Message
Reference
Destination
Address
Protocol
Identifier
Data
Coding
Scheme
Validity
Period
User
Data
Length
User
Data
01 00
0B91515521
4365F7
00 00
0,1, or 7
Octets
1 Octet
0-140
Octets
The Validity Period is only used if the Validity Period Format bits of the PDU type are
not 0. When the Validity Period is not enabled this field is not used when creating the
TPDU. The Validity Period tells the SC how long it should consider a message valid
before discarding it if it can’t be delivered.
If the Validity Period Format is set for relative then the Validity Period is represented
by 1 octet. The value of the Validity Period when set to relative is defined in this chart:
Validity Period Value Validity Period
0-143 (VP + 1) x 5 minutes
144-167 12 hours + ((VP -143) x 30 minutes)
168-196 (VP - 166) x 1 day
197-255 (VP – 192) x 1 week
For example a value of 176 decimal yields a value of 10 days ((176-166) x 1 day).
Converting 176 to hex gives you a value of B0.
If the Validity Period Format is set to Absolute, then the Validity Period is represented
by 7 octets. The time is given as the last 2 digits of the year, month, day, hour, minute,
second, and time zone. The time zone indicates the difference in quarters of an hour,
between the local time and GMT. For example 32 would represent GMT +08:00. To
represent 2016 January 14, at 5:12:38 pm (17:12:38) GMT +08:00 would be:
Year Month Day Hour Minute Second Time Zone
61 10 41 71 21 83 32
32