2021年8月17日 星期二

CR (Carriage Return, 0x0D = '\r') and LF (Line Feed, 0x0A = '\n')

 '\r'是回車,前者使游標到行首,(carriage return)ASCII碼(0x0D)

'\n'是換行,後者使游標下移一格,(line feed)ASCII碼(0xoA)

\r 是回車,return
\n 是換行,newline
對於換行這個動作,unix下一般只有一個0x0A表示換行("\n"),windows下一般都是0x0D和0x0A兩個字元("\r\n"),蘋果機(MAC OS系統)則採用回車符CR表示下一行(\r)

Unix系統裡,每行結尾只有“<換行>”,即“\n”;
Windows系統裡面,每行結尾是“<回車><換行>”,即“\r\n”;
Mac系統裡,每行結尾是“<回車>”,即“\r”。
一個直接後果是,Unix/Mac系統下的檔案在Windows裡開啟的話,所有文字會變成一行;而Windows裡的檔案在Unix下開啟的話,在每行的結尾會多車一個^M字元。
Dos和windows採用回車 換行CR/LF表示下一行,即^M$($不是換行符的表示,換行符沒有表示出來,$是文字結束EOF的表示)
而UNIX/Linux採用換行符LF表示下一行,即\n
蘋果機(MAC OS系統)則採用回車符CR表示下一行,即\r

CR用符號'\r'表示, 十進位制ASCII程式碼是13, 十六進位制程式碼為0x0D;
LF使用'\n'符號表示, ASCII程式碼是10, 十六製為0x0A. 所以Windows平臺上換行在文字檔案中是使用 0d 0a 兩個位元組表示, 而UNIX和蘋果平臺上換行則是使用0a或0d一個位元組表示.

由於dos風格的換行使用\r\n,把這樣的檔案上傳到unix,有些版本的vi不能識別\r,所以vi顯示時在行尾會出現^M出來,但是有些就能識別\r\n,正常顯示回車換行。

2021年7月15日 星期四

Comparing the TEE to integrated HSMs

Source: https://www.trustonic.com/technical-articles/comparing-the-tee-to-integrated-hsms/


Introduction 

As more and more devices become connected so the need for ever greater security and protection of critical assets increases. Traditionally such support has been provided by a Hardware Security Module (HSM) but over the last decade the use of Trusted Execution Environments (TEE) has grown significantly. This article aims to provide the reader with an understanding of the difference between these two solutions and their suitability for different scenarios. 

HSM V TEE

Generically, a HSM provides key management and cryptographic functionality for other applications. 

A TEE also provides this functionality, along with enabling application (or security focused parts of applications) to execute inside its isolation environment. 

For example, in modern Android mobile devices, the TEE is already unknowingly used every day, by millions of people as an HSM equivalent, through the use of a Trusted Application (TA) providing the Android KeyMaster functionality. 

Regular Execution Environment (REE) is the term in the TEE community for everything in a device that is outside a particular TEE. Technically, from a particular TEEs point of view, all components that are outside of its security boundary live in the REE. Having said that, for simplification of the big picture, a device with multiple TEEs, SIMs, HSMs or other high trust components, may have those separated out from the REE. The REE houses the Regular OS, which in combination with the rest of that execution environment, does not have sufficient security to meet a task needed by the device. 

For more background on terminology like TEE and REE please have a look in “What is a TEE?” 

For more information on the ARM TrustZone hardware security behind the TEE have a look in “What is a TrustZone?” 

How a HSM solves your problems… 

In compact devices with integrated HSM, the software architecture looks something like this: 

Comparing the TEE to integrated HSMs

The HSM provides Cryptographic Services to your security focused task. 

The “Secure” task in the REE has data. The HSM can receive that data and encrypt or decrypt that data, before handing it back to the issuer task in the REE. 

How is this done using a TEE? 

Here is how we support HSM functionality in a TEE enabled device today: 

Comparing the TEE to integrated HSMs

In an Android device, the above HSM will typically be replaced by a TA, within the TEE, implementing Keymaster functionality and an Android specific REE stack rather than OpenSSL/PKCS#11. 

In the above case, with a simpler Regular OS as might be found in an Engine Control Unit (ECU), a generic TA has been specifically written to provide the functionality of a typical HSM. 

Of course, with a TEE you can always do better than that

A TEE need not be used as a fixed purpose service provider like an HSM, it can also host the tasks directly. 

Comparing the TEE to integrated HSMs

Here we move the task into the TEE and manipulation of the unencrypted data can occur, in a place inaccessible to activity in the REE. 

As an example of what we gain:  

  • A device typically supports other tasks like complicated communication protocols (e.g., CAN Bus, IP, BlueTooth or even 5G).  
  • These communication mechanisms may, or may not, be used by a particular secure task. 
  • What is important, is that by placing the secure task somewhere isolated from that communication software (e.g., in a TEE), security issues in the communication software no longer potentially drag down the security of the secure task. 

Some HSMs can load code to execute through proprietary extensions, but a GlobalPlatform compliant TEE uses standardised interfaces, enabling tasks developed for one TEE, to execute on another. Such tasks, executing in the TEE, are called “Trusted Applications”. 

What you cannot do with a HSM, but can do with a TEE in a well-designed SoC

HSM’s cannot directly protect the I/O ports providing sensor data, or controlling actuators, from software attacks in, for example, the REE of the ECU of a vehicle. 

Comparing the TEE to integrated HSMs

Unlike an HSM, on a correctly designed System-On-Chip (SoC) a TEE can also interface to peripherals. This enables the creation of a secure task, housed safely inside the TEE,  that can be used to substantially enhance the critical tasks’ security.  

Comparing the TEE to integrated HSMs

What do we gain here?  

Well, consider an example, from the automotive industry, of a fuel throttle. If the throttles’ I/O control port on the ECU is exposed in the REE software then it does not matter how much security the REE “Secure” task use of the HSM brings; you would not be using an HSM if you had high confidence in the security of the REE itself, and so you cannot have confidence that the software in the REE cannot be attacked.  

If the REE is open to attack, that means that attacked REE software can potentially gain unauthorised access to that I/O port, no matter how good the HSM is.  

In the TEE (like in an HSM), we do not have the generic load of software tasks unrelated to security. A task in the TEE can interface to hardware control ports without risk of other software making unauthorised access. 

If I only have an HSM in the above example, then all I can do is protect the data traffic to a device, not the decision making in the device. With a TEE, I can do both. 

Physical Attacks: TEE vs HSM 

As we have seen above, one issue with the use of an HSM is the exposure of data communications before any encryption has occurred. 

  • This impacts the data while it is in software, where it can be extracted or modified by a corrupted REE before the HSM has had a chance to act upon it.  
  • This also impacts the hardware attack profile. 

Fundamentally, device integrated HSMs might go as far as to use on-SoC hardware methods to protect their keys from extraction that are stronger than those of a TEE. However, the method to transfer data to the HSM for protection by those keys is no more strongly protected, than that used by a TEE and can be far weaker.  

Consider the following PCB-attached HSM in comparison to a typical TEE which will be using a stacked die (Package on a Package) to protect its much higher speed traffic: 

Comparing the TEE to integrated HSMs
Physical attacks

Stronger TEEs do not even use external RAM, as shown above, but can use on-SoC RAM instead. 

Comparing the TEE to integrated HSMs
TEE using On-SoC RAM

In this case, the benefit of using a TEE to provide traditional HSM functionality is a significant reduction in the exposure of unprotected data and therefore an enhancement of the overall security for the platform. 

Ultimately, if you are concerned about key extraction, it is advised that designs keep the key batch size small, whether using a TEE or an HSM. 

It is worth noting that in the EVITA standards, some HSM types reside on the same SoC as the REE, but in those cases their hardware protection methods are typically the same as a TEE (see the EVITA HSM levels). 

Conclusions 

In fast moving new innovation areas, such as connected vehicles and robotics, as well as consumer electronics devices, a TEE provides a cost effective and future proofed alternative to using an HSM. 

In addition to the potential of providing typical HSM functionality, a GlobalPlatform compliant TEE can also protect the critical tasks directly and has standardised methods for enabling over-the-air updating of critical systems. 

Fundamentally, a typical HSM is an attack-resistant cryptographic device designed to perform a specific set of cryptographic functions by the HSM designer. It provides the confidence of non-interference inside the scope defined by the relevant protection profile. A standardised TEE can do the same, and significantly more without the need to add additional hardware. As the TEE resides on the existing SoC integrated MMUs and TrustZone enabled hardware, the overall hardware bill of materials can be reduced and as components are being removed, and incidentally reducing risks of hardware failure.  

The development of TEEs is driven by standards, such as GlobalPlatform, and this brings predictability and interoperability. This means that device OEMs and third parties, can develop Trusted Applications to support an ever-growing list of platform security requirements.    

2021年5月23日 星期日

Ubuntu 14.04 使用 codeblock

Ref:https://www.itread01.com/p/160649.html 1、安裝 sudo apt-get install codeblocks codeblocks-common codeblocks-contrib wxformbuilder libwxbase3.0-0 libwxgtk3.0-0 wx-common wx3.0-headers wx3.0-i18n wx3.0-examples 2、基礎配置 http://wiki.codeblocks.org/index.php?title=Syntax_highlighting_custom_colour_themes 新增theme setting => syntax highlighting 配置theme setting => editor => margin and caret 配置游標顯示(預設為黑色,黑色theme時看不到) setting => editor => keyboard shortcuts 配置快捷鍵 setting => editor => code complete 配置程式碼自動完成 3、專案 file => new => project 建立專案 專案屬性 => build options 配置專案環境,tag,shared lib,標頭檔案等 file => new => file / class 新新增程式碼檔案 4、常用快捷鍵 ctrl + G 跳轉到某一行 alt + G 開啟某一檔案 ctrl + shift + G 跳轉到某一函式 ctrl + F9 編譯 ctrl + F10 執行 ctrl + F11 重新編譯 F9 編譯+執行 5、DEBUG Project > Set programs' arguments...

2021年5月16日 星期日

Handbook - QXDM

[Operating mode]

MSG 07:04:47.945 IMS/High [ICSDPLHandlerVOWIFIDisabled.cpp    484] ICSDPLHandlerVOWIFIDisabled::ProcessCallCtrlCB | oprt mode (lpm on/off, etc.) - 61                        ICSDPLHandlerVOWIFIDisabled.cpp00484                    ICSDPLHandlerVOWIFIDisabled::ProcessCallCtrlCB | oprt mode (lpm on/off, etc.) - 6


2021年5月5日 星期三

Extract the UBIFS images from a UBI image.

Source: https://github.com/jrspruitt/ubi_reader/blob/master/README.md#extracting-images

sudo apt-get install ubi_reader

ubireader_extract_files [options] path/to/file

The script accepts a file with UBI or UBIFS data in it, so should work with a NAND dump. It will search for the first occurance of UBI or UBIFS data and attempt to extract the contents. If file includes special files, you will need to run as root or sudo for it to create these files. With out it, it'll skip them and show a warning that these files were not created.

2021年3月27日 星期六

GPP TS 23.040 -- SMS -- part1(第三章節)

Source https://blog.csdn.net/qq_41209741/article/details/114634362

文章目錄

Introduction

Definitions

3. 服務和服務要素

3.1 Basic services

3.2 Short Message Service elements

3.2.0 Introduction

3.2.1 有效期

3.2.2 服務中心時間戳

3.3.3 協議標識符

3.3.4 More Message to Send

3.3.5 優先和非優先信息的傳遞

3.3.6 Message Waiting

3.2.7 Alert-SC

3.2.7a MT Correlation ID

3.2.9 Status report capabilities

3.3 Unsuccessful short message TPDU transfer SC > MS

3.3.1 Errors occurring during transfer of TPDU to MS

3.3.2 Errors occurring after TPDU arrives at MS

3.4 Unsuccessful short message TPDU transfer MS->SC

3.4.1 Errors occurring during transfer of TPDU to SC

3.4.2 Errors occurring after TPDU arrives at SC

3.5 將補充業務與短消息業務結合使用

3.6 運營商決定限制在短消息業務中的適用性

3.7 多條短消息傳輸

3.8 短信和互聯網電子郵件互通

3.9 短信壓縮

Introduction

短消息服務(SMS)提供了一種向GSM/UMTS/EPS手機發送有限大小消息的方法。短信服務的提供利用了一個服務中心,作為短信息的儲存和轉發中心。因此,GSM/UMTS/EPS-PLMN需要支持服務中心和移動台之間的短消息傳輸。


移動源消息應從MS傳輸至服務中心。這些用戶可能是為其他移動用戶或固定網絡上的用戶指定的。移動端接信息應從服務中心傳輸到移動終端。這些信息可由其他移動用戶(通過移動源短消息)或各種其他來源(如語音、電傳或傳真)輸入服務中心。


Definitions

alert-SC:由GSM/UMTS PLMN提供的服務單元,用於通知先前向特定MS發起了不成功的短消息遞送嘗試的SC,該MS現在被PLMN識別為已恢復操作


status report:SC通知發起MS提交給SME的短消息的結果


Gateway MSC For Short Message Service(SMS-GMSC):MSC的功能,能夠從SC接收短消息,詢問HLR路由信息和SMS信息,並將短消息傳送到VMSC或接收方MS的SGSN


IP-Short-Message-Gateway (IP-SM-GW):負責基於IP的UE和SC之間的協議互通的功能


Loop Prevention (LP):允許SMS應用程序禁止轉發或自動生成可能導致無限循環的消息的信息元素。


Messages Waiting (MW):使PLMN存儲信息(消息等待指示)的服務元素,列出那些嘗試向該PLMN中的MS發送短消息失敗的SCs


Messages Waiting Indication (MWI):要存儲在與MS相關聯的HLR和VLR中的數據,指示在一組SCs中有一個或多個消息等待被傳送到MS(由於不成功的傳送嘗試)


Messages Waiting Data (MWD):MWI(消息等待指示)的一部分,存儲在HLR中。MWD由SMSC(短消息服務中心)的地址列表組成,該地址列表中有等待發送到移動設備的消息。


Home Location Register(HLR):歸屬位置寄存器是在蜂窩網絡中找到的數據庫。它除了存儲基於位置區域的信息外,還存儲與服務和功能相關的訂戶數據。


Mobile Management Entity (MME):為位於指定為MME區域的地理區域中的移動站執行分組交換功能的交換機


Mobile-services Switching Centre (MSC):為位於指定為MSC區域的地理區域中的移動台執行交換功能的交換機


Mobile Station Memory Capacity Exceeded Flag (MCEF):部分MWI存儲在HLR中。


MCEF是一個布爾參數,指示MWD的地址列表是否包含一個或多個條目,因為向MS傳遞短消息的嘗試失敗,並導致MS內存容量超出


Mobile Station Not Reachable Flag (MNRF):部分MWI存儲在VLR、MME和HLR中。MME支持本文件中規定的與MNRF有關的VLR的所有要求。


MNRF是一個布爾參數,指示MWD的地址列表是否包含一個或多個條目,因為向MS發送短消息的嘗試失敗了,原因是訂戶不在。


Mobile station Not-Reachable-for-GPRS (MNRG):部分MWI存儲在SGSN和HLR中


MNRG是一個布爾參數,指示MWD的地址列表是否包含一個或多個條目,因為向MS傳遞短消息的嘗試失敗,原因是用戶缺席


Mobile Station Not Reachable-via-the-MSC-Reason (MNRR-MSC):MWI在HLR中的一部分,當在MSC向MS發送短消息的嘗試失敗並導致用戶缺席時,它存儲MS缺席的原因


Mobile Station Not Reachable-via-the-SGSN-Reason (MNRR-SGSN):MWI在HLR中的一部分,當在MSC向MS發送短消息的嘗試失敗並導致用戶缺席時,它存儲MS缺席的原因


More Messages To Send (MMS):信息元素,提供一個MS接收來自SC的短消息的時候,信息是否還有更多的消息等待從該SC發送到MS


Service Centre (SC):負責在SME和MS之間中繼、存儲和轉發短消息的功能


Short Message Entity (SME):可以發送或接收短消息的實體。


SME可以位於固定網絡、MS或SC中。


SMS STATUS REPORT:短消息傳輸協議數據單元,向接收MS通知由MS先前提交的源於移動的短消息的狀態,即SC是否能夠轉發該消息,或者該消息是否被存儲在SC中以供稍後傳送


SMS COMMAND:短消息傳輸協議數據單元,使MS能夠在SC調用操作


例如,MS可以刪除短消息、取消TP狀態報告請求、查詢短消息的狀態或請求由SC執行的另一功能。


SMS DELIVER:包含用戶數據(短消息)的短消息傳輸協議數據單元,從SC發送到MS


SMS SUBMIT:包含用戶數據(短消息)的短消息傳輸協議數據單元,從MS發送到SC


TPDU: Transfer protocol data unit,傳輸協議數據單元


3. 服務和服務要素

3.1 Basic services

MS狀態改變:從連接態到空閒態,從空閒態到連接態,或者正在Handover的時候,短信傳輸可能會失敗。


還有可能依次接收具有相同的起始地址和標識的兩個短消息,即消息參考號(MO)或SC時間戳(MT)。這種情況可能是由於RP或CP層(例如,在MSC間切換期間)的錯誤造成的,其中它可能是重複的消息,否則它可能是有效的新消息。


因此,接收實體應規定檢查短消息中包含的其他參數,以確定是否要丟棄第二條短消息。在Android中,如果下面6個信息都相同,則判斷為同一條短信,將第二條丟棄:


發端address

MO號碼

count總數

序列號

時間戳

消息內容

(其中count和序列號是針對:用於連接多部分SMS消息的字段)


3.2 Short Message Service elements

3.2.0 Introduction

短信包括8個要素,特別是提交和接收消息:


有效期;

服務中心時間戳;

協議標識符;

More Message to Send;

優先級;

Message-Waiting;

Alert-SC。

MT相關ID。


3.2.1 有效期

TP Validity Period參數值表示短消息有效的時間段,即在向接收者發送之前,SC應保證短消息在SC存儲器中存在多長時間。


3.2.2 服務中心時間戳

服務中心時間戳是一種信息元素,通過它,服務中心將短消息到達服務中心的SM-TL實體的時間通知收件人MS。時間值包含在每個發送給MS的SMS中。


3.3.3 協議標識符

協議標識符是信息元素,SM-TL通過該信息元素表示正在使用的高層協議,或者表示與某種類型的遠程信息處理設備的互通。

協議標識符信息元素使用消息類型中的特定字段:


SMS SUBMIT

SMS SUBMIT-REPORT for RP-ACK

SMS DELIVER DELIVER

SMS-DELIVER-REPORT for RP-ACK

SMS_STATUS_REPORT

SMS COMMAND TP Protocol Identifier (TP PID)


3.3.4 More Message to Send

More Messages to Send是SC通知MS在該SC中有一條或多條消息等待發送給MS的信息元素。More Messages to Send信息元素使用message SMS DELIVER,TP More Messages to Send(TP MMS)中的布爾參數。


3.3.5 優先和非優先信息的傳遞

優先級是由SC或SME提供的信息元素,用於向PLMN指示消息是否為優先級消息。

如果MS被確定為暫時不在,則不應嘗試傳遞非優先級消息。


如果MS未被識別為暫時不存在,則應嘗試傳遞非優先級消息,無論MS是否被識別為沒有可用內存容量。


無論MS是否被識別為暫時不存在或沒有可用內存容量,都應嘗試傳遞優先級消息。


3.3.6 Message Waiting

消息等待是使PLMN能夠提供HLR、SGSN和VLR的服務元素,接收者MS與該HLR、SGSN和VLR相關聯的信息,即在發起SC中有消息等待被遞送到MS。該服務元素僅在先前針對非單個短消息的由於手機暫時不在或MS內存容量超出而導致SM不成功遞送嘗試的情況下使用。


該信息表示消息等待指示(MWI),包括


消息等待數據(MWD)、

GPRS不可到達的移動台(MNRG)、

IP不可到達的UE(UNRI)、

移動台不可到達標誌(MNRF)、

通過MSC不可到達的移動台(MNRR-MSC),

移動不可通過位於HLR中的SGSN原因(MNRR-SGSN)、

UE不可到達原因(UNRR)和移動台存儲容量超出標誌(MCEF)到達;

位於SGSN中的GPRS不可到達移動台(MNRG)和位於VLR中的移動台不可到達標誌(MNRF)。


圖1顯示了一個示例。



圖1 Example of how information on one MS can be put in relation to SC(s)

in order to fulfil the requirement of Alert SC mechanism

MWD應包含一份SCs地址列表(SC Addr),該地址以前曾嘗試過不成功的消息傳遞。為了能夠將警報消息發送給每個嘗試向MS發送非單次SM的SC,HLR應存儲IMSI-Alert以及SC地址的參考。


3.2.7 Alert-SC

Alert-SC是服務元素,它可以由一些GSM/UMTS plmn提供,以通知SC MS:


由於無法訪問MS或超出了MS內存容量,傳送嘗試失敗;以及

PLMN現在認為:

a)已恢復操作(例如已響應尋呼請求);或

b)有新的可用內存(這意味著移動設備是可訪問的)。

SC的重複傳送嘗試可能有兩種類型:


一種重複的傳送嘗試,因為SC已被告知MS處於活動狀態並且可以接收短消息

SC的自主重複交付嘗試。

這兩個選項的應用由SC和網絡的提供商定義。

3.2.7a MT Correlation ID

MT相關ID是僅當接收MS的HPLMN使用SMS路由器或IP-SM-GW時才使用的服務元素。它用於將前向SM操作與先前的信息檢索操作相關聯。


MT相關ID的使用增強了安全性。通過分析在轉發短消息操作中接收到的相關ID,可以容易地從相關信息檢索操作的起源地檢查它,從而導致檢測到“假”和“欺騙”SMS。


在協議層的IMSI IE中使用MT相關ID來代替IMSI。因此,其結構被定義為與該元素完全相同:



圖2 Structure of the MT Correlation

Sender ID:它由9位十進制數字組成,在其使用壽命內應是唯一的。出於安全目的,其值應為隨機分配的數字,而不是順序分配的數字。

3.2.9 Status report capabilities

SMS還向SC提供通知MS先前發送的源於移動的短消息的狀態的能力。消息的狀態可以是:


成功交付給SME;

SC無法將消息轉發給SME。原因可能是永久性或暫時性的錯誤。永久性錯誤可能是,例如有效期過期、SME地址無效。臨時性錯誤可能是,例如SC SME連接中斷,SME暫時不可用。

3.3 Unsuccessful short message TPDU transfer SC > MS

3.3.1 Errors occurring during transfer of TPDU to MS

這些錯誤通常是由於PLMN或MS中的限製或不支持的服務造成的。錯誤指示從SMS GMSC返回給SC,但MS的進一步診斷信息不可用。


3.3.2 Errors occurring after TPDU arrives at MS

SMS-DELIVER_REPORT包含錯誤信息


Error indication Status (Permanent or Temporary) Meaning

Unknown subscriber P The PLMN rejects the short message TPDU because there is not allocated an IMSI or a directory number for the mobile subscriber in the HLR (see 3GPP TS 29.002 [15]).

Teleservice not provisioned P The PLMN rejects the short message TPDU because the recipient MS has no SMS subscription (see 3GPP TS 29.002 [15]).

Call barred T The PLMN rejects the short message TPDU due to barring of the MS (see 3GPP TS 29.002 [15], description of the Barring supplementary service, 3GPP TS 22.004 [3] and 3GPP TS 23.011[7]), description of Call barred due to Unauthorised Message Originator, 3GPP TS 29.002 [15], and description of Operator Determined Barring, 3GPP TS 22.041 [4] and 3GPP TS 23.015 [8]).

Facility not supported T The VPLMN rejects the short message TPDU due to no provision of the SMS in the VPLMN (see 3GPP TS 29.002 [15]).

Absent subscriber T The PLMN rejects the short message TPDU because ①there was no paging response via the SGSN, MSC or both (see 3GPP TS 24.008 [12] & 3GPP TS 29.002 [15]),②the IMSI GPRS or both records are marked detached (see 3GPP TS 29.002 [15]); ③the MS is subject to roaming restrictions (see “Roaming not allowed”, 3GPP TS 29.002 [15]); ④deregistered in the HLR. The HLR does not have an MSC, SGSN or both numbers stored for the target MS, (see 3GPP TS 29.002 [15]); ⑤Unidentified subscriber (see 3GPP TS 29.002 [15]); ⑥MS purged (see 3GPP TS 29.002 [15]) ; ⑦the MS is not registered in the HSS/HLR for IMS; ⑧there was no SIP response received by the IP-SM-GW; ⑨the MS is temporarily unavailable (eg in power saving mode due to eDRX). (The reasons for absence are assigned integer values in table 1a.The appropriate integer value is sent with the absent subscriber error indication as defined in 3GPP TS 29.002 [15])

MS busy for MT SMS T The PLMN rejects the short message TPDU because of congestion encountered at the visited MSC or the SGSN. Possible reasons include any of the following events in progress: ①short message delivery from another SC; ②IMSI or GPRS detach ③Location Update or Inter SGSN Routing Area Update; ④paging; ⑤emergency call; ⑥call setup.

SMS lower layers capabilities not provisioned T The PLMN rejects the short message TPDU due to MS not being able to support the Short Message Service. The short message transfer attempt is rejected either due to information contained in the class mark, or the MSC not being able to establish connection at SAPI = 3 (see 3GPP TS 24.008 [12] and 3GPP TS 29.002 [15]).

Error in MS T The PLMN rejects the short message TPDU due to an error occurring within the MS at reception of a short message, eg protocol error.

Illegal Subscriber P The PLMN rejects the short message TPDU because the MS failed authentication.

Illegal Equipment P The PLMN rejects the short message TPDU because the IMEI of the MS was black listed in the EIR.

System failure T The PLMN rejects the short message TPDU due to network or protocol failure others than those listed above (see 3GPP TS 29.002 [15]).

Memory Capacity Exceeded T The MS rejects the short message since it has no memory capacity available to store the message.

Status:永久或臨時

兩組錯誤指示之間的關係如表1所示。每個錯誤分為“臨時”或“永久”兩類。該分類給出了MS是否可能在合理的時間內變得可實現的指示,並且因此提供了SC要採取的建議操作,即存儲消息以便稍後傳輸,或者丟棄消息。



3.4 Unsuccessful short message TPDU transfer MS->SC

3.4.1 Errors occurring during transfer of TPDU to SC

這些錯誤通常是由於PLMN中的限製或不支持的服務造成的。MSC或SGSN向MS返回錯誤指示,但SC不能提供進一步的診斷信息


3.4.2 Errors occurring after TPDU arrives at SC

SMS-SUBMIT-REPORT包含錯誤信息


3.5 將補充業務與短消息業務結合使用

只有3GPP TS 22.004[3]和3GPP TS 23.011[7]中定義的補充業務的子集可以與短消息業務結合使用。該子集包括以下補充業務:

所有的5個限制服務。


3.6 運營商決定限制在短消息業務中的適用性

網絡特性運營商確定的限制(參見3GPP TS 22.041[4])適用於短消息服務。

如果短消息由於操作員確定的限製而失敗,則會將適當的錯誤原因返回給發端人


3.7 多條短消息傳輸

為了避免對在服務中心等待的每個消息對移動設備進行尋呼、認證等的需要,SC可以向SMS-GMSC指示有更多的消息要發送。當給出該指示時,將調用MAP過程,以便將該指示傳遞給VMSC,並且在SC中等待的所有短消息都被傳輸之前,VMSC不會釋放MS。


3.8 短信和互聯網電子郵件互通

MT SMS:


[<from address><space>]<message>


MO SMS:


[<to address><space>]<message>


The to address or from address may take the form:


user@domain1.domain2


or


User Name <user@domain1.domain2>


3.9 短信壓縮

短消息可以根據3GPP TS 23.042[26]中描述的壓縮算法進行壓縮。

壓縮和解壓可在SME之間或SME和SC之間進行。

壓縮僅適用於TPDU的TP用戶數據部分。壓縮報頭必須在緊接可能存在的任何TP用戶數據報頭字段之後的TP用戶數據字段的第一個八位字節處開始。

————————————————

版权声明:本文为CSDN博主「奄奄不息」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/qq_41209741/article/details/114634362

2021年3月17日 星期三

Android APK

 

>安卓手機可以安裝LTE Discovery來觀察.  TSU上可以安裝LTE Discovery來觀察嗎?

尝试下载了一个 LTE Discovery apk

Adb install XXX.apk

 

然后怎么启动? 能给一个 adb shell start am -n Packagename/ActivityName

的命令吗?ActivityName不知道。