Вы находитесь на странице: 1из 24

1-24

, ...
!

!

,
SIA AP System,
, 2008

PDU

SMS


PDU,
.
SonyEricsson K750i Delphi 6.
SMS GSM AT-
AT-.
.
.

PDU

SMS

PduByAP_2008_07_04.pdf

1-24

2-24

:
1.
2.
3.
4.
5.
5.1.
5.2.
5.3.
6.

................................................
.........................................................
............................................
MS ................................
PDU: ......................................................
PDU .....................................................
SMS .......................................
SMS ...........................................
SCA - Service Center Address
....................................
7.
Protocol Data Unit Type (PDU type)
......................................................
7.1. PDU type SMS-Submit (Mobile Originated) - PDU
SMS ..........................................
7.2. PDU type SMS-Deliver (Mobile Terminated) - PDU
SMS ..............................................
7.3. Message Reference ..............................................
7.4. Originator Address OA Destination Address DA
..........................................
7.5. Protool Identifier PID ..............
7.6. Data Coding Scheme DCS ..............
7.7. Message Class - ...............................
7.8. Service Center Time Stamp SCTS - Short Message
Service Center ( ) ........
7.9. Validity Period VP .....................
7.10.
User Data Length UDL - ........
7.11. User Data UD - ............................
7.12. .............................
8.
.....................................................

3
3
4
5
5
5
6
7
8
10
10
12
13
13
13
14
16
17
17
18
18
18
20

1.
GSM
(GSM default alphabet): ..............................................

21

2.
UCS2 - C0 controls and Basic
Latin Range 0000-007F ................................................

22

3.
UCS2 Cyrillic Range 0400-04FF .......................

23

: ...................................................

24

PDU

SMS

PduByAP_2008_07_04.pdf

2-24

3-24

1.
GSM 03.40 version 6.0.0 (Point-to-Point
Short Message Service , , SMS)
.
SMSC - Short Message Service Center (
, ),
. ,
SMS -:
(Mobile
originated)
(Mobile terminated).
,
, .
, , ,

. , .
PDU (Protocol Data Units Packet Data
Unit, ). PDU
. (

), ( ,
).
PDU
PDU ( )
(ME
)), .
AT PDU
.
SMS PDU SMS-Deliver (Mobile Terminated),
SMS PDU SMS-Submit (Mobile Originated). PDU
.

2.
MS

Mobile Station

ME

Mobile Equipment

TE

Terminal Equipment

SMSC

Short Message Service


Center

MMI

Man Machine Interface

PDU

Protocol Data Unit

SM-AL

Short Message
Application Layer

SM-TL

Short Message Transport


Layer

PDU
Type

Protocol Data Unit Type

TPDU

Transport Protocol Data


Unit

SCA

Service Centre Address

PDU

SMS

PduByAP_2008_07_04.pdf

3-24

4-24


OA

Originator Address

()

DA

Destination Address

()

PID

Protocol Identifier

DCS

Data Coding Scheme

SCTS

Service Center Time


Stamp

SMSC (
)

VP

Validity Period

UDL

User Data Length

UD

User Data

RP

Reply Path

,
.

UDHI

User Data Header


Indicator

SRI

Status Report Indication

SRR

Status Report Request

VPF

Validity Period Format

MMS

More Messages to Send

RD

Reject Duplicate

MTI

Message Type Indicator

SIM

Subscriber Identity
Modul

SIM
()

MO PDU

Mobile Originated PDU

PDU SMS, MS
SMSC SMS

MT PDU

Mobile Terminated PDU

PDU SMS, SMSC


MS SMS

3.
PDU - ,
. , , PDU
. 2 .
, ,
8 4 . ,
, .
, , , ,
8 . (2) ,
, 8 , :
, , ,
, , . ,
.
,
4 (
PDU

SMS

PduByAP_2008_07_04.pdf

4-24

5-24

, , , 4
).
GSM 03.38.
User Data (UD)
.
:
b ;
d ;
h .
00001010b = 10d = 0Ah.

4. MS
MS ( ),
RS-232, MS - MS.
/ SMS
(SM-TL)
, SMS SMS.
(SM-TL)
PDU, . 2
SMS-Deliver SMS-Submit.

5. PDU:
1.

2.
3.

4.
5.
6.

SMS-Deliver (Mobile Terminated) PDU,


SMSC MS ( ). -
, ;
SMS-Deliver-Report PDU,
SMSC MS ( );
SMS-Submit (Mobile Originated) PDU,
MS ( ) SMSC. -
, ;
SMS_Submit-Report PDU,
MS SMSC ( );
SMS-Status-Report - PDU, SMSC
MS ( );
SMS-Command - PDU, MS SMSC;

5.1. PDU
PDU SCA TPDU
PDU = SCA + TPDU,
SCA
- Service Centre Address -
;
TPDU - Transport Protocol Data Unit
.
SCA .
TPDU , PDU
.

PDU

SMS

PduByAP_2008_07_04.pdf

5-24

6-24

GSM
PDU TPDU. SCA
SIM-, SCA 00h.
PDU, SCA TPDU.

5.2. SMS
SMS-Submit (Mobile Originated)

SCA PDU type MR

, 1-12

DA

PID DCS

1 2-12

VP

UDL

UD

0,1 7

0-140

1..12

12 ,
SCA
.
SMSC
00h
SMSC
(Sim)

Service Center Address,


.1.2

,
PDU

.
PDU Type


.


00b,
01b
01b

PDU Type

Protocol Data Unit Type


00h ffh



00h

MR

Message Reference

2..12

( )
,
,
SMS,

DA

Destination Address


PID
SMSC,

( ,
..)

Protocol Identifier


UD

Data Coding Scheme

0,1 7

PDU

SMS

DCS
VP

Validity Period
PduByAP_2008_07_04.pdf

6-24

7-24

SMSC ,

,

,

(
SMSC
,
).
0..140

140

UD

User Data

5.3. SMS
SMS-Deliver (Mobile Terminated)

SCA PDU type

, 1-12

OA
2-12

PID DCS SCTS UDL


1

0-140

1..12

12 ,
SCA
.
SMSC
00h
SMSC
(Sim)

Service Center Address

,
PDU

.
PDU Type


.


00b,
01b
00b

PDU Type

Protocol Data Unit Type

2..12

( )
,
,
SMS,

OA

Originator Address


PID
SMSC,

( ,
..)

PDU

SMS

UD

Protocol Identifier

PduByAP_2008_07_04.pdf

7-24

8-24


UD

DCS

Data Coding Scheme

, SCTS

SCSM

Service Centre Time Stamp

UD

UDL

User Data Length

0..140

140

UD

User Data

6. SCA - Service Center Address



SCA ( )
. $00 - () SCA
Sim- , , SMS (SCA)
at+csca="+xxxxxxxx".
: $00
!!
$00 - () SC SMSC ( )
(Service Centre Short
Message Service Centre).
( SCA) (
):

SCA

Len

Length

SC:
1.

7
- 1
6..4
000 ;
001 ;
010 ;
011 ;
100 ;
101 ;
110 ;
111 .

Type of
Number

Type of Number

3..0

PDU

0000
0001
0010
0011
1000
1001
1010
1111

;
ISDN;
X.121;
;
;
(private);
ERMES;
.

SMS

PduByAP_2008_07_04.pdf

8-24

9-24


.
:
- $81 (),

+ .
+
, ISDN;
- $91 - ,
+
.
+ , ISDN.

.
. (3. GSM 03.40 version
6.0.0, . 9.1.2.5
GSM 04.08 version 6.7.1, .
10.5.4.6)
,
1 - - ,
.

(),

.
$81 ,
, 371 123456,
+.

ISDN/telephone numbering plan
0..8

SMSC

:
(1) (SMSC,DA OA) .

(3) GSM 03.40 version 6.0.0. :
The Address-Length field is an integer representation of the number of useful
semi-octets within the Address-Value field - ,
.
- : ,
! , +
, F (. )
!
() . ,
() ,
F !
+ PDU
!
2 - () - SCA
- , .
- .
PDU

SMS

PduByAP_2008_07_04.pdf

9-24

10-24

() (BCD-)
Fh. ()
, BCD , :

1010b *
1011
#
1100
a
1101
b
1110
c
( , !)
1:

+37212345678 :

1. 37212345678
2. 37212345678
3.
4.
5.
6.

37212345678F
7312325476F8
917312325476F8
0A917312325476F8

- +;
- Length(('37212345678') =
11d() 0Ah ();
- F, ;
- ;
- 91h;
- - ,

+37212345678

0A917312325476F8

7. Protocol Data Unit Type (PDU type)

Pdu Type .
00b,
01b. , , .
, ( ) 7-, (
) 0-.

7.1. PDU type SMS-Submit (Mobile Originated) PDU


SMS

4..3 2 1..0

RP UDHI SRR VPF RD MTI

Reply Path
0 RP
1 RP

Rp

,
.

,

SCA


. ,


,

PDU

SMS

PduByAP_2008_07_04.pdf

10-24

11-24


.


.
6

,
UD ( )
0 UD
1 - UD
.

UDHI

(1)
. (2) ,


,


.
0.

GSM 03.40.

0b.

CellBroadcast Message,


.

Status Report Request


0 -
1 -

SRR


.
SMSC SMSStatus-Report
SMSC SMS_Submit.

RP , RP

, SRR
- SMSC.

4..3 Validity Period


Format, VP
4 3
0 0 VP
0 1 Siemens,
SonyEricsson
1 0 VP

1 1 VP

VPF

(2)

VP.
,
10b.
. ..

RD

(2)

0b

MTI

01

Reject Duplicates
SMSC
,
.
MR (Message
Reference) DA (Destination
Address) OA
(Originator Address)
0
1 -

1..0 Message Type Indicator



PDU

SMS

PduByAP_2008_07_04.pdf

11-24

12-24

1 0

MS -> SC

0
1
0
1

SMS-DELIVER REPORT SMS-DELIVER


SMS-COMMAND
SMS-STATUS REPORT
SMS-SUBMIT
SMS-SUBMIT REPORT

0
0
1
1

SC -> MS

RESERVED

7.2. PDU type SMS-Deliver (Mobile Terminated)- PDU


SMS

4..3

1..0

RP UDHI SRR MMS MTI

Reply Path
0 RP
1 RP

Rp

(2)
,
PDU
SMS_SUBMIT,
.

,
UD ( )
0 UD
1 - UD
.

UDHI

(1)
. (2) ,


,


.
0b.

GSM 03.40.


,

.

Status Report Indication


0 ME
1

SRI


SMSC.

4..3 PDU
2

More Message to Send


0
SMSC MS

1..0 Message Type Indicator



1 0 SC -> MS
MS -> SC

PDU

SMS


.
MMS


SMSC.

MTI

00b

PduByAP_2008_07_04.pdf

12-24

13-24

0
1
0
1

0
0
1
1

SMS-DELIVER SMS-DELIVER REPORT


SMS-STATUS REPORT SMS-COMMAND
SMS-SUBMIT REPORT SMS-SUBMIT
RESERVED

7.3. Message Reference


MR SMS.
, , 0 255.
MS.
00h.

7.4. Originator Address OA Destination Address DA


() ()
( ) DA ( )
SMS SMS, , ,
SMS. SCA- Service
Center Address ,
.

7.5. Protool Identifier PID


PID ( ) ,
.
PID ,
SMS. SMSC (
) SMS e_mail,
, .. .
MS ( ) .
00h, ,
41h..47h,
, PID, SCA OA .
, ,
. , MS!

7.6. Data Coding Scheme DCS


DCS ( )
UD, .
(6) GSM 03.38 V7.0.0 (1998-07).
DCS 4 .
( 7 4) , (
3 0) :

PDU

SMS

PduByAP_2008_07_04.pdf

13-24

14-24

,
7..4

7 6 5 4
0 0 x x

(General Data Coding)


00b.
5 .
4 .
5
0 ;
1 , GSM
( . GSM 03.42).
4
0 1 0
;
1 1 0
:
1 0
0
0
0
1
1

3
:
0
0
1
1

- Message Class
- 0;
- 1 Mbile
Equipment;
- 2 SIM
specific message;
- 3 - Terminal
Equipment( GSM 07.05)
(
).

2
0
1
0
1

;
8- ;
UCS2 (16 ) Unicode;
.

: , DCS 0,
DCS = 00h Default GSM
Alphabet ( GSM )-
Siemens.

7 6 5 4
0 1 0 0
1 0 1 1

7 6 5 4
1 1 0 0

(Discard Message)
3 0 ,
1101. ME (
)

().

7 6 5 4
1 1 0 1

(Store Message)

PDU


, .
.

SMS

PduByAP_2008_07_04.pdf

14-24

15-24

Default GSM Alphabet ( GSM ).




().
3
0 ;
1 .
2 0.
1 0 :
0
0
(Voicemail Message Waiting);
0
1 (Fax Message Waiting);
1
0
(E-Mail Message Waiting);
1
1
(Other Message Waiting).
-
ME.
,
.

7 6 5 4
1 1 1 0

(Store Message UCS2)


3 0 ,
1101. ,
UCS2 .

7 6 5 4
1 1 1 1

/ (Data
coding/message class)
3 0.
2 (Message coding):
0 (Default alphabet);
1 8- .
1 0
0
0
0
1
1

- Message Class
- 0;
- 1 Mbile
Equipment;
- 2 SIM
specific message;
- 3 - Terminal
Equipment( GSM 07.05)
(
).

(Default alphabet) , UD (
) 7- ,
160 .
8- INTEL ASCII-HEX
140 .
: Siemens 2 (Class 2 message
SIM specific) 0000b (
). (

PDU

SMS

PduByAP_2008_07_04.pdf

15-24

16-24

! ,
,
!)

7.7. Message Class -


Classless SMS -
, .
,
.

Class 0 SMS - 0
0
. ,


(TE)
- AT+CNMI=3,2. Siemens
(roundabout way).
Class 1 SMS - 1
1 ME ( ),

.
SIM-.
Class 2 SMS - 2
2 SIM-.
Class 3 SMS - 3
3
3. AT- AT+CNMI.
( . GSM specification 03.38.)
: 8-

. ,
GSM , 7- .
UD . Sony-Ericsson
, . ,
, ,
GSM-.

7.8. Service Center Time Stamp SCTS - Short


Message Service Center ( )
SCTS ,
SMSC.
7 SMS-DELIVER,
SMSC :

2 1

2 1

2 1

2 1

2 1

2 1

2 1

, ,
(GMT - Greenwich Main Time).
:
,
PDU

SMS

PduByAP_2008_07_04.pdf

16-24

17-24

!
: 2008 23 17 32 16
SMS, (
)
2008 23 17 32 16
08
02
23 17
32
16
00 ;
80
20
32 71
23
61
00
80203271236100 .

7.9. Validity Period VP


SMSC ,
(valid ), ,
SMSC , SMSC
.
VP VPF (Validity Period Format).

VPF
00b
01b
10b
11b

VP

VP

VP
Siemens, SonyEricsson
VP
VP

0
1
7

VP
:
VP,

0 .. 143

VP
(VP + 1) * 5 = 12
5

144 .. 167

12 + (VP 143)*30 =
24

168 .. 196

(VP 166) * 1 = 30

197 .. 255

(VP 192) * 1 = 63

VP SCTS
, SMSC .

7.10. User Data Length UDL

UDL User Data


( ). UDL ,
DCS.
, 7 ()
, . ,
7- ( 8*7 = 56 )
8, 7 = 56 / 8.
PDU

SMS

PduByAP_2008_07_04.pdf

17-24

18-24

8- 16- , UDL
.

7.11. User Data UD

,
. 140 .
8- USC2 ,
, .
Default GSM alphabet 7- ,
140 160 7- .
, , .

7.12.
7- ,
(6) GSM 03.38 version 7.0.0 Release 1998 GSM 03.38 V7.0.0
(1998-07) (Phase 2+):
1 2- + 7
2 2 3- + 6
2-
3 3 4- + 5
3-
.
.
, ()
abcdefgh. 7 ,
, 0 () , 6 () .
:

a = 61h a6

a5

a4

a3

a2

a1

a0

b = 62h b6

b5

b4

b3

b2

b1

b0

c = 63h c6

c5

c4

c3

c2

c1

c0

d = 64h d6

d5

d4

d3

d2

d1

d0

e = 65h e6

e5

e4

e3

e2

e1

e0

f = 66h f6

f5

f4

f3

f2

f1

f0

g = 67h g6

g5

g4

g3

g2

g1

g0

h = 68h h6

h5

h4

h3

h2

h1

h0

, ,
PDU

SMS

PduByAP_2008_07_04.pdf

18-24

19-24

b0

a6

a5

a4

a3

a2

a1

a0

c1

c0

b6

b5

b4

b3

b2

b1

d2

d1

d0

c6

c5

c4

c3

c2

e3

e2

e1

e0

d6

d5

d4

d3

f4

f3

f2

f1

f0

e6

e5

e4

g5

g4

g3

g2

g1

g0

f6

f5

h6

h5

h4

h3

h2

h1

h0

g6

.
abcdefgh:

6
5
4
3
2
1
0

a = 61h 1

b = 62h 1

c = 63h 1

d = 64h 1

e = 65h 1

f = 66h 1

g = 67h 1

h = 68h 1

7
6
5

Hex

61

F1

98

5C

36

9F

D1

abcdefgh
61F1985C369FD1. ME User Data.
ME
.
8- USC2
UD ,
, .
PDU

SMS

PduByAP_2008_07_04.pdf

19-24

20-24

, USC2 Unicode
0055006E00690063006F00640065002003E60020044D0442043E0020043D0430044804350020043204410435.

, ,
GSM.
,
. . , ,
, ( ) Win1251
ISO 8859-5, UTF8 UTF16, KOI-8
Unix- .
(10).
(11) (12) ( )
.

8.
PDU ,
.
. , PDU
.
() ems, mms.
, ,
. !

, 2008


( AlexPP )

P.S. :
03.06.2007 13:02:36 http://lenta.parttimer.ru/1114/
-
PDU-, -
"+GR=", ASCII sms. TPduToMsg(char encodedmsg[],char pdu_msg[]). pdu_msg[], email, CodeVisionAVR? .
- 4 (!) , , (),
!

PDU

SMS

PduByAP_2008_07_04.pdf

20-24

21-24

1.

GSM (GSM default alphabet):

b7

b6

b5

b4

b3

b2

b1

SP

"

&

'

LF

<

CR

>

. 0x1B
.

PDU

SMS

PduByAP_2008_07_04.pdf

21-24

22-24

2.

UCS2-C0 controls and Basic Latin Range 0000-007F


( C0 controls and Basic Latin Range 0000-007F by Unicode
Inc., http://www.unicode.org/charts/PDF/U0000.pdf)

b7

b6

b5

b4

b3

b2

b1

b0

Nul

DLE

SP

'

SOH

DC1

STX

DC2

''

ETX

DC3

EOT

DC4

ENQ

NAK

ACK

SYN

&

BEL

ETB

'

BS

CAN

HT

EM

LF

SUB

VT

ESC

FF

FS

<

CR

GS

SO

RS

>

SI

US

DEL

PDU

SMS

PduByAP_2008_07_04.pdf

22-24

23-24

3.

UCS2 Cyrillic Range 0400-04FF

(
Cyrillic Range 0400-04FF by Unicode
Inc., http://www.unicode.org/charts/PDF/U0400.pdf)
Unicode :
Cyrillic
(U+0400 U+04FF)
Cyrillic Supplement
() (U+0500 U+052F).
3 :
1. U+0400 U+045F ISO 8859-5, 864
(0360h); (: Win1251 0350h
! ).
2. U+0460 U+0489 ;
3. U+048A U+052F ,
.
U+0400 U+045F ,
0410 044f
. , 0401
0451 . ( . Cyrillic Range 0400-04FF by
Unicode Inc. - , , ,
Unicode.
!)

b7

b6

b5

b4

b3

b2

b1

b0

PDU

SMS

PduByAP_2008_07_04.pdf

23-24

24-24

:
1.

SMS with the PDU mode

by Siemens;

2.

Application Note Construction of SMS PDUs

by Sony Ericsson;

3.

GSM 03.40 version 6.0.0

4.

GSM 04.08 version 6.7.1

5.

GSM 07.05 version 5.5.0: January 1998;

6.

GSM 03.38 version 7.0.0


(Phase 2+);

7.

http://old.electronix.ru/standatds/sms-pdu/index.php format;

8.

(SMS) ,

http://www.ixbt.com/mobile/review/comp_sms.shtml, ;

9.

http://www.unicode.org/charts/PDF/U0000.pdf C0 controls and Basic Latin


Range 0000-007F by Unicode Inc.;

10.

http://www.unicode.org/charts/PDF/U0400.pdf Cyrillic Range 0400-04FF by


Unicode Inc.;

11.

http://ru.wikipedia.org/wiki/%D0%9A%D1%80%D0%BE%D0%BA%D0%BE%D0%B7%D1%8F%D0
%B1%D1%80%D1%8B Wikipedia,
- !;

12.

http://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%B4%D0%BE%D0%B2%D0%B0%D1%8F_%D
1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 -
;

13.

http://ru.wikipedia.org/wiki/Windows-1251 - Win 1251.

PDU

Draft EN (GSM 03.40) V6.0.0 (1998-03);


Release 1997

Release 1998

SMS

ETSI EN 300 940 V6.7.1 (2000-06);

GSM 03.38 V7.0.0 (1998-07)


SMS and the PDU

PduByAP_2008_07_04.pdf

24-24