Closed Bug 866645 Opened 11 years ago Closed 11 years ago

B2G CDMA: Get the mcc/mnc of CDMA RUIM

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(2 files, 1 obsolete file)

Ril parse iccInfo.mcc and iccInfo.mnc when reading EF_AD, but in CDMA mode, ril does not handle EF_AD. So the mcc/mnc of iccInfo are 'undefined'. We may need to find a way to get mcc/mnc of CDMA RUIM.
Blocks: b2g-ril-cdma
MCC/MNC is from IMSI's first 5 digits (C.S0005 2.3.1), we should able to get IMSI from EF_IMSI_M.
(In reply to Patrick Wang [:kk1fff] from comment #1)
> MCC/MNC is from IMSI's first 5 digits (C.S0005 2.3.1), we should able to get
> IMSI from EF_IMSI_M.

Actually, MNC can be 2 digits or 3 digits [1]. In gsm mode, we check the 4th byte of EF_AD to decide the mnc is 2 digits or 3 digits. It seems RUIM has EF_AD as well, but I didn't see mnc information mentioned in spec. (C.S0023-D session 3.4.33)

[1] http://en.wikipedia.org/wiki/Mobile_Network_Code
AOSP has implemented a MCC table which contains all mcc and corresponding mnc length [1]. If mnc length information isn't showed in EF_AD, AOSP will use this table to get mnc length [2].

[1] https://android.googlesource.com/platform/frameworks/opt/telephony/+/master/src/java/com/android/internal/telephony/MccTable.java#319
[2] https://android.googlesource.com/platform/frameworks/opt/telephony/+/master/src/java/com/android/internal/telephony/uicc/RuimRecords.java#215
In bug 880369, we add a MCC table for the case that AD dose not contain the length of MNC in some SIM card. I think we could re-use this table for CDMA. Thanks
Depends on: 880369
Blocks: koi-ril
Assignee: nobody → echen
1). Move the code of mcc/mnc parsing into a utility function, parseMccMncFromImsi.
2). For CDMA, there is no mncLength information in EF_AD, so we needn't to read EF_AD, we could parse mcc/mnc directly right after we got IMSI.
Attachment #776152 - Flags: review?(allstars.chh)
Attachment #776156 - Flags: review?(allstars.chh)
Attachment #776152 - Flags: review?(allstars.chh) → review+
Attachment #776156 - Flags: review?(allstars.chh) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/433ebb4c854b
https://hg.mozilla.org/mozilla-central/rev/099014c88d3c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Blocks: 890330
No longer blocks: koi-ril
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: