Closed
Bug 910579
Opened 11 years ago
Closed 11 years ago
Proxy and port values for automatic APN are not set for Movistar Spain SIMs
Categories
(Firefox OS Graveyard :: Gaia::First Time Experience, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)
RESOLVED
FIXED
blocking-b2g | leo+ |
People
(Reporter: willyaranda, Assigned: jaoo)
Details
Attachments
(1 file)
1.21 KB,
patch
|
arcturus
:
review+
|
Details | Diff | Splinter Review |
STR: 1) Insert a Movistar (214-07) SIM card. 2) Start the FTU and check that you want data to be active 3) Finish the FTU 4) Go to Settings > Network and Data > Data configuration Actual result: Proxy and port are not set Expected: Proxy and port are set.
Reporter | ||
Comment 1•11 years ago
|
||
Problem is on: data_mobile.js: 55 var apns = apnList[mcc] ? (apnList[mcc][mnc] || []) : []; That selects the object that it's on the MCC-MNC matrix (214-07, Movistar Spain), which is the [ {"carrier":"Movistar MMS","apn":"telefonica.es","user":"telefonica","password":"telefonica","mmsc":"http://mms.movistar.com","mmsproxy":"10.138.255.5","mmsport":"8080","type":["mms"]}, {"voicemail":"123","enableStrict7BitEncodingForSms":true,"operatorSizeLimitation":512000,"type":["operatorvariant"]}, {"carrier":"Movistar","apn":"telefonica.es","user":"telefonica","password":"telefonica","proxy":"10.138.255.133","port":"8080","type":["default","supl"]} ], var selectedAPN = apns[0]; And this selects the first element of the array, which corresponds to the MMS data, not the 3G data. Settings uses a different code, checking for a filter. I think the easy way is to steal the code from there: function queryAPN(callback, usage) { if (!callback) return; var usageFilter = usage; if (!usage || usage == 'data') { usageFilter = 'default'; } // filter APNs by usage var filter = function(apnList) { var found = []; for (var i = 0; i < apnList.length; i++) { if (apnList[i].type.indexOf(usageFilter) != -1) { found.push(apnList[i]); } } return found; }; // early way out if the query has already been performed if (gCompatibleAPN) { callback(filter(gCompatibleAPN), usage); return; } // load and query APN database, then trigger callback on results loadJSON(APN_FILE, function loadAPN(apn) { var mcc = mccMncCodes.mcc; var mnc = mccMncCodes.mnc; // get a list of matching APNs gCompatibleAPN = apn[mcc] ? (apn[mcc][mnc] || []) : []; callback(filter(gCompatibleAPN), usage); }); }
Flags: needinfo?(fernando.campo)
Assignee | ||
Comment 2•11 years ago
|
||
I'll take this bug. Clearing ni? at Fernando.
Assignee: nobody → josea.olivera
Flags: needinfo?(fernando.campo)
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Guillermo López (:willyaranda) from comment #1) > Problem is on: > data_mobile.js: 55 > > var apns = apnList[mcc] ? (apnList[mcc][mnc] || []) : []; > > That selects the object that it's on the MCC-MNC matrix (214-07, Movistar > Spain), which is the [ > {"carrier":"Movistar > MMS","apn":"telefonica.es","user":"telefonica","password":"telefonica", > "mmsc":"http://mms.movistar.com","mmsproxy":"10.138.255.5","mmsport":"8080", > "type":["mms"]}, > > {"voicemail":"123","enableStrict7BitEncodingForSms":true, > "operatorSizeLimitation":512000,"type":["operatorvariant"]}, > > {"carrier":"Movistar","apn":"telefonica.es","user":"telefonica","password": > "telefonica","proxy":"10.138.255.133","port":"8080","type":["default", > "supl"]} > ], > > var selectedAPN = apns[0]; > > And this selects the first element of the array, which corresponds to the > MMS data, not the 3G data. This issue is already solved in master (see [1]), I was confused until I realized you found this on v1-train branch. [1] https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/ftu/js/data_mobile.js#L66_L72
Assignee | ||
Comment 4•11 years ago
|
||
I tried to reproduced the issue reported in comment #0 and the issue is not happening on a custom v1-train build I tested with.
Assignee | ||
Updated•11 years ago
|
Summary: Proxy and port values for automatic APN are not set → Proxy and port values for automatic APN are not set for Movistar Spain SIMs
Assignee | ||
Comment 5•11 years ago
|
||
I'm not able to reproduce the issue but IMHO we should ensure the APN settings for data calls corresponds to the default type one. This issue was fixed in Gaia master branch by bug 842252 however we cannot uplift that bug because is about changing the data call setting architecture in Gaia to the new one and v1-train branch still has the old one. I guess the best we can do is to upload a fix for v1-train branch. Let's ping the FTU app owner to see how to handle this issue. Francisco, are you ok with uploading a patch for fixing this bug in v1-train branch? Thanks.
Flags: needinfo?(francisco.jordano)
Assignee | ||
Comment 6•11 years ago
|
||
The fix I commented about in #c5 comment.
Comment 7•11 years ago
|
||
Hi, as Jose Antonio comments, doesn't make any sense to uplift bug 842252, cause adds extra functionality that won't work in v1-train. So, for me, it does make sense just to merge this patch in v1-train. Thanks a lot for the work Jose Antonio!
Flags: needinfo?(francisco.jordano)
Comment 8•11 years ago
|
||
Thanks jaoo, Francisco and Guillermo for the investigation. Nominating to leo because it is a certification blocker for one of the launch countries. Please fix it only in v1-train as you suggested.
blocking-b2g: --- → leo?
Comment 9•11 years ago
|
||
Nominate it to leo+ because it will block the upcoming certification for Spain.
blocking-b2g: leo? → leo+
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 801812 [details] [diff] [review] 910579-v1-train.patch Forgot to request review for this bug. Francisco, would you review this patch please? Thanks.
Attachment #801812 -
Flags: review?(francisco.jordano)
Comment 11•11 years ago
|
||
Comment on attachment 801812 [details] [diff] [review] 910579-v1-train.patch Review of attachment 801812 [details] [diff] [review]: ----------------------------------------------------------------- Thanks nice work, just the small and tiny comment :) ::: apps/communications/ftu/js/data_mobile.js @@ +54,5 @@ > var apnList = xhr.response; > var apns = apnList[mcc] ? (apnList[mcc][mnc] || []) : []; > + var selectedAPN = {}; > + for (var i = 0; i < apns.length; i++) { > + if (apns[i] && apns[i].type.indexOf('default') != -1) { Can we be a bit paranoid? Checking for example if |type| exist, just in case we have a malformed config file, something like: if (apns[i] && apns[i].type && apns[i].type.indexOf('default') != -1) {
Attachment #801812 -
Flags: review?(francisco.jordano) → review+
Assignee | ||
Comment 12•11 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/1c38ec5447637e8ad52b85284832376a9b84700a
Updated•11 years ago
|
status-b2g18:
--- → fixed
Comment 13•11 years ago
|
||
v1.1.0hd: 1c38ec5447637e8ad52b85284832376a9b84700a v1.1.0hd: 32e8a1b2683d9b93be8db1cb59e4409af007a5f7
You need to log in
before you can comment on or make changes to this bug.
Description
•