2007年7月26日 星期四

SMS PDU

ETSI (GSM 03.40 and GSM 03.38)中規範SMS的encoding可有以下幾類:

  • 7 bit encoding:最多可以包含160個characters,其中每個character只用一個或兩個byte的 7-bit data來作encoding。7 - bit encoding table 在.. http://www.dreamfabric.com/sms/default_alphabet.html 和ASCII Code比較後,除了0123456789、A-Z、a-z,和%$!*& ' ' 相同外,其他都不一樣。
  • 8 bits encoding:最多可以包含140 個字。通常用作非文字SMS,而拿來當作Data傳輸使用。
  • 16 bit encoding:最多只可以有 70 個'字',是用來傳送Unicode text messages。 可以當作文字讀取。
另外,還規範傳送的方式(Mode):
  • Text Mode
  • Pdu Mode
PDU (Protocol Description Unit)

PDU封包中,除了內文外,還包含其他的information,像是:
  • Sender
  • SMS service center
  • time stamp
傳送的data是以"hexa-decimal" or "decimal semi-octents"。

這個encoding有點麻煩,採用7 bit encoding是為了減少資料量。所以一個「字」就佔不滿一個byte,多的bit,就拿下一個「字」的bit,拿法是:
從下一個「字」中 ,從後算起,還沒被拿走的bit 拿起。
這一篇文章,有很好的示範.. http://www.dreamfabric.com/sms/hello.html

2 則留言:

匿名 提到...

SMS PDU is used for WAP. But it is too expensive to use, since one SMS will charge 1~3 NTs.

匿名 提到...

To be more specific, should be WAP push (SI, SL, MMS notification, etc.) In current mobile environment, it is still the mostly used way to page user (push in Web term).
For WAP content, SMS transport is never used in real world.