Closed
Bug 790199
Opened 14 years ago
Closed 14 years ago
RIL: mozMobileConnection.data.shortName is empty with "Free Mobile"
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 785988
People
(Reporter: kaze, Unassigned)
Details
Attachments
(1 file)
|
623 bytes,
patch
|
Details | Diff | Splinter Review |
Latest Gecko + Gaia.
Carrier = Free Mobile w/ data plan (mcc/mnc = 208/15).
DEBUG_ALL = true in ril_consts.js
An « adb logcat | grep Operator » shows that 'shortName' is empty:
Free,,20815
Here’s an excerpt of |adb logcat -b radio|:
D/RILC ( 110): UI --- RIL_REQUEST_OPERATOR (22) ---> RIL [RID 0, token id 169, data len 0]
D/RILC ( 110): RID 0 voice srv: modem id=0, ma=Multimode(0), net_pref=GSM WCDMA preferred(0)
D/RILC ( 110): voip_supported = 0
D/RILC ( 110): Lookup NITZ info
D/RILC ( 110): whh :current plmn 2 f8 51
D/RILC ( 110): whh :manual plmn 2 f8 51
D/RILC ( 110): plmn1 mcc = 2 0 8, mnc = 1 5 15
D/RILC ( 110): plmn2 mcc = 2 0 8, mnc = 1 5 15
D/RILC ( 110): ONS from saved NITZ
D/RILC ( 110): Reply to RIL --> Current operator full name : Free
D/RILC ( 110): Reply to RIL --> Current operator short name :
D/RILC ( 110): Reply to RIL --> Current operator MCCMNC : 20815
D/RILC ( 110): UI <--- RIL_REQUEST_OPERATOR (22) Complete --- RIL [RID 0, Token 169, Success, Len 12 ]
FTR, sometimes I even get '20815' as longName.
Reproduced on several Otoro devices, with several "Free Mobile" SIM cards.
The problem does not appear when I test my SIM card with :lissyx’s Nexus S device.
The problem is, if 'shortName' is empty:
* there’s no carrier name to display in Gaia;
* mozMobileConnection.data.mcc and .mnc are '0', because that's how it works with _processOperator() in ril_worker.js:
if (this.operator.longName !== longName ||
this.operator.shortName !== shortName ||
thisTuple !== networkTuple) {
this.operator.longName = longName;
this.operator.shortName = shortName;
this.operator.mcc = 0;
this.operator.mnc = 0;
With the dirty patch (attached) most symptoms are “fixed” in Gaia: the carrier name is properly displayed, and mcc/mnc have non-null values. Of course, this is nowhere near a proper fix.
| Reporter | ||
Comment 1•14 years ago
|
||
FWIW, the 'shortName' is properly retrieved on an HTC Desire Z (Android 2.3 GB).
D/RILJ ( 1455): [0072]< OPERATOR {Free, Free, 20815, 0}
| Reporter | ||
Comment 2•14 years ago
|
||
Note: without a fix, it’s almost impossible to debug the 3G/Data connection on my device — at least with my current operator.
Comment 3•14 years ago
|
||
If it can help, I found the Android part that seems to handle his:
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java, in handlePollStateResultMessage(). Code is available as a git clone from https://android.googlesource.com/platform/frameworks/opt/telephony
Comment 4•14 years ago
|
||
Maybe also having a look at src/java/com/android/internal/telephony/OperatorInfo.java and the "public static final Creator<OperatorInfo> CREATOR" variable.
Comment 5•14 years ago
|
||
(In reply to Fabien Cazenave (:kaze) from comment #0)
> An « adb logcat | grep Operator » shows that 'shortName' is empty:
>
> Free,,20815
That's something the operator (most likely) is responsible for, not us.
> FTR, sometimes I even get '20815' as longName.
That's worrying. This may or may not be a separate bug. Let's keep this in mind and file a separate bug when appropriate.
> The problem is, if 'shortName' is empty:
> * there’s no carrier name to display in Gaia;
IMHO Gaia should do the "non-fix" that you attached here:
var carrierName = shortName || longName;
> * mozMobileConnection.data.mcc and .mnc are '0', because that's how it
> works with _processOperator() in ril_worker.js:
>
> if (this.operator.longName !== longName ||
> this.operator.shortName !== shortName ||
> thisTuple !== networkTuple) {
>
> this.operator.longName = longName;
> this.operator.shortName = shortName;
> this.operator.mcc = 0;
> this.operator.mnc = 0;
I'm probably missing something, but I fail to see how this code prevents us from setting mcc and mnc correctly, since further down [1] we end up processing the network tuple for mcc and mnc. Can you provide more debugging info?
[1] https://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js#2679
Comment 6•14 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #5)
> > * mozMobileConnection.data.mcc and .mnc are '0', because that's how it
> > works with _processOperator() in ril_worker.js:
> >
> > if (this.operator.longName !== longName ||
> > this.operator.shortName !== shortName ||
> > thisTuple !== networkTuple) {
> >
> > this.operator.longName = longName;
> > this.operator.shortName = shortName;
> > this.operator.mcc = 0;
> > this.operator.mnc = 0;
>
> I'm probably missing something, but I fail to see how this code prevents us
> from setting mcc and mnc correctly, since further down [1] we end up
> processing the network tuple for mcc and mnc. Can you provide more debugging
> info?
Oh yes, I think I know what I was missing: bug 785988 just landed. It should fix that particular problem for you.
Comment 7•14 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #5)
> (In reply to Fabien Cazenave (:kaze) from comment #0)
> > FTR, sometimes I even get '20815' as longName.
>
> That's worrying. This may or may not be a separate bug. Let's keep this in
> mind and file a separate bug when appropriate.
I didn't see this happening, but if it does, though I think it can't be considering the underlying AT command/Parcel parsing logic, please file another bug for it :)
> > The problem is, if 'shortName' is empty:
> > * there’s no carrier name to display in Gaia;
>
> IMHO Gaia should do the "non-fix" that you attached here:
>
> var carrierName = shortName || longName;
Already done in Gaia: https://github.com/mozilla-b2g/gaia/commit/33a9529f
However, there are still several places, cost control service and statusbar, do not handle empty short names well. Anyway, I think that's beyond Gecko's reach and I'll mark this as duplicate.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Comment 8•14 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #7)
> (In reply to Philipp von Weitershausen [:philikon] from comment #5)
> > IMHO Gaia should do the "non-fix" that you attached here:
> >
> > var carrierName = shortName || longName;
>
> Already done in Gaia: https://github.com/mozilla-b2g/gaia/commit/33a9529f
> However, there are still several places, cost control service and statusbar,
> do not handle empty short names well.
Gaia issue opened for above problems: https://github.com/mozilla-b2g/gaia/issues/4599
Comment 9•14 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #5)
> (In reply to Fabien Cazenave (:kaze) from comment #0)
> > An « adb logcat | grep Operator » shows that 'shortName' is empty:
> >
> > Free,,20815
>
> That's something the operator (most likely) is responsible for, not us.
>
As far as I remember of the experiments we did with Kazé, and as stated in comment #1, with his SIM in my HTC Desire Z,on the same network, the RIL returned the correct shortName.
| Reporter | ||
Comment 10•14 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #9)
> As far as I remember of the experiments we did with Kazé, and as stated in
> comment #1, with his SIM in my HTC Desire Z,on the same network, the RIL
> returned the correct shortName.
I confirm.
Comment 11•14 years ago
|
||
(In reply to Fabien Cazenave (:kaze) from comment #10)
> (In reply to Alexandre LISSY :gerard-majax from comment #9)
> > As far as I remember of the experiments we did with Kazé, and as stated in
> > comment #1, with his SIM in my HTC Desire Z,on the same network, the RIL
> > returned the correct shortName.
>
> I confirm.
The Android rild parses the response of AT command COPS and separates it into three strings, long name, short name and mcc/mnc. The three strings are then passed to Gecko directly. As a result, if rild doesn't have correct info, neither does Gecko. There is probably a bug in rild or modem firmware of the device under test.
| Reporter | ||
Comment 12•14 years ago
|
||
Vicamo: of course bug 785988 will reduce the symptoms of the empty 'shortName' property, but I don’t think it’s a duplicate.
I tested my SIM card in other Android devices, and I could check with ADB that 'shortName' was properly set.
| Reporter | ||
Comment 13•14 years ago
|
||
Ooops, I didn’t see your last comment before posting mine.
Yes, it looks like a rild bug rather than a Gecko one. Should we open another bug?
You need to log in
before you can comment on or make changes to this bug.
Description
•