原始来源:https://www.sharetechnote.com/html/Handbook_UMTS_SMS.html
正文
在 UMTS 中,短消息是作为 NAS 信令在 CS 域上传送的,而不是作为用户数据。RRC 层只是在 DownlinkDirectTransfer 和 UplinkDirectTransfer 消息中承载它。在这些消息内部,三个协议层各自加上自己的头和自己的确认。本节先解释这些层,然后逐一分析来自测试仪表的两次 MT 短信抓包。第一次是一条普通短信,第二次是一条带状态报告请求和回复路径的 class 0 短信。
- MT 短信如何在 UMTS 上传送?
- 情形 1:MT 短信 —— 无消息类别、无状态报告请求、无回复路径
- 情形 2:MT 短信 —— class 0、请求状态报告、有回复路径
- 两种情形之间有什么变化?
- 参考 本节中的每一次抓包都有四条 NAS 消息,但只有一条短消息。原因在于短信由三层构成,其中两层各有自己的确认。因此在读日志之前,先把各层拆开来看。
最底层是 24.011 的 CM 子层,其消息为 CP-DATA、CP-ACK 和 CP-ERROR。CP-ACK 只确认 CP-DATA 已经到达。中间层是 24.011 的中继层,其消息为 RP-DATA、RP-ACK、RP-ERROR 和 RP-SMMA。RP-ACK 确认短消息已被接受。顶层是 23.040 的传输层,它定义了 TPDU:这里是来自服务中心的 SMS-DELIVER 和来自 UE 的 SMS-DELIVER-REPORT。每一层都承载在下一层的用户数据字段中。
| 层 | 规范 | 抓包中的消息 | 其确认的含义 |
|---|---|---|---|
| CM 子层,CP | 24.011,协议鉴别符 1001 | CP-DATA、CP-ACK | CP-ACK:CP-DATA 已到达 |
| 中继层,RP | 24.011 | RP-DATA、RP-ACK | RP-ACK:短消息已被接受 |
| 传输层,TP | 23.040 | SMS-DELIVER、SMS-DELIVER-REPORT | 承载在 RP-ACK 或 RP-ERROR 内部 |
层
规范
抓包中的消息
其确认的含义
CM 子层,CP
24.011,协议鉴别符 1001
CP-DATA、CP-ACK
CP-ACK:CP-DATA 已到达
中继层,RP
24.011
RP-DATA、RP-ACK
RP-ACK:短消息已被接受
传输层,TP
23.040
SMS-DELIVER、SMS-DELIVER-REPORT
承载在 RP-ACK 或 RP-ERROR 内部
因此,MT 短信总是遵循同样的四个步骤。网络发送携带 RP-DATA 的 CP-DATA,UE 用 CP-ACK 确认;随后 UE 发送自己携带 RP-ACK 的 CP-DATA,网络再用 CP-ACK 确认。每个 CP-DATA 的发送方都会启动定时器 TC1*,若 CP-ACK 未及时到达就重发 CP-DATA。在 UE 侧,定时器 TR2M(12 至 20 秒)限制了 UE 生成 RP-ACK 所允许的时间。
MO 短信的流程与之镜像对称。UE 发送携带 RP-DATA 的 CP-DATA,其中的 TPDU 是 SMS-SUBMIT。网络先用 CP-ACK 应答,然后用携带 RP-ACK 的 CP-DATA 应答,其中含有 SMS-SUBMIT-REPORT。UE 最后再用一个 CP-ACK 确认。在 UE 侧,定时器 TR1M(35 至 45 秒)限制等待 RP-ACK 的时间。同样的 CP 和 RP 消息也可以通过 GMM(而非 MM)在 PS 域上运行。本节中的抓包使用 CS 域,这就是为什么 RRC 消息携带 cn-DomainIdentity cs-domain。
- 两种确认,两种含义:只有 CP-ACK 而没有 RP-ACK,表示消息已到达,但 UE 尚未接受它。
- TI 标志表示事务的方向:事务由网络发起,因此其消息携带 TI flag 0,UE 则用 TI flag 1 应答。
- RRC 只承载短信:cn-DomainIdentity cs-domain 是 RRC 层唯一与短信相关的字段。 这是最简单的情形,SMS-DELIVER 的所有可选特性都关闭了。它为情形 2 提供了基准。测试仪表扮演网络和服务中心,向 UE 发送文本「MT SMS」。
-
<处于空闲模式或连接模式>
-
<从网络向被测 UE 发送一条短信>
-
<视情形而定的各种协议流程>
-
UE <- NW:downlinkDirectTransfer + SMS:CP-DATA
-
UE -> NW:uplinkDirectTransfer + SMS:CP-ACK
-
UE -> NW:uplinkDirectTransfer + SMS:CP-DATA
-
UE <- NW:downlinkDirectTransfer + SMS:CP-ACK
步骤 01 至 03 取决于 UE 的状态。在空闲模式下,网络先寻呼 UE,建立 RRC 连接和 MM 连接;在连接模式下,则可以直接使用现有连接。两种情形下,那四条短信消息本身是相同的。
这一条消息承载了整条短消息,在 RRC 内部嵌套了三层。解码器逐层打印:先是 CP-DATA,然后是 RP-DATA,再是 SMS-DELIVER TPDU,最后是原始的 RRC 字节。
来自测试仪表日志的解码消息(抓包所得)。字段值取自真实抓包,而非规范。
DLT: 147, Payload: rrc.dl.dcch (Radio Resource Control (RRC) protocol) DL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 2848d6b8 [bit length 32, 0010 1000 0100 1000 1101 0110 1011 1000 decimal value 675862200] rrc-MessageSequenceNumber: 0 message: downlinkDirectTransfer (5) downlinkDirectTransfer: r3 (0) r3 downlinkDirectTransfer-r3 rrc-TransactionIdentifier: 0 cn-DomainIdentity: cs-domain (0) nas-Message: 090121010004819999990018040a81214365870900005140... GSM A-I/F DTAP - CP-DATA Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 0... .... = TI flag: allocated by sender .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-DATA (0x01) CP-User Data Length: 33 RPDU (not displayed) GSM A-I/F RP - RP-DATA (Network to MS) Message Type RP-DATA (Network to MS) RP-Message Reference RP-Message Reference: 0x00 (0) RP-Originator Address - (999999) Length: 4 1... .... = Extension: No Extension .000 .... = Type of number: unknown (0x00) .... 0001 = Numbering plan identification: ISDN/Telephony Numbering (ITU-T Rec. E.164 / ITU-T Rec. E.163) (0x01) BCD Digits: 999999 RP-Destination Address Length: 0 RP-User Data Length: 24 TPDU (not displayed) GSM SMS TPDU (GSM 03.40) SMS-DELIVER 0... .... = TP-RP: TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER .0.. .... = TP-UDHI: The TP UD field contains only the short message ..0. .... = TP-SRI: A status report shall not be returned to the SME .... .1.. = TP-MMS: No more messages are waiting for the MS in this SC .... ..00 = TP-MTI: SMS-DELIVER (0) TP-Originating-Address - (1234567890) Length: 10 address digits 1... .... : No extension .000 .... : Type of number: (0) Unknown .... 0001 : Numbering plan: (1) ISDN/telephone (E.164/E.163) TP-OA Digits: 1234567890 TP-PID: 0 00.. .... : defines formatting for subsequent bits ..0. .... : no telematic interworking, but SME-to-SME protocol ...0 0000 : the SM-AL protocol being used between the SME and the MS (0) TP-DCS: 0 00.. .... = Coding Group Bits: General Data Coding indication (0) Special case, GSM 7 bit default alphabet TP-Service-Centre-Time-Stamp Year 15, Month 04, Day 07 Hour 13, Minutes 13, Seconds 29 Timezone: GMT + 5 hours 0 minutes TP-User-Data-Length: (6) depends on Data-Coding-Scheme TP-User-Data SMS text: MT SMS DL-DCCH (Hex) : 94 24 6B 5C 01 40 04 61 20 24 20 20 00 90 33 33 33 20 03 00 81 50 24 28 6C B0 E1 20 00 0A 28 0E 06 26 32 40 40 C9 A5 4D 1B 53 80 40
我们顺着 nas-Message 的字节来看。09 是 SMS 的协议鉴别符 9,TI flag 为 0;01 是 CP-DATA。21 是 CP 用户数据长度,即 33 个八位位组。接下来是 RP-DATA:01 是从网络到 MS 的 RP 消息类型 RP-DATA,00 是 RP-Message Reference。04 81 99 99 99 是 RP-Originator Address,也就是服务中心的地址 999999。00 是空的 RP-Destination Address,这个方向总是这样发送。18 是 RP 用户数据长度,即 24 个八位位组。
TPDU 以 04 开始。其 TP-MTI 为 00,表示 SMS-DELIVER;TP-MMS 为 1,表示服务中心没有更多待发消息。TP-SRI 和 TP-RP 均为 0。0A 81 21 43 65 87 09 是 TP-Originating-Address,共 10 位数字,即 1234567890。TP-PID 为 0,TP-DCS 为 0,表示 GSM 7 bit 默认字母表且无消息类别。「MT SMS」的 6 个字符经过 7 bit 打包后占 6 个八位位组。因此 TPDU 为 1 + 7 + 1 + 1 + 7 + 1 + 6 = 24 个八位位组,与 RP 用户数据长度一致。
UE 在 CM 子层确认 CP-DATA 已到达。这还不算对短消息的接受。没有它,网络会在 TC1* 到期时重发 CP-DATA。
DLT: 147, Payload: rrc.ul.dcch (Radio Resource Control (RRC) protocol) UL-DCCH-Message integrityCheckInfo messageAuthenticationCode: b8adcbba [bit length 32, 1011 1000 1010 1101 1100 1011 1011 1010 decimal value 3098397626] rrc-MessageSequenceNumber: 1 message: uplinkDirectTransfer (27) uplinkDirectTransfer cn-DomainIdentity: cs-domain (0) nas-Message: 8904 GSM A-I/F DTAP - CP-ACK Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 1... .... = TI flag: allocated by receiver .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-ACK (0x04) UL-DCCH : DC 56 E5 DD 0E C0 00 C4 82 00
整条 NAS 消息只有两个八位位组:89 04。此时 TI flag 为 1,因为 UE 是在网络发起的事务内应答。TIO 仍为 0,因此这个 CP-ACK 属于步骤 04 的 CP-DATA。
这才是对短消息的真正答复。UE 把 RP-ACK 放进一个新的 CP-DATA,告诉服务中心它已接受 SMS-DELIVER。RP-ACK 携带一个几乎为空的 SMS-DELIVER-REPORT。
DLT: 147, Payload: rrc.ul.dcch (Radio Resource Control (RRC) protocol) UL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 1b631b7a [bit length 32, 0001 1011 0110 0011 0001 1011 0111 1010 decimal value 459479930] rrc-MessageSequenceNumber: 2 message: uplinkDirectTransfer (27) uplinkDirectTransfer cn-DomainIdentity: cs-domain (0) nas-Message: 890106020041020000 GSM A-I/F DTAP - CP-DATA Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 1... .... = TI flag: allocated by receiver .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-DATA (0x01) CP-User Data Length: 6 RPDU (not displayed) GSM A-I/F RP - RP-ACK (MS to Network) Message Type RP-ACK (MS to Network) RP-Message Reference RP-Message Reference: 0x00 (0) RP-User Data Element ID: 0x41 Length: 2 TPDU (not displayed) GSM SMS TPDU (GSM 03.40) SMS-DELIVER REPORT .0.. .... = TP-UDHI: The TP UD field contains only the short message .... .0.. = TP-MMS: More messages are waiting for the MS in this SC .... ..00 = TP-MTI: SMS-DELIVER REPORT (0) TP-Parameter-Indicator 0... .... : No extension .000 0... : Reserved .... .0.. : TP-UDL not present .... ..0. : TP-DCS not present .... ...0 : TP-PID not present UL-DCCH : 8D B1 8D BD 16 C0 04 44 80 83 01 00 20 81 00 00 00
NAS 消息为 89 01 06 02 00 41 02 00 00。CP 头之后,06 是 CP 用户数据长度。02 是从 MS 到网络的 RP-ACK,00 是 RP-Message Reference,与步骤 04 中 RP-DATA 的值相同。41 是可选 RP 用户数据的 IEI,长度为 2。TPDU 为 00 00:第一个八位位组给出 TP-MTI 00,即 SMS-DELIVER-REPORT;第二个是值为 0 的 TP-Parameter-Indicator,因此 TP-PID、TP-DCS 和 TP-UDL 都不存在。
注意解码结果中的一行。解码器对 SMS-DELIVER-REPORT 显示「TP-MMS:还有更多消息在等待」。但 23.040 并未在 SMS-DELIVER-REPORT 中定义 TP-MMS,那里的比特 2 只是未使用并被置为 0,因此这一行是解码器的假象,没有任何意义。
网络用针对步骤 06 的 CP-DATA 的 CP-ACK 来结束这次短信事务。在此消息之后,双方都可以释放 MM 连接,短信传递即告完成。
DLT: 147, Payload: rrc.dl.dcch (Radio Resource Control (RRC) protocol) DL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 536feda8 [bit length 32, 0101 0011 0110 1111 1110 1101 1010 1000 decimal value 1399844264] rrc-MessageSequenceNumber: 1 message: downlinkDirectTransfer (5) downlinkDirectTransfer: r3 (0) r3 downlinkDirectTransfer-r3 rrc-TransactionIdentifier: 0 cn-DomainIdentity: cs-domain (0) nas-Message: 0904 GSM A-I/F DTAP - CP-ACK Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 0... .... = TI flag: allocated by sender .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-ACK (0x04) DL-DCCH : A9 B7 F6 D4 09 40 00 21 20 80
- RP-Message Reference 把步骤 04 和 06 联系起来:服务中心通过这个值(两者均为 0)把 RP-ACK 与其 RP-DATA 配对。
- TP-DCS 0 是最常见的取值:它表示 GSM 7 bit 默认字母表且无消息类别,因此 UE 按自己的规则存储该消息。
- 长度精确嵌套:CP 用户数据 33 = RP 头 9 个八位位组 + TPDU 24 个八位位组,而 TPDU 各字段加起来正好是 24。 本情形发送文本「MT SMS 2」,并打开了三个选项:消息类别 0、给发送方的状态报告以及回复路径。三者都位于 SMS-DELIVER TPDU 中,因此只有步骤 04 与情形 1 不同。
把这个解码结果与情形 1 的步骤 04 对照。除长度外,CP 层和 RP 层都相同,区别只在 TPDU 的第一个八位位组、TP-DCS 以及用户数据。
DLT: 147, Payload: rrc.dl.dcch (Radio Resource Control (RRC) protocol) DL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 45c8f692 [bit length 32, 0100 0101 1100 1000 1111 0110 1001 0010 decimal value 1170798226] rrc-MessageSequenceNumber: 0 message: downlinkDirectTransfer (5) downlinkDirectTransfer: r3 (0) r3 downlinkDirectTransfer-r3 rrc-TransactionIdentifier: 0 cn-DomainIdentity: cs-domain (0) nas-Message: 090122010004819999990019a40a81214365870900105140... GSM A-I/F DTAP - CP-DATA Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 0... .... = TI flag: allocated by sender .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-DATA (0x01) CP-User Data Length: 34 RPDU (not displayed) GSM A-I/F RP - RP-DATA (Network to MS) Message Type RP-DATA (Network to MS) RP-Message Reference RP-Message Reference: 0x00 (0) RP-Originator Address - (999999) Length: 4 1... .... = Extension: No Extension .000 .... = Type of number: unknown (0x00) .... 0001 = Numbering plan identification: ISDN/Telephony Numbering (ITU-T Rec. E.164 / ITU-T Rec. E.163) (0x01) BCD Digits: 999999 RP-Destination Address Length: 0 RP-User Data Length: 25 TPDU (not displayed) GSM SMS TPDU (GSM 03.40) SMS-DELIVER 1... .... = TP-RP: TP Reply Path parameter is set in this SMS SUBMIT/DELIVER .0.. .... = TP-UDHI: The TP UD field contains only the short message ..1. .... = TP-SRI: A status report shall be returned to the SME .... .1.. = TP-MMS: No more messages are waiting for the MS in this SC .... ..00 = TP-MTI: SMS-DELIVER (0) TP-Originating-Address - (1234567890) Length: 10 address digits 1... .... : No extension .000 .... : Type of number: (0) Unknown .... 0001 : Numbering plan: (1) ISDN/telephone (E.164/E.163) TP-OA Digits: 1234567890 TP-PID: 0 00.. .... : defines formatting for subsequent bits ..0. .... : no telematic interworking, but SME-to-SME protocol ...0 0000 : the SM-AL protocol being used between the SME and the MS (0) TP-DCS: 16 00.. .... = Coding Group Bits: General Data Coding indication (0) 00.. .... : General Data Coding indication ..0. .... : Text is not compressed ...1 .... : Message class is defined below .... 00.. : Character set: GSM 7 bit default alphabet .... ..00 : Message Class: Class 0 TP-Service-Centre-Time-Stamp Year 15, Month 04, Day 07 Hour 13, Minutes 41, Seconds 28 Timezone: GMT + 5 hours 0 minutes TP-User-Data-Length: (8) depends on Data-Coding-Scheme TP-User-Data SMS text: MT SMS 2 DL-DCCH (Hex) : A2 E4 7B 49 01 40 04 81 20 24 40 20 00 90 33 33 33 20 03 34 81 50 24 28 6C B0 E1 20 02 0A 28 0E 06 22 90 40 41 09 A5 4D 1B 53 90 4C 80
TPDU 的第一个八位位组现在是 A4,而不是 04。比特 7 是 TP-RP = 1,说明存在回复路径。比特 5 是 TP-SRI = 1,因此服务中心会向发送该消息的 SME 返回状态报告。比特 2 仍为 TP-MMS = 1。TP-DCS 是 16,即 0x10。TP-DCS 的比特 4 为 1,因此比特 1 和 0 携带消息类别,其取值 00 表示 class 0。比特 3 和 2 为 00,即 GSM 7 bit 默认字母表。
「MT SMS 2」有 8 个字符,经过 7 bit 打包后占 7 个八位位组。因此 TPDU 增至 25 个八位位组,RP 用户数据长度为 25,CP 用户数据长度为十六进制的 22,即 34。状态报告是服务中心与发送方之间的事,UE 不为此做任何额外动作。回复路径意味着来自这个 UE 的回复可以经由同一个服务中心,即 RP-Originator Address 中的 999999。class 0 意味着 UE 立即在屏幕上显示文本,并且默认不存储它。「SMS 类别」一节详细解释了各种类别。
CP-ACK 与情形 1 中的一样,都是两个八位位组 89 04。消息类别和其他 TPDU 选项在 CM 子层是不可见的,因此这条消息在两种情形下不可能有区别。
DLT: 147, Payload: rrc.ul.dcch (Radio Resource Control (RRC) protocol) UL-DCCH-Message integrityCheckInfo messageAuthenticationCode: bfa07cf9 [bit length 32, 1011 1111 1010 0000 0111 1100 1111 1001 decimal value 3214966009] rrc-MessageSequenceNumber: 1 message: uplinkDirectTransfer (27) uplinkDirectTransfer cn-DomainIdentity: cs-domain (0) nas-Message: 8904 GSM A-I/F DTAP - CP-ACK Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 1... .... = TI flag: allocated by receiver .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-ACK (0x04) UL-DCCH : DF D0 3E 7C 8E C0 00 C4 82 00
RP-ACK 也与情形 1 逐字节相同。class 0 消息一到达 UE 就得到确认,因此 UE 用与存储型消息相同的方式确认它。
DLT: 147, Payload: rrc.ul.dcch (Radio Resource Control (RRC) protocol) UL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 47c1e8a5 [bit length 32, 0100 0111 1100 0001 1110 1000 1010 0101 decimal value 1203890341] rrc-MessageSequenceNumber: 2 message: uplinkDirectTransfer (27) uplinkDirectTransfer cn-DomainIdentity: cs-domain (0) nas-Message: 890106020041020000 GSM A-I/F DTAP - CP-DATA Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 1... .... = TI flag: allocated by receiver .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-DATA (0x01) CP-User Data Length: 6 RPDU (not displayed) GSM A-I/F RP - RP-ACK (MS to Network) Message Type RP-ACK (MS to Network) RP-Message Reference RP-Message Reference: 0x00 (0) RP-User Data Element ID: 0x41 Length: 2 TPDU (not displayed) GSM SMS TPDU (GSM 03.40) SMS-DELIVER REPORT .0.. .... = TP-UDHI: The TP UD field contains only the short message .... .0.. = TP-MMS: More messages are waiting for the MS in this SC .... ..00 = TP-MTI: SMS-DELIVER REPORT (0) TP-Parameter-Indicator 0... .... : No extension .000 0... : Reserved .... .0.. : TP-UDL not present .... ..0. : TP-DCS not present .... ...0 : TP-PID not present UL-DCCH : 8D B1 8D BD 16 C0 04 44 80 83 01 00 20 81 00 00 00
把这次抓包的原始字节与其解码结果对照。UL-DCCH 这一行与情形 1 步骤 06 中的完全相同:在第一个比特之后,其前 32 位给出的 messageAuthenticationCode 为 1b631b7a,正是情形 1 的取值;而上面的解码显示的是 47c1e8a5。因此这一步的十六进制行是从情形 1 复制过来的,并不属于这个解码结果。抓包保持原样未作改动。
网络结束事务的方式与情形 1 完全相同。只有完整性校验字段和 rrc-MessageSequenceNumber 不同,因为它们随每条 RRC 消息而变化。
DLT: 147, Payload: rrc.dl.dcch (Radio Resource Control (RRC) protocol) DL-DCCH-Message integrityCheckInfo messageAuthenticationCode: 94a77955 [bit length 32, 1001 0100 1010 0111 0111 1001 0101 0101 decimal value 2494003541] rrc-MessageSequenceNumber: 1 message: downlinkDirectTransfer (5) downlinkDirectTransfer: r3 (0) r3 downlinkDirectTransfer-r3 rrc-TransactionIdentifier: 0 cn-DomainIdentity: cs-domain (0) nas-Message: 0904 GSM A-I/F DTAP - CP-ACK Protocol Discriminator: SMS messages .... 1001 = Protocol discriminator: SMS messages (0x09) 0... .... = TI flag: allocated by sender .000 .... = TIO: 0 DTAP Short Message Service Message Type: CP-ACK (0x04) DL-DCCH : CA 53 BC AA 89 40 00 21 20 80
- 三个选项都位于 SMS-DELIVER 中:类别、状态报告和回复路径只改变步骤 04。
- class 0 不改变应答:UE 用与其他任何消息相同的 RP-ACK 来确认 class 0 消息。
- 要把十六进制与解码结果对照:messageAuthenticationCode 是最容易比较的字段,因为它就紧跟在第一个比特之后。 把两次步骤 04 的解码结果并排放在一起,可以看出三个选项对消息的改动有多小。所有区别都在 TPDU 中,而长度之所以变化,只是因为文本多了两个字符。
| 字段 | 情形 1 | 情形 2 | 在情形 2 中的含义 |
|---|---|---|---|
| TPDU 第一个八位位组 | 04 | A4 | TP-RP 和 TP-SRI 置位 |
| TP-RP | 0 | 1 | 存在回复路径 |
| TP-SRI | 0 | 1 | 状态报告返回给发送方 |
| TP-DCS | 0 | 16 | class 0,GSM 7 bit 默认字母表 |
| TP-User-Data-Length | 6 | 8 | 「MT SMS 2」有 8 个字符 |
| RP 用户数据长度 | 24 | 25 | 打包文本多出一个八位位组 |
| CP 用户数据长度 | 33 | 34 | 随 RP 长度变化 |
| 步骤 05 至 07 | - | - | 两种情形的 NAS 内容相同 |
字段
情形 1
情形 2
在情形 2 中的含义
TPDU 第一个八位位组
04
A4
TP-RP 和 TP-SRI 置位
TP-RP
存在回复路径
TP-SRI
状态报告返回给发送方
TP-DCS
16
class 0,GSM 7 bit 默认字母表
TP-User-Data-Length
「MT SMS 2」有 8 个字符
RP 用户数据长度
24
25
打包文本多出一个八位位组
CP 用户数据长度
33
34
随 RP 长度变化
步骤 05 至 07
两种情形的 NAS 内容相同
表格无法显示的是 UE 中的效果。在情形 1 中,UE 存储该消息并显示在收件箱里;在情形 2 中,UE 立即在屏幕上显示,只有用户保存才会保留。状态报告随后由服务中心发给原发送方,永远不会出现在 UE 日志中。如果想看到失败而非成功,就在步骤 06 中寻找 RP-ERROR,其 RP-Cause 可能是 22(memory capacity exceeded,存储容量超出)。
24.011 列出了 UE 在针对 MT 短信的 RP-ERROR 中可能发送的 RP-Cause 值,见下表。其中大多数报告的是协议问题,因此在测试日志中,它们通常指向测试仪表发出的格式错误的 RP-DATA,而不是 UE 的问题。
| RP-Cause | 含义 |
|---|---|
| 22 | 存储容量超出 |
| 81 | 无效的短消息传送参考值 |
| 95 | 语义错误的消息 |
| 96 | 无效的必选信息 |
| 97 | 消息类型不存在或未实现 |
| 98 | 消息与短消息协议状态不兼容 |
| 99 | 信息元素不存在或未实现 |
| 111 | 协议错误,未指明 |
RP-Cause
含义
22
存储容量超出
81
无效的短消息传送参考值
95
语义错误的消息
96
无效的必选信息
97
消息类型不存在或未实现
98
消息与短消息协议状态不兼容
99
信息元素不存在或未实现
111
协议错误,未指明
24.011 把任何其他取值都当作原因 111。原因 22 是唯一会改变网络行为的。出现它之后,网络会等待 UE 用 RP-SMMA 报告有空闲存储,然后才重试。
- CP 层和 RP 层并不知道这些选项:它们原样承载 TPDU,因此只有长度字段会变化。
- 状态报告请求不会改变 UE 的行为:TP-SRI 只是告知 UE 发送方请求了报告,而报告由服务中心发送。
- 失败的传递出现在步骤 06:那里由 RP-ERROR 取代 RP-ACK,其原因会告诉你 UE 为什么拒绝该消息。
- 3GPP TS 24.011 v20.0.0:移动无线接口上的点对点(PP)短消息业务(SMS)支持
- 3GPP TS 23.040 v20.0.0:短消息业务(SMS)的技术实现
- 3GPP TS 23.038 v20.0.0:字母表与语言相关信息
- 3GPP TS 25.331 v19.0.1:无线资源控制(RRC);协议规范