MMS does not work with T-Mobile US

Bug #1360403 reported by Jamie Strandboge
64
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
John McAleely
lxc-android-config (Ubuntu)
Fix Released
High
Unassigned
nuntium (Ubuntu)
Fix Released
High
Alfonso Sanchez-Beato
ofono (Ubuntu)
Fix Released
High
Tony Espy
ubuntu-download-manager (Ubuntu)
Invalid
High
Unassigned

Bug Description

My /var/lib/ofono/*/gprs file contains:

[Settings]
Powered=1
RoamingAllowed=0

[context1]
Name=T-Mobile GPRS
AccessPointName=fast.t-mobile.com
Username=
Password=
Type=internet
Protocol=ipv6
MessageProxy=
MessageCenter=http://mms.msg.eng.t-mobile.com/mms/wapenc

I guess bug #1331813 is getting in the way of IPv6 working, so I was told to try 'Protocol=ip', but it doesn't work either.

summary: - MMS does not work with T-Mobile
+ MMS does not work with T-Mobile US
Revision history for this message
Tony Espy (awe) wrote :

The main problem here is the lack of a MessageProxy, which is always assumed to be set in tandem with MessageCenter.

I believe the switch to IPv6 may have removed the need for a proxy, however as this is a hard-coded assumption in a few of our components ( nuntium, ofono, and ubuntu-download-manager ), this will take some effort to fix.

Changed in ofono (Ubuntu):
importance: Undecided → High
Changed in nuntium (Ubuntu):
importance: Undecided → High
Changed in ubuntu-download-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Tony Espy (awe) wrote :

To be clear though, this should be handled post-RTM.

Tony Espy (awe)
Changed in ofono (Ubuntu):
assignee: nobody → Tony Espy (awe)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nuntium (Ubuntu):
status: New → Confirmed
Changed in ofono (Ubuntu):
status: New → Confirmed
Changed in ubuntu-download-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

If the MessageProxy is the issue, we fixed that for the "Free" bug #1362008

Changed in nuntium (Ubuntu):
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This will require a change in the NetworkManager dispatcher script located in the lxc-android-config package, to work properly.

Changed in lxc-android-config (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
status: New → Triaged
importance: Undecided → High
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Relevant data for defining the right routes:

[ /ril_0 ]
    [ /ril_0/context1 ]
        Settings = { Method=static Netmask=255.255.255.0 Gateway=33.103.37.250 Address=33.103.37.xxx DomainNameServers=10.177.0.34,10.163.103.140, Interface=rmnet_usb0 }
        Name = T-Mobile GPRS
        AccessPointName = fast.t-mobile.com
        Password =
        Protocol = ip
        IPv6.Settings = { }
        Active = 1
        MessageProxy =
        MessageCenter = http://mms.msg.eng.t-mobile.com/mms/wapenc

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The script needs to be reworked a lot. Basically; there should be a few steps in establishing the routing table:

1) Add routes to the DomainNameServers when there are defined, to be routed via the rmnet_usb0 interface (or any interface named by the Interface property). Ignore that step without failing if it's not set.

2) Ignore Gateway if it's not set

3) Resolve the MessageCenter/MessageProxy specifically using the DomainNameServers specified, if they are. Otherwise use the default nameservers. Again, ignore failures (but report), and skip step 4 if it would have been applied if the address could have been resolved.

4) Add route to either MessageCenter, or MessageProxy, *or both*, depending on what is set. Ignore (but report) failures here since neither could be set, and failure to set the routes for MessageProxy and MessageCenter shouldn't invalidate the whole connection.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

There seems to be an issue on the download manager side for it not releasing the download/upload http://pastebin.ubuntu.com/8487638/

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Sending should work as long as wifi is off

Revision history for this message
Dennis O'Flaherty (doflah) wrote :

I'm able to "receive" picture messages through a complicated workaround. This gets dumped in the nuntium log (I obscured the incoming phone number):

00000000 c1 06 28 1f 22 61 70 70 6c 69 63 61 74 69 6f 6e |..(."application|
00000010 2f 76 6e 64 2e 77 61 70 2e 6d 6d 73 2d 6d 65 73 |/vnd.wap.mms-mes|
00000020 73 61 67 65 00 81 84 8d 80 af 84 8c 82 98 6d 61 |sage..........ma|
00000030 76 6f 64 69 2d 37 2d 38 39 2d 63 31 2d 33 2d 63 |vodi-7-89-c1-3-c|
00000040 61 2d 37 2d 31 62 66 2d 34 2d 63 61 2d 34 61 32 |a-7-1bf-4-ca-4a2|
00000050 31 63 32 38 00 8d 92 89 1a 80 18 83 2b 00 00 00 |1c28........+---|
00000060 00 00 00 00 00 00 00 00 2f 54 59 50 45 3d 50 4c |--------/TYPE=PL|
00000070 4d 4e 00 8a 80 8e 03 11 4a cb 88 05 81 03 03 f4 |MN......J.......|
00000080 80 83 68 74 74 70 3a 2f 2f 61 74 6c 32 6d 6f 73 |..http://atl2mos|
00000090 67 65 74 2e 6d 73 67 2e 65 6e 67 2e 74 2d 6d 6f |get.msg.eng.t-mo|
000000a0 62 69 6c 65 2e 63 6f 6d 2f 6d 6d 73 2f 77 61 70 |bile.com/mms/wap|
000000b0 65 6e 63 3f 54 3d 6d 61 76 6f 64 69 2d 37 2d 31 |enc?T=mavodi-7-1|
000000c0 33 62 2d 31 62 66 2d 34 2d 63 61 2d 34 61 32 31 |3b-1bf-4-ca-4a21|
000000d0 63 32 38 00 |c28.|

I can extract the URL from the dump and pull it down from the tmo server as long as wifi is OFF

  wget http://atl2mosget.msg.eng.t-mobile.com/mms/wapenc?T=mavodi-7-13b-1bf-4-ca-4a21c28

which gives me a SMIL message with a jpg attachment. If I truncate the file up until the FF D8 FF magic number for jpeg, I'm left with a file I can open in an image viewer.

The nuntium log also contains this line - maybe it's encountering an unexpected message type which prevents the MMS from propagating through the rest of the pipeline:
  2014/12/20 12:21:46 Error cannot decode media type for field beginning with 0x28@2

Hopefully this is useful to someone...

Changed in lxc-android-config (Ubuntu):
assignee: Mathieu Trudel-Lapierre (mathieu-tl) → nobody
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Curious on the status of this. AIUI, group messages are one of the things implemented with MMS and I miss these all the time (which has caused me friction with people who text me).

Revision history for this message
Tony Espy (awe) wrote :

@Jamie

I understand your pain... Unfortunately our total focus on RTM until just recently has meant no new feature work and/or focus on US carrier interoperability.

I will make sure this gets discussed at our next planning session.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks Tony-- I certainly understand the priorities and appreciate you bringing it up for discussion in the planning session.

Revision history for this message
dobey (dobey) wrote :

Any chance we could get this fixed soon, in some way?

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Yes please! Preventing me from using Ubuntu Phone on my Nexus 4.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I tried 1.4+15.04.20150604-0ubuntu1 from the stable-phone-overlay on my nexus 4 on rc-proposed with t-mobile:
$ system-image-cli -i
current build number: 154
device name: mako
channel: ubuntu-touch/rc-proposed/ubuntu
last update: 2015-06-10 23:05:21
version version: 154
version ubuntu: 20150611
version device: 20150210
version custom: 20150611

I am now able to send group texts and I received responses (I don't know if their reply is to the group), but if they initiate a group text, I don't receive it. Prior to this upgrade if I tried to send a group text the messaging-app would just say 'Failed!'. Seems progress is being made, but not quite there yet.

Changed in nuntium (Ubuntu):
assignee: Sergio Schvezov (sergiusens) → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Changed in canonical-devices-system-image:
importance: Undecided → High
milestone: none → ww28-2015
status: New → Confirmed
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@jdstrand I think that now group messages use SMS by default. Would you mind trying to send/receive a "plain" MMS (simply attaching a photo) and see if that works now?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Alfonso-- I tried to send a photo and it came back as 'Failed!'.

As for group messages-- I guess you are saying that Ubuntu will send group messages via SMS, but that people using !Ubuntu sending group messages to me will use MMS? I guess that explains why when I sent a group message, I got individuals replies rather than (not receiving) replies to the group. Should we be implementing what other platforms are doing wrt group messages so it is all interoperable and people can expect the same behavior?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

It appears that the messaging-app has a setting to enable MMS or not. It was set to disabled. I enabled it and tried to resend the photo and it failed. I then rebooted the phone and tried to send a new message with a photo attached and it failed.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, Alfonso and I debugged a little bit, but still not working. He sent me a patched ofonod which didn't work, and I sent him the required logs.

Revision history for this message
Dennis O'Flaherty (doflah) wrote :

Jamie, I was able to get this working recently on my N4 using the dev channel. I patched nuntium (trunk, see attachment) to be able to receive picture messages then I had to change some of my APN settings with /usr/share/ofono/scripts to be able to send. I don't use group messages, but when I send an image to my phone through tmomail, it receives it as a group message from my e-mail address and a blank recipient.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@jdstrand thank for the logs you sent me. I see there two interesting things:

1. The traffic for the MMS proxy is going through WiFi instead of the cellular connection. This is a bug in the 03mmsproxy which is executed by NetworkManager. Apparently it does not create routes properly when it needs to resolve a host name. This is a similar bug that the patched ofono I sent you was solving. The difference is that for contexts that support internet+mms at the same time (as T-Mobile's) the routing is made by NM instead of ofono, and that's why the new ofono did not change things.

2. Unusually, the MMSC is accessible via internet, so ubuntu-upload-manager can reach it anyway. However, the server responds with result "HTTP/1.0 302 Found". Apparently this can mean URL re-direction (but the response does specify the same URL as the request!) or a request to change the POST u-u-m used to a GET. But maybe it is just the error it returns when trying to access from wifi instead of using the cellular connection.

I have added lxc-android-config to the bug (03mmsproxy resides there) and ubuntu-dowload-manager (package that includes the uploader) to address point 1 and 2 respectively.

[1] https://en.wikipedia.org/wiki/HTTP_302

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@doflah, is the patch you made for nuntium a hack to be able to send or a change that you needed to do? If it is the latest would you mind creating a pull request against https://github.com/ubuntu-phonedations/nuntium ? It looks like you change is to be able to rx non-SMIL messages. Thanks!

Also, as you were able to send (I guess setting the MMSC IP address in the context), probably means point 2 in my previous comment is due to trying to send from wifi instead of the cellular connection.

Revision history for this message
Dennis O'Flaherty (doflah) wrote :

It was a little bit of both but I made the changes to be able to receive. The only change I think I needed to make to send was to set the context url, which I think is consistent with Sergio's comment #11. It's a change i needed to make but it's a little bit of a hack in that I'm not sure it's the "correct" fix. I just know it works.

I just tried building from the github version and it seems the changes in push.go are no longer necessary. I still need to patch it to let non-SMIL messages in, but I'm not sure if that's a normal event (MMS from another phone) or if it's just because I'm using the smtp gateway (MMS from e-mail) to test it. I'm not an MMS expert, so it's mostly just trial and error at this point.

I wasn't able to send or receive over wifi, I needed to switch the data connection. It also doesn't seem to try to receive again if you switch after a failure which means you lose the message.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

An additional problem found: 03mmsproxy (the one attached) sets up a route for just one of the IPs of the MMSC. If it is a balanced server it can happen that 03mmsproxy sets up a route for an IP that is different to the one that ubuntu-upload-manager uses in the end, due to different responses from the DNS servers.

The "HTTP/1.0 302 Found" server response happens even when the connection is properly routed through the cellular connection.

Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
Changed in canonical-devices-system-image:
milestone: ww28-2015 → ww34-2015
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

After solving bug #1417976 , the missing piece for reception of MMS has been solved with

https://github.com/ubuntu-phonedations/nuntium/pull/30

Changed in ubuntu-download-manager (Ubuntu):
status: Confirmed → Invalid
Changed in ofono (Ubuntu):
status: Confirmed → Fix Released
Changed in nuntium (Ubuntu):
status: Confirmed → Fix Released
Changed in lxc-android-config (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Umpf, I marked nuntium as "Fix Released" and cannot change that back

Revision history for this message
John McAleely (john.mcaleely) wrote :

neither can I :-(

Changed in nuntium (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nuntium - 1.4+15.10.20150714-0ubuntu1

---------------
nuntium (1.4+15.10.20150714-0ubuntu1) wily; urgency=medium

  [ Dennis O'Flaherty ]
  * Enable receiving non-SMIL messages

  [ Alfonso Sanchez-Beato (email Canonical) ]
  * Fix decoding of From field value (LP: #1360403)

 -- CI Train Bot <email address hidden> Tue, 14 Jul 2015 09:19:52 +0000

Changed in nuntium (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Confirmed → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.