Modify mms_submit_req(mm1)

Modify mms_submit_req(mm1) SearchSearch
Author Message
Thilani Abeysinghe
New member
Username: Thilani

Post Number: 9
Registered: 02-2009
Posted on Thursday, September 17, 2009 - 12:23 pm:   

Hi,
I'm trying to modify mms_submit_req.and trying to add another media type(text/image/video/..) and send to mmsc.
For that I studied about mms pdu encoding/decoding documents, MMS Encapsulation Specification, published by the Open Mobile Alliance.

I tried to modify the mms pdu after studying mms encoding/decoding


Checked the mms content type for vnd.wap.multipart.related or vnd.wap.multipart.mixed

Changedtthe number of media parts in mms pdu
Modified the smil file
encoded new media
and then forwarded to mmsc

Following is the part of incoming mms_submit_req trace

8c 80 message type submit_req
98 transaction id
[45 30 41 44 41 33 30 32 33 31 35 39 35 30 00]

8d 90 mms version 1.0
89 01 81 From <insert address>
97 To[30 37 37 32 32 37 38 30
38 37 2f 54 59 50 45 3d 50 4c 4d 4e 00]
8a 80 Message class personal
8f 81 priority normal
86 81 delivery report No
90 81 Read report No
84 Content type
1f Followed by a uintvar number of data octets after it
21 Content type header length
b3 wnd wap multipart related
8a start parameter
[3c 31 32 33 32 32
39 37 33 30 36 3e 00]
89 Type parameter
[61 70 70 6c 69 63 61 74
69 6f 6e 2f 73 6d 69 6c 00]
03 Number of parts in the message
Part 1
1e Header length =30

b6 5d Data length
0f -Content header length
9e 85...

I modified the Number of parts in the message as 04
And then the smil file
Smil before modified.
In this smil file header length is =2e =46
Data length is 82 7a =378
2e
1db0 82 7a 1e 61 70 70 6c 69 63 61 74 69 6f 6e 2f 73 .z.application/s
1dc0 6d 69 6c 00 81 ea 85 70 72 65 73 2e 73 6d 69 6c mil....pres.smil
1dd0 00 c0 22 3c 31 32 33 32 32 39 37 33 30 36 3e 00 .."<1232297306>.
1de0 0d 0a 3c 73 6d 69 6c 3e 0d 0a 3c 68 65 61 64 3e ..<smil>..<head>
1df0 0d 0a 3c 6c 61 79 6f 75 74 3e 0d 0a 3c 72 6f 6f ..<layout>..<roo
1e00 74 2d 6c 61 79 6f 75 74 20 77 69 64 74 68 3d 22 t-layout width="
1e10 31 37 36 22 20 68 65 69 67 68 74 3d 22 32 30 38 176" height="208
1e20 22 2f 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 64 3d "/>..<region id=
1e30 22 49 6d 61 67 65 22 20 77 69 64 74 68 3d 22 31 "Image" width="1
1e40 36 30 22 20 68 65 69 67 68 74 3d 22 31 32 30 22 60" height="120"
1e50 20 74 6f 70 3d 22 38 33 22 20 6c 65 66 74 3d 22 top="83" left="
1e60 38 22 20 66 69 74 3d 22 6d 65 65 74 22 2f 3e 0d 8" fit="meet"/>.
1e70 0a 3c 72 65 67 69 6f 6e 20 69 64 3d 22 54 65 78 .<region id="Tex
1e80 74 22 20 77 69 64 74 68 3d 22 31 36 30 22 20 68 t" width="160" h
1e90 65 69 67 68 74 3d 22 37 33 22 20 74 6f 70 3d 22 eight="73" top="
1ea0 35 22 20 6c 65 66 74 3d 22 38 22 20 66 69 74 3d 5" left="8" fit=
1eb0 22 73 63 72 6f 6c 6c 22 2f 3e 0d 0a 3c 2f 6c 61 "scroll"/>..</la
1ec0 79 6f 75 74 3e 0d 0a 3c 2f 68 65 61 64 3e 0d 0a yout>..</head>..
1ed0 3c 62 6f 64 79 3e 0d 0a 3c 70 61 72 20 64 75 72 <body>..<par dur
1ee0 3d 22 35 30 30 30 6d 73 22 3e 0d 0a 3c 69 6d 67 ="5000ms">..<img
1ef0 20 72 65 67 69 6f 6e 3d 22 49 6d 61 67 65 22 20 region="Image"
1f00 73 72 63 3d 22 49 6d 61 67 65 5f 31 36 2e 6a 70 src="Image_16.jp
1f10 67 22 2f 3e 0d 0a 3c 74 65 78 74 20 72 65 67 69 g"/>..<text regi
1f20 6f 6e 3d 22 54 65 78 74 22 20 73 72 63 3d 22 4d on="Text" src="M
1f30 6d 73 5f 70 72 6f 78 2e 74 78 74 22 2f 3e 0d 0a ms_prox.txt"/>..
1f40 3c 2f 70 61 72 3e 0d 0a 3c 2f 62 6f 64 79 3e 0d </par>..</body>.
1f50 0a 3c 2f 73 6d 69 6c 3e 0d 0a .</smil>..


This is the smile I'm getting with mms_submit_req

<smil>

<head>
<layout>
<root-layout width="176" height="208"/>
<region id="Image" width="160" height="120" top="83" left="8" fit="meet"/>
<region id="Text" width="160" height="73" top="5" left="8" fit="scroll"/>
</layout>
</head
<body>
<par dur="5000ms">
<img region="Image" src="Image_16.jpg"/>
<text region="Text" src="Mms_prox.txt"/>
</par>
</body>
</smil>

Modified smil
In this smil file header length is =2e =46
Data length is encoded as uint var when decoded
Data length is 82 70 = 496

1da0 2e 83 70 1e 61 70 70 6c 69 63 61 74 69 6f 6e y..p.application
1db0 2f 73 6d 69 6c 00 81 ea 85 70 72 65 73 2e 73 6d /smil....pres.sm
1dc0 69 6c 00 c0 22 3c 31 32 33 32 32 39 37 33 30 36 il.."<1232297306
1dd0 3e 00 0d 0a 3c 73 6d 69 6c 3e 0d 0a 3c 68 65 61 >...<smil>..<hea
1de0 64 3e 0d 0a 3c 6c 61 79 6f 75 74 3e 0d 0a 3c 72 d>..<layout>..<r
1df0 6f 6f 74 2d 6c 61 79 6f 75 74 20 77 69 64 74 68 oot-layout width
1e00 3d 22 31 37 36 22 20 68 65 69 67 68 74 3d 22 32 ="176" height="2
1e10 30 38 22 2f 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 08"/>..<region i
1e20 64 20 3d 22 61 64 6c 69 76 65 22 20 77 69 64 74 d ="adlive" widt
1e30 68 3d 22 31 36 30 22 20 68 65 69 67 68 74 3d 22 h="160" height="
1e40 31 32 30 22 66 69 74 20 3d 22 6d 65 65 74 22 2f 120"fit ="meet"/
1e50 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 64 3d 22 49 >..<region id="I
1e60 6d 61 67 65 22 20 77 69 64 74 68 3d 22 31 36 30 mage" width="160
1e70 22 20 68 65 69 67 68 74 3d 22 31 32 30 22 20 74 " height="120" t
1e80 6f 70 3d 22 38 33 22 20 6c 65 66 74 3d 22 38 22 op="83" left="8"
1e90 20 66 69 74 3d 22 6d 65 65 74 22 2f 3e 0d 0a 3c fit="meet"/>..<
1ea0 72 65 67 69 6f 6e 20 69 64 3d 22 54 65 78 74 22 region id="Text"
1eb0 20 77 69 64 74 68 3d 22 31 36 30 22 20 68 65 69 width="160" hei
1ec0 67 68 74 3d 22 37 33 22 20 74 6f 70 3d 22 35 22 ght="73" top="5"
1ed0 20 6c 65 66 74 3d 22 38 22 20 66 69 74 3d 22 73 left="8" fit="s
1ee0 63 72 6f 6c 6c 22 2f 3e 0d 0a 3c 2f 6c 61 79 6f croll"/>..</layo
1ef0 75 74 3e 0d 0a 3c 2f 68 65 61 64 3e 0d 0a 3c 62 ut>..</head>..<b
1f00 6f 64 79 3e 0d 0a 3c 70 61 72 3e 0d 0a 3c 74 65 ody>..<par>..<te
1f10 78 74 20 72 65 67 69 6f 6e 3d 22 61 64 6c 69 76 xt region="adliv
1f20 65 22 20 73 72 63 3d 22 54 6d 67 5f 67 6d 74 2e e" src="Tmg_gmt.
1f30 74 78 74 22 2f 3e 0d 0a 3c 2f 70 61 72 3e 0d 0a txt"/>..</par>..
1f40 3c 70 61 72 20 64 75 72 3d 22 35 30 30 30 6d 73 <par dur="5000ms
1f50 22 3e 0d 0a 3c 69 6d 67 20 72 65 67 69 6f 6e 3d ">..<img region=
1f60 22 49 6d 61 67 65 22 20 73 72 63 3d 22 49 6d 61 "Image" src="Ima
1f70 67 65 5f 31 36 2e 6a 70 67 22 2f 3e 0d 0a 3c 74 ge_16.jpg"/>..<t
1f80 65 78 74 20 72 65 67 69 6f 6e 3d 22 54 65 78 74 ext region="Text
1f90 22 20 73 72 63 3d 22 4d 6d 73 5f 70 72 6f 78 2e " src="Mms_prox.
1fa0 74 78 74 22 2f 3e 0d 0a 3c 2f 70 61 72 3e 0d 0a txt"/>..</par>..
1fb0 3c 2f 62 6f 64 79 3e 0d 0a 3c 2f 73 6d 69 6c 3e </body>..</smil>
1fc0 0d 0a ..


Modified Smil
<smil>

<head>

<layout>

<root-layout width="176" height="208"/>
<region id ="adlive" width="160" height="120"fit ="meet"/>
<region id="Image" width="160" height="120" top="83" left="8" fit="meet"/>
<region id="Text" width="160" height="73" top="5" left="8" fit="scroll"/>
</layout>
</head>
<body>
<par>
<text region="adlive" src="Tmg_gmt.txt"/>
</par>
<par dur="5000ms">
<img region="Image" src="Image_16.jpg"/>
<text region="Text" src="Mms_prox.txt"/>
</par>
</body>
</smil>

After that I added the new media
1E 0A 10 83 81 EA 85 54 6d 67 5f 67 6d 74 2e 74 78 74 00 8e 54 6d 67 5f 67 6d 74 2e 74 78 74 00 54 6d 67 20 67 6d 74 20 67 6d

I submit modified mms_send_req to mmsc.Then in logs it says that can't parse the smil part.
And I'm getting a response as Malformed MMS
It says that there is a parse error incoming message.
Is there anything I have missed out.?
Any suggestions.?

Thanks
Thilani