B2G CDMA: Get the mcc/mnc of CDMA RUIM

RESOLVED FIXED in mozilla25

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

(Blocks: 1 bug)

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)

(Assignee)

Description

5 years ago
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.
(Assignee)

Updated

5 years ago
Blocks: 726098
MCC/MNC is from IMSI's first 5 digits (C.S0005 2.3.1), we should able to get IMSI from EF_IMSI_M.
(Assignee)

Comment 2

5 years ago
(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
(Assignee)

Comment 3

5 years ago
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
(Assignee)

Comment 4

5 years ago
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

Updated

5 years ago
Blocks: 890316

Updated

5 years ago
Assignee: nobody → echen
(Assignee)

Comment 5

5 years ago
Created attachment 776152 [details] [diff] [review]
Part 1: Get the mcc/mnc of CDMA RUIM, v1

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.
(Assignee)

Comment 6

5 years ago
Created attachment 776153 [details] [diff] [review]
Part 2: Xpcshell tests for the utility function of mcc/mnc parsing, v1
(Assignee)

Comment 7

5 years ago
Created attachment 776156 [details] [diff] [review]
Part 2: Xpcshell tests for the utility function of mcc/mnc parsing, v2
Attachment #776153 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Attachment #776152 - Flags: review?(allstars.chh)
(Assignee)

Updated

5 years ago
Attachment #776156 - Flags: review?(allstars.chh)
Attachment #776152 - Flags: review?(allstars.chh) → review+
Attachment #776156 - Flags: review?(allstars.chh) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/433ebb4c854b
https://hg.mozilla.org/mozilla-central/rev/099014c88d3c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25

Updated

5 years ago
Blocks: 890330
No longer blocks: 890316
You need to log in before you can comment on or make changes to this bug.