Jump to content

O2 MMS problems


Guest Shuflie

Recommended Posts

Guest starkos

Glad you were able to finally send your 1st mms message lol!

All credit to zuccster and le_lutin tho :)

Unfortunately this doesn't work as well for me as it does for le_lutin. For me it will still stop working after a while for some unknown reason, so I will be interested to see how long it works for you?

Don't think this will ever be properly sorted until someone identifies what is making the phone default to the T-mob mmc/mnc values :D

Ps; I wouldn't bother going into apn settings until it's stopped working to be honest, u'll just be tempting fate B)

Link to comment
Share on other sites

Glad you were able to finally send your 1st mms message lol!

All credit to zuccster and le_lutin tho :)

Unfortunately this doesn't work as well for me as it does for le_lutin. For me it will still stop working after a while for some unknown reason, so I will be interested to see how long it works for you?

Don't think this will ever be properly sorted until someone identifies what is making the phone default to the T-mob mmc/mnc values :D

Ps; I wouldn't bother going into apn settings until it's stopped working to be honest, u'll just be tempting fate B)

A reinstall of ChompSMS sorted the "stuck image" issue. Ill keep you posted on how long it works for !

Is there a relatively easy way to get it working again if/when it stops working ?

Edited by jlgmax
Link to comment
Share on other sites

Guest starkos

Just reset apns to default, select the same one again, then run the script in Terminal. Should only take a min but I don't really use mms much anyway, but I do wish we knew the real cause of the problem.

Ps; not sure if you would have to reboot it to get it working again either?

Link to comment
Share on other sites

Guest le_lutin

Great to hear that you guys got it working and thanks Starkos for the help. I think the key was the "reset" in the apn settings.

FYI, I can go into my APN settings and even view them and it doesn't have any effect on whether I can send an MMS.

Starkos,

The "current" in the db is reset every time the phone goes from 2g to 3g or vice versa. This is what zuccster and I observed. But, I had a look into the android code a few days ago, and it looks like that when resetting, it checks the SIM card for the mcc/mnc combination and then gets this combination from the (numeric) telephony.db and sticks a 1 in the current column of this row (and nulls all others).

BUT, the code I looked at was the vanilla android one. I figure that in the code we have (T-Mobile), T-Mobile have hard-coded a value of 23430 (the mcc/mnc combo) to be returned in the method which is supposed to interrogate the SIM (if it were properly interrogating our O2 sims, the code returned would be 23410). This is my theory and this would explain what is happening.

BTW, for anyone that doesn't know mcc = Mobile Country Code (234 is uk) and mnc = Mobile Network Code (30 is T-Mobile and 10 is O2 )

Link to comment
Share on other sites

Guest starkos

Sounds interesting le_lutin, hopefully there's a way to determine what's exactly making the check and if it can be changed.

Strange that it's not working as well for me as it is for you though. Has yours been working consistently up to now then?

I can't help feel there's a little more to it though, as this method (for me anyway) will only work if the apn (id131) is selected in settings first, before running the script. I know this because I edited the apns-conf.xml; deleting the t-mobile uk entry and changing the mcc and mnc to that of t-mobile as done by the script. But when resetting the apns the telephony.db showed all the correct entries but all carriers were NULL for current including the edited o2 one (id131) with T-mob mnc data :)

Edit: Sorry I tell a lie, the o2 one is set to current=1. But mms doesn't work, which I think is because it hasn't been selected as the apn to use, and you can't select it from settings as it won't appear due to changing the mnc value lol

Edited by starkos
Link to comment
Share on other sites

Guest le_lutin
Sounds interesting le_lutin, hopefully there's a way to determine what's exactly making the check and if it can be changed.

Strange that it's not working as well for me as it is for you though. Has yours been working consistently up to now then?

I can't help feel there's a little more to it though, as this method (for me anyway) will only work if the apn (id131) is selected in settings first, before running the script. I know this because I edited the apns-conf.xml; deleting the t-mobile uk entry and changing the mcc and mnc to that of t-mobile as done by the script. But when resetting the apns the telephony.db showed all the correct entries but all carriers were NULL for current including the edited o2 one (id131) with T-mob mnc data :)

Edit: Sorry I tell a lie, the o2 one is set to current=1. But mms doesn't work, which I think is because it hasn't been selected as the apn to use, and you can't select it from settings as it won't appear due to changing the mnc value lol

It still does work consistently for me. Does it break for you when you move from 2g/3g/vice versa?

I need to do a bit more investigation on this as I haven't tried to reset all my apns and start again from square one.

So when we reset all the apns from the UI (Access Point Names -> Reset to Default), we're saying that all the telephony.db is refreshed using the data from the apns-conf.xml, right?

What are the four access point names that you see when you do this refresh (the exact names and ids from the telephony.db)?

Link to comment
Share on other sites

Guest zuccster
The "current" in the db is reset every time the phone goes from 2g to 3g or vice versa. This is what zuccster and I observed. But, I had a look into the android code a few days ago, and it looks like that when resetting, it checks the SIM card for the mcc/mnc combination and then gets this combination from the (numeric) telephony.db and sticks a 1 in the current column of this row (and nulls all others).

le_lutin, can you point me to the source you were looking at, please? I'd like to have a peek myself.

Ta.

Link to comment
Share on other sites

Guest le_lutin
le_lutin, can you point me to the source you were looking at, please? I'd like to have a peek myself.

Ta.

There is an updateCurrentCarrierInProvider method in the class GSMPhone.java

	/**

	 * Sets the "current" field in the telephony provider according to the SIM's operator

	 * 

	 * @return true for success; false otherwise.

	 */

	boolean updateCurrentCarrierInProvider() {

		if (mSIMRecords != null) {

			try {

				Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");

				ContentValues map = new ContentValues();

				map.put(Telephony.Carriers.NUMERIC, mSIMRecords.getSIMOperatorNumeric());

				mContext.getContentResolver().insert(uri, map);

				return true;

			} catch (SQLException e) {

				Log.e(LOG_TAG, "Can't store current operator", e);

			}

		}

		return false;

	}
Now the getSIMOperatorNumeric from the SIMRecords class:
	/** Returns the 5 or 6 digit MCC/MNC of the operator that

	 *  provided the SIM card. Returns null of SIM is not yet ready

	 */

	String getSIMOperatorNumeric()

	{

		if (imsi == null) {

			return null;

		}


		if (mncLength != 0) {

			// Length = length of MCC + length of MNC

			// length of mcc = 3 (TS 23.003 Section 2.2)

			return imsi.substring(0, 3 + mncLength);

		}


		// Guess the MNC length based on the MCC if we don't

		// have a valid value in ef[ad]


		int mcc;


		mcc = Integer.parseInt(imsi.substring(0,3));


		return imsi.substring(0, 3 + MccTable.smallestDigitsMccForMnc(mcc));

	}

The above code is from the vanilla android code and the getSIMOperatorNumeric would return 23410 for an o2 SIM. BUT, I think that in the ROM that we have, this method is being overridden to return (23430) all the time. This then always (re)sets the current as T-Mobile.

Oh yes, and we don't have the source code for the T-Mobile ROM, so I can't be sure of this theory.

Edited by le_lutin
Link to comment
Share on other sites

Guest starkos
It still does work consistently for me. Does it break for you when you move from 2g/3g/vice versa?

I need to do a bit more investigation on this as I haven't tried to reset all my apns and start again from square one.

So when we reset all the apns from the UI (Access Point Names -> Reset to Default), we're saying that all the telephony.db is refreshed using the data from the apns-conf.xml, right?

What are the four access point names that you see when you do this refresh (the exact names and ids from the telephony.db)?

To be honest I haven't found an exact pattern for when mine stops working yet, sorry. Yes your correct about apns-conf.xml updating the telephony.db when resetting apns (I imagine when restarting the phone as well?), but also editing the apns from the UI changes the .db.

If you download my apns-conf.xml I attached on the previous page, you will see around half way through it the three usual o2 uk apns that everyone has, then the last entry is the o2 one I manually added so that it would be including when resetting apns so as to not have to do it manually everytime I wanted to set up mms

Link to comment
Share on other sites

Guest le_lutin
To be honest I haven't found an exact pattern for when mine stops working yet, sorry. Yes your correct about apns-conf.xml updating the telephony.db when resetting apns (I imagine when restarting the phone as well?), but also editing the apns from the UI changes the .db.

If you download my apns-conf.xml I attached on the previous page, you will see around half way through it the three usual o2 uk apns that everyone has, then the last entry is the o2 one I manually added so that it would be including when resetting apns so as to not have to do it manually everytime I wanted to set up mms

So, if you change your connection from 2g to 3g or vice versa, you can still send an MMS? I mean doing this doesn't necessarily break it?

Edited by le_lutin
Link to comment
Share on other sites

Guest starkos
So, if you change your connection from 2g to 3g or vice versa, you can still send an MMS? I mean doing this doesn't necessarily break it?

I should be able to test that in the next couple hours :)

I keep meaning to ask, you say you still go into the apn settings and it works fine, what apns do you have in there and do any of them have the green dot next to it or are they all grey dotted?

Link to comment
Share on other sites

Guest le_lutin
I should be able to test that in the next couple hours :)

I keep meaning to ask, you say you still go into the apn settings and it works fine, what apns do you have in there and do any of them have the green dot next to it or are they all grey dotted?

I meant to ask before - when you do have the problem with MMS - what do you do to resolve it?

In APNs I have:

o2 UK - mobile.o2.co.uk

o2 UKPostpay - wap.o2.co.uk - THIS IS THE DEFAULT ONE WITH THE GREEN DOT

o2 UK payandgo - payandgo.o2.co.uk

I also have another apn entry in my telephony.db, called "o2 Pay monthly MMS". It's entry 131 and this is the one with current=1. It's connection settings are identical to the one above with the green dot.

Link to comment
Share on other sites

Guest le_lutin
I should be able to test that in the next couple hours :)

Can you not test it on your phone whenever you want by selecting "use only 2g networks". Or are you stuck in a 2g area now?

Link to comment
Share on other sites

Guest starkos
Can you not test it on your phone whenever you want by selecting "use only 2g networks". Or are you stuck in a 2g area now?

Yea where I am most of the time is 2g, strange tho coz 10mins away it turns to 3g lol! Anyway, just did a test: here on 2g mms sending/receiving worked; went to 3g area & again sending/recieving worked; now back where I usually am in 2g area & sending/receiving no longer works? It's almost as weird as the fact that I'm looking out of my window and it's sunny as well as snowing WTF! :)

Link to comment
Share on other sites

Guest le_lutin
Yea where I am most of the time is 2g, strange tho coz 10mins away it turns to 3g lol! Anyway, just did a test: here on 2g mms sending/receiving worked; went to 3g area & again sending/recieving worked; now back where I usually am in 2g area & sending/receiving no longer works? It's almost as weird as the fact that I'm looking out of my window and it's sunny as well as snowing WTF! :)

And what do you normally do to get it to work again?

Link to comment
Share on other sites

Guest starkos

I haven't really messed with mms much so I don't normally do anything. But just now I reset apns to default, selected the O2 MMS one then ran your script and it seems to be working again, although the phone I'm sending to has suddenly started having problems downloading the mms - that's prob just t-mob network tho..

Link to comment
Share on other sites

Guest le_lutin
I haven't really messed with mms much so I don't normally do anything. But just now I reset apns to default, selected the O2 MMS one then ran your script and it seems to be working again, although the phone I'm sending to has suddenly started having problems downloading the mms - that's prob just t-mob network tho..

So do you know if, when it's not working, your telephony.db is any different?

Link to comment
Share on other sites

Guest starkos

Nah I'm not sure for definite, but I think it just stays the same with the modified o2 apn (id131) as current=1. I think the problem is once the o2 entry has its mnc edited it is no longer possible to select it so when it gets deselected (change from 2g-3g & vice versa) it gets permanently de-activated.

Just wish there was a file that could be edited or replaced with one from another phone's custom rom lol

Link to comment
Share on other sites

Guest le_lutin
Nah I'm not sure for definite, but I think it just stays the same with the modified o2 apn (id131) as current=1. I think the problem is once the o2 entry has its mnc edited it is no longer possible to select it so when it gets deselected (change from 2g-3g & vice versa) it gets permanently de-activated.

Just wish there was a file that could be edited or replaced with one from another phone's custom rom lol

The next time it stops working, try to just go into the apn screen and click on the default apn so that you can see the details. Then click out without changing anything and then try mms again.

Link to comment
Share on other sites

Guest starkos

Im soo stupid lol! I think the reason yours continued to work after 2g-3g switching and mine didn't is because in apns settings (phone ui) you had the o2 uk postpay apn selected & I had the o2 uk selected

So now, by using the attached apns-conf.xml (use it to replace the original in /system/etc); resetting apns to default in phone; selecting (green dot) the apn titled o2 UK MMS; mms should work without having to use any scripts any more!

Still not sure how stable mms is though, mms reports only occasionally work (mostly stay on status:pending). How reliable are mms reports for you le_lutin?

Edit: As pointed out by snpg, for some reason the attachment service on the forum is changing - into _ ? So if you download the attached apns-conf.xml replace the _ with - :)

Edited by starkos
Link to comment
Share on other sites

B) Got it working on my phone. Can now send and receive without a problem.

A few things I did encounter though. The apns-conf.xml file that you download is actually named apns_conf.xml so you need to rename it before copying over to your phone (i.e. replace the underscore with a dash).

Once I ran the MMS script (after I copied the apns-conf.xml and reset the apns), sending an MMS did not work, so I went and checked the APN list and noticed it had added a T-Mobile one. I deleted it, made sure the O2 MMS one was still default and rebooted the phone. From this point on MMS has worked great.

Ta muchly everyone. :)

Link to comment
Share on other sites

Guest starkos
B) Got it working on my phone. Can now send and receive without a problem.

A few things I did encounter though. The apns-conf.xml file that you download is actually named apns_conf.xml so you need to rename it before copying over to your phone (i.e. replace the underscore with a dash).

Once I ran the MMS script (after I copied the apns-conf.xml and reset the apns), sending an MMS did not work, so I went and checked the APN list and noticed it had added a T-Mobile one. I deleted it, made sure the O2 MMS one was still default and rebooted the phone. From this point on MMS has worked great.

Ta muchly everyone. :)

Thanks for the heads up about the - being turned into _ when attaching it to the forum! Was just wondering which apns-conf.xml you downloaded, as the one I attached just above your post should have no T-mob apns showing and you shouldn't use any scripts with it? You just need to replace the old apns-conf.xml, then press reset to defaults in the apn settings & activiate the one called o2 UK MMS

Link to comment
Share on other sites

Thanks for the heads up about the - being turned into _ when attaching it to the forum! Was just wondering which apns-conf.xml you downloaded, as the one I attached just above your post should have no T-mob apns showing and you shouldn't use any scripts with it? You just need to replace the old apns-conf.xml, then press reset to defaults in the apn settings & activiate the one called o2 UK MMS

Didn't realise you didn't had to use the script. I'll remember that if I wipe the phone.

Link to comment
Share on other sites

Guest starkos
Didn't realise you didn't had to use the script. I'll remember that if I wipe the phone.

No worries, I was just worried I attached the wrong file as I've got loads of different versions on my laptop lol! But it was the script that made the t-mob apn show up. Well at least this will do for now, another big thanx to zuccster & le_lutin :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.