Closed Bug 873145 Opened 11 years ago Closed 11 years ago

B2G MMS: sendMMS does not transmit end-to-end

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24
blocking-b2g leo+
Tracking Status
firefox22 --- wontfix
firefox23 --- wontfix
firefox24 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: rwaldron, Assigned: ctai)

References

Details

(Whiteboard: [uplift-blocker] [fixed-in-birch])

Attachments

(1 file, 1 obsolete file)

#872373 landed and threadIds are created properly (thank you!), however messages never completely send. 

STR:

1. From case.js, copy these lines: https://gist.github.com/rwldrn/b2aaf04f07c1990e8037#file-case-js-L297-L344 into (gaia) apps/sms/js/smil.js
2. make install-gaia APP=sms ; adb logcat | grep --color=never "Console.*sms"
3. open the SMS app

Expected: 

logcat should print the following:

navigator.mozMobileMessage exists
event: sending
event: sent

Actual: 

logcat prints only:

navigator.mozMobileMessage exists
event: sending


The SMS/Messaging app will now have a new thread in the message list. Clicking on the thread will show a message that never sends.
Additional repro information: the recipient device (in this case, my phone) will never receive a message.
Weird... Two questions for clarifying the root cause:

1. Can your device receive an MMS (if you can receive then there's no reason we cannot send from the Gecko's point of view)?

2. Have you tried to turn on the Data Connection before sending MMS (MMS is only allowed to be sent and received when the Data Connection is enabled)?
Blocks: b2g-mms, 872369
blocking-b2g: --- → leo?
Flags: needinfo?(waldron.rick)
One more question:

3. Could you please install your SIM in an Android phone and try to send an MMS from it to see if it works (some carriers disable the MMS as default to avoid exploding charge)?
4. Another possibility is your SIM card runs out of money. You can also verify it by #3.
(In reply to Gene Lian [:gene] from comment #2)
> Weird... Two questions for clarifying the root cause:
> 
> 1. Can your device receive an MMS (if you can receive then there's no reason
> we cannot send from the Gecko's point of view)?

Yes

> 
> 2. Have you tried to turn on the Data Connection before sending MMS (MMS is
> only allowed to be sent and received when the Data Connection is enabled)?

Yes

> 
> 3. Could you please install your SIM in an Android phone and try to send an MMS from it 
> to see if it works (some carriers disable the MMS as default to avoid exploding charge)?

Unfortunately, I don't have another device available.

> 
> 4. Another possibility is your SIM card runs out of money. You can also verify it by #3.

I've confirmed that my service plan has unlimited text which includes "picture messages" (this is T-Mobile's term for MMS)
Flags: needinfo?(waldron.rick)
After some offline emails....Rick can't make phone and have no signal strength on his phone. Looks like it might not gecko problem. I asked Rick to do more experiments(re-flash, reboot, verify sim card on other phones) when he is available.
To clarify the sending behaviour: if you cannot get a "sent" event, it's highly possible due to a connection problem. Actually, the "sent" event won't return until 3 times of sending retries, where each of them will do by a 5-minute time delay. That means you can still get a "sent" event in any way after 15 minutes at most.
I'm seeing the same thing now too, will try to help debug more, but basically, the message goes to sending and never gets to sent, eventually if you wait long enough, it changes to an error.

:ctai thinks this might be t-mobile/APN related - both rick and I use this carrier, so it's possible.
blocking-b2g: leo? → leo+
Some questions to claify this issue.
1. Can you make phone call? How is the radio strength in your cellphone at that time?
We can't send MMS with no signal. Does the no signal frequently happen? Can reboot and wait a while can make a phone call?

2. According to Corey's log in https://gist.github.com/gnarf37/129a4957e198aab31d5b.
This log shows that gecko can connect to MMSC. But the message is wrong, so the MMSC return an error "wrong format". This log shows the APN settings for T-mobile is good. Because we can "POST" a http request with response.

3. If you have no signal happened, then it is normal behavior that get an error after retry(you need to wait long enough). We can't send MMS with no signal.

4. Have you ever sent a MMS sucessfully? I fix a SMS AP's bug in Corey's sendMMS branch and can send a MMS with wallpaper sucessfully. How is your status?

5. If you can't send MMS with good signal(make sure you can make a phone call/surfing internet without wifi at that time), please enable the MMS gecko flag and post the log. That will be very helpful for debuging. Thanks and apperciate.
Flags: needinfo?(gnarf37)
Flags: needinfo?(waldron.rick)
https://gist.github.com/gnarf37/27f570a1ca70e3117607 - this is sending a text only message
Flags: needinfo?(gnarf37)
I've had no signal problems - also, the latest code is on master for sendMMS now.
Attached image Unagi send MMS via taiwan carrier (obsolete) —
:corey, the latest patch work fine for me. I still can send MMS. I might need your help to debug it. Thanks in advance.
Now I am trying to analysis the PDU of sending MMS....Here is current decode result.
Finish PDU header. Next step is analysis each part's header.

MmsService: msg: {"headers":{"to":[{"address":"+886978502150","type":"PLMN"}],"x-mms-message-type":128,"x-mms-transaction-id":"{c5f2db57-a69d-4b82-9607-f0093edfe5d1}","x-mms-mms-version":19,"from":null,"date":"2013-05-23T07:20:17.449Z","x-mms-message-class":"personal","x-mms-expiry":604800,"x-mms-priority":129,"x-mms-read-report":true,"x-mms-delivery-report":true,"content-type":{"params":{"type":"application/smil","start":"<smil>"},"media":"application/vnd.wap.multipart.related"},"x-mms-message-size":42526},

"parts":[{"headers":{"content-type":{"media":"application/smil","params":{"name":"smil.xml"}},"content-length":411,"content-location":"smil.xml","content-id":"<smil>"},"content":"<smil><head><layout><root-layout width=\"320px\" height=\"480px\"/><region id=\"Image\" left=\"0px\" top=\"0px\" width=\"320px\" height=\"320px\" fit=\"meet\"/><region id=\"Text\" left=\"0px\" top=\"320px\" width=\"320px\" height=\"160px\" fit=\"meet\"/></layout></head><body><par dur=\"5000ms\"><text src=\"text_0.txt\" region


05-23 15:20:17.958 I/Gecko   ( 4252): -$- MmsPduHelper: Composed PDU Header: [140,128,152,123,99,53,102,50,100,98,53,55,45,97,54,57,100,45,52,98,56,50,45,57,54,48,55,45,102,48,48,57,51,101,100,102,101,53,100,49,125,0,141,147,151,43,56,56,54,57,55,56,53,48,50,49,53,48,47,84,89,80,69,61,80,76,77,78,0,137,1,129,133,4,81,157,195,49,138,128,136,5,129,3,9,58,128,143,129,144,128,134,128,142,2,166,30,132,28,179,137,97,112,112,108,105,99,97,116,105,111,110,47,115,109,105,108,0,138,34,60,115,109,105,108,62,0]

05-23 17:28:08.682 I/Gecko   ( 4486): -@- WspPduHelper: Encoded multipart header: [3]
05-23 17:35:41.163 I/Gecko   ( 4692): -@- WspPduHelper: @@ i = 0
05-23 17:35:41.173 I/Gecko   ( 4692): -@- WspPduHelper: @@ part = {"headers":{"content-type":{"media":"application/smil","params":{"name":"smil.xml"}},"content-length":411,"content-location":"smil.xml","content-id":"<smil>"},"content":"<smil><head><layout><root-layout width=\"320px\" height=\"480px\"/><region id=\"Image\" left=\"0px\" top=\"0px\" width=\"320px\" height=\"320px\" fit=\"meet\"/><region id=\"Text\" left=\"0px\" top=\"320px\" width=\"320px\" height=\"160px\" fit=\"meet\"/></layout></head><body><par dur=\"5000ms\"><text src=\"text_0.txt\" region=\"Text\"/></par><par dur=\"5000ms\"><img src=\"resources320x480FXOSDuskFlowers.png\" region=\"Image\"/></par></body></smil>"}
05-23 17:35:41.183 I/Gecko   ( 4692): -@- WspPduHelper: Encoded per-part header: [51,131,27,27,97,112,112,108,105,99,97,116,105,111,110,47,115,109,105,108,0,133,115,109,105,108,46,120,109,108,0,141,2,1,155,142,115,109,105,108,46,120,109,108,0,192,34,60,115,109,105,108,62,0]
05-23 17:35:41.183 I/Gecko   ( 4692): -@- WspPduHelper: @@ i = 1
05-23 17:35:41.183 I/Gecko   ( 4692): -@- WspPduHelper: @@ part = {"headers":{"content-type":{"media":"text/plain","params":{"name":"text_0.txt"}},"content-length":2,"content-location":"text_0.txt","content-id":"<text_0.txt>"},"content":{"0":69,"1":101}}
05-23 17:35:41.193 I/Gecko   ( 4692): -@- WspPduHelper: Encoded per-part header: [43,2,13,131,133,116,101,120,116,95,48,46,116,120,116,0,141,130,142,116,101,120,116,95,48,46,116,120,116,0,192,34,60,116,101,120,116,95,48,46,116,120,116,62,0]
05-23 17:35:41.203 I/Gecko   ( 4692): -@- WspPduHelper: @@ i = 2
05-23 17:35:41.564 I/Gecko   ( 4692): -@- WspPduHelper: @@ part = {"headers":{"content-type":{"media":"image/jpeg","params":{"name":"resources320x480FXOSDuskFlowers.png"}},"content-length":42113,"content-location":"resources320x480FXOSDuskFlowers.png","content-id":"<resources320x480FXOSDuskFlowers.png>"},"content":{"0":255,"1":216,"2":255,"3":224,"4":0,"5":16,"6":74,"7":70,"8":73,"9":70,"10":0,"11":1,"12":1,"13":0,"14":0,"15":1,"16":0,"17":1,"18":0,"19":0,"20":255,"21":219,"22":0,"23":67,"24":0,"25":3,"26":2,"27":2,"28":2,"29":2,"30":2,"31":3,"32":2,"33":2,"34":2,"35":3,"36":3,"37":3,"38":3,"39":4,"40":6,"41":4,"42":4,"43":4,"44":4,"45":4,"46":8,"47":6,"48":6,"49":5,"50":6,"51":9,"52":8,"53":10,"54":10,"55":9,"56":8,"57":9,"58":9,"59":10,"60":12,"61":15,"62":12,"63":10,"64":11,"65":14,"66":11,"67":9,"68":9,"69":13,"70":17,"71":13,"72":14,"73":15,"74":16,"75":16,"76":17,"77":16,"78":10,"79":12,"80":18,"81":19,"82":18,"83":16,"84":19,"85":15,"86":16,"87":16,"88":16,"89":255,"90":219,"91":0,"92":67,"93":1,"94":3,"95":3,"96":3,"97":4,"98":3,"99":4,"
05-23 17:35:41.734 I/Gecko   ( 4692): -@- WspPduHelper: Encoded per-part header: [121,130,201,1,31,38,158,133,114,101,115,111,117,114,99,101,115,51,50,48,120,52,56,48,70,88,79,83,68,117,115,107,70,108,111,119,101,114,115,46,112,110,103,0,141,2,164,129,142,114,101,115,111,117,114,99,101,115,51,50,48,120,52,56,48,70,88,79,83,68,117,115,107,70,108,111,119,101,114,115,46,112,110,103,0,192,34,60,114,101,115,111,117,114,99,101,115,51,50,48,120,52,56,48,70,88,79,83,68,117,115,107,70,108,111,119,101,114,115,46,112,110,103,62,0]


140, type ,128 type MMS_PDU_TYPE_SEND_REQ = 128

152, txn-id ,123,99,53,102,50,100,98,53,55,45,97,54,57,100,45,52,98,56,50,45,57,54,48,55,45,102,48,48,57,51,101,100,102,101,53,100,49,125,0  txn-id
{c5f2db57-a69d-4b82-9607-f0093edfe5d1}   

141,x-mms-mms-version, 147 = 0x93 => 1.3

151, to, 43,56,56,54,57,55,56,53,48,50,49,53,48,47,84,89,80,69,61,80,76,77,78,0
        +  8  8  6  9  7  8  5  0  2  1  5  0 /  T  Y  P  E   =  P  L  M  N

137, from 137,1,129

133, date 4, 81,157,195,49
 
138, x-mms-message-class 128 = personal

136, x-mms-expiry, 5,129,3,9,58,128, 

143,x-mms-priority 129

144, x-mms-read-report, 128

134, x-mms-delivery-report, 128
 
142, x-mms-message-size, 2, 166,30 = 166*256+30 =42526

132, content-type,28, 179, 137, 97,112,112,108,105,99,97,116,105,111,110,47,115,109,105,108,0 ,138,34,60,115,109,105,108,62,0
                28=len 179 = application/vnd.wap.multipart.related    137=type      application/smil 138=start "<smil>
3 parts

part[0]:
header len = 51
131 = type, 27,27,  97,112,112,108,105,99,97,116,105,111,110,47,115,109,105,108,0(application/smil)
Flags: needinfo?(waldron.rick)
Assignee: nobody → ctai
Attached patch Patch v1.0Splinter Review
Attachment #753087 - Attachment is obsolete: true
Attachment #753597 - Flags: review?
Attachment #753597 - Flags: review? → review?(vyang)
Comment on attachment 753597 [details] [diff] [review]
Patch v1.0

Review of attachment 753597 [details] [diff] [review]:
-----------------------------------------------------------------

This patch solves on of my issues sending
This patch remove X-Mms-Message-Size in SendRequest.
This field is neither mandatory nor optional field.
Some MMSCs of carriers will check this but some are not.


(In reply to Chia-hung Tai [:ctai :ctai_mozilla :cht] from comment #14)
> Created attachment 753597 [details] [diff] [review]
> Patch v1.0
Comment on attachment 753597 [details] [diff] [review]
Patch v1.0

Review of attachment 753597 [details] [diff] [review]:
-----------------------------------------------------------------

Excellent!
Attachment #753597 - Flags: review?(vyang) → review+
Whiteboard: [uplift-blocker]
(Re-titled to clarify what's done in this patch)
https://hg.mozilla.org/projects/birch/rev/0c7354c06f21
Whiteboard: [uplift-blocker] → [uplift-blocker] [fixed-in-birch]
https://hg.mozilla.org/mozilla-central/rev/0c7354c06f21
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Blocks: 875390
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: