B2G CDMA: Get the mcc/mnc of CDMA RUIM

RESOLVED FIXED in mozilla25

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

Trunk
mozilla25
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

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.
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+
https://hg.mozilla.org/mozilla-central/rev/433ebb4c854b
https://hg.mozilla.org/mozilla-central/rev/099014c88d3c
Status: NEW → RESOLVED
Closed: 6 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.