Closed
Bug 976491
Opened 11 years ago
Closed 11 years ago
B2G RIL: ril_worker throws exception when run readICCID for some CMCC cards.
Categories
(Firefox OS Graveyard :: RIL, defect)
Firefox OS Graveyard
RIL
Tracking
(blocking-b2g:1.3T+, b2g-v1.3T fixed)
Tracking | Status | |
---|---|---|
b2g-v1.3T | --- | fixed |
People
(Reporter: sam.hua, Assigned: sku)
References
Details
Attachments
(3 files, 8 obsolete files)
(deleted),
patch
|
sku
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sku
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sku
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22
Steps to reproduce:
1. Insert CMCC card
2. Power on
Actual results:
1. Can't find the SIM card
Expected results:
Should detect the SIM card
the kind of CMCC card
I/Gecko ( 106): RIL Worker: New incoming parcel of size 68
I/Gecko ( 106): RIL Worker: Parcel (size 68): 0,0,0,0,22,0,0,0,0,0,0,0,144,0,0,0,0,0,0,0,20,0,0,0,57,0,56,0,54,0,56,0,48,0,48,0,50,0,69,0,57,0,48,0,57,0,48,0,57,0,70,0,48,0,48,0,49,0,53,0,49,0,57,0,0,0,0,0
I/Gecko ( 106): RIL Worker: We have at least one complete parcel.
I/Gecko ( 106): RIL Worker: [0] Solicited response for request type 28, token 22, error 0
I/Gecko ( 106): RIL Worker: [0] Handling parcel as REQUEST_SIM_IO
I/Gecko ( 106): RIL Worker: Parcel handling threw RangeError
I/Gecko ( 106): semiOctetToBcdChar@resource://gre/modules/ril_worker.js:6599
I/Gecko ( 106): readSwappedNibbleBcdString@resource://gre/modules/ril_worker.js:6651
I/Gecko ( 106): callback@resource://gre/modules/ril_worker.js:11743
I/Gecko ( 106): processICCIOReadBinary@resource://gre/modules/ril_worker.js:11660
I/Gecko ( 106): ICC_COMMAND_READ_BINARY@resource://gre/modules/ril_worker.js:11695
I/Gecko ( 106): processICCIO@resource://gre/modules/ril_worker.js:11533
I/Gecko ( 106): REQUEST_SIM_IO@resource://gre/modules/ril_worker.js:5394
I/Gecko ( 106): handleParcel@resource://gre/modules/ril_worker.js:5033
I/Gecko ( 106): processParcel@resource://gre/modules/ril_worker.js:156
I/Gecko ( 106): processIncoming@blob:2f214987-5604-40cf-9dea-542f48b5fd96:536
I/Gecko ( 106): handleRilMessage@resource://gre/modules/ril_worker.js:14268
I/Gecko ( 106): onRILMessage@resource://gre/modules/ril_worker.js:14314
blocking-b2g: --- → 1.3T?
Assignee | ||
Comment 2•11 years ago
|
||
Hi Sam:
The valid BCD is defined in Table 10.5.118/3GPP TS 24.008.
Which are 0,1,2,3,4,5,6,7,8,9,*,#,a,b,c.
However, we can see "E" and "F" appear in iccid content. (ie: 9868002E90909F001519)
This does not fit to 3GPP spec.
The iccid should be 898600E209090F005191.
Please check your reference phone to see what is expected result to be displayed for ICCID.
D/RILC ( 100): [w] [0012]> SIM_IO (cmd=0xC0,efid=0x2FE2,path=3f00,0,0,15,(null),pin2=(null),aid=(null))
D/RILC ( 100): [w] [0012]< SIM_IO {sw1=0x90,sw2=0x0,0000000A2FE2040004FF4401020000}
D/AT ( 100): [w] Channel1: AT> AT+CRSM=176,12258,0,0,10,0,"3f00"
D/AT ( 100): [w] Channel1: AT< +CRSM: 144,0,9868002E90909F001519
I/Gecko ( 106): semiOctetToBcdChar@resource://gre/modules/ril_worker.js:6599
Flags: needinfo?(sam.hua)
OK
1. Hamachi also failed to find the SIM card
2. Our sprd android could find it. but in the log
D/GSM ( 604): iccid: 898600
Android stops when meet the invalid code and treat it as the short valid string
Flags: needinfo?(sam.hua)
Assignee | ||
Comment 4•11 years ago
|
||
It's an issue,
ICCID is defined as 10 byte-long identification, which will(must) have 20 chars after converting.
(See TS 102 221 clause 13.2 EFICCID)
Since this is a mandatory EF, I am not sure what will be happened if we truncate the ID if we got invlid char.
Assignee | ||
Comment 5•11 years ago
|
||
This is not a formal soltuion, but juts workaround.
It's not proper for Mozilla to pahse in such worksround due to SIM card issue
because this will not only affect ICCIC, but also smsc/call number/address etc.
Thanks!!
Shawn
Assignee | ||
Comment 6•11 years ago
|
||
[Correct typo....:(]
This is not a formal solution, but juts workaround.
It's not proper for Mozilla to phase in such workaround due to SIM card issue
because this will not only affect ICCIC, but also SMSC/call number/address etc.
Thanks!!
Shawn
I think moz should fix this issue.
There are different kinds of SIM cards,we should make them work even if they have error ICC ID.
Comment 8•11 years ago
|
||
I think we should have a better error handler for this case.
Comment 9•11 years ago
|
||
Hi! Shawn,
Since you are on this case already.
Assign this to you. Thanks
--
Keven
Assignee: nobody → sku
Reporter | ||
Comment 10•11 years ago
|
||
And in Tarako,
I/Gecko ( 81): RIL Worker: [1] Solicited response for request type 28, token 27, error 0
I/Gecko ( 81): RIL Worker: [1] Handling parcel as REQUEST_SIM_IO
I/Gecko ( 81): RIL Worker: [1] SPN: spn = , spnDisplayCondition = 0
I/Gecko ( 81): RIL Worker: Parcel handling threw TypeError: RIL.operator is null
I/Gecko ( 81): updateDisplayCondition@resource://gre/modules/ril_worker.js:13351
I/Gecko ( 81): callback@resource://gre/modules/ril_worker.js:12379
I/Gecko ( 81): processICCIOReadBinary@resource://gre/modules/ril_worker.js:11670
I/Gecko ( 81): ICC_COMMAND_READ_BINARY@resource://gre/modules/ril_worker.js:11705
I/Gecko ( 81): processICCIO@resource://gre/modules/ril_worker.js:11543
I/Gecko ( 81): REQUEST_SIM_IO@resource://gre/modules/ril_worker.js:5399
I/Gecko ( 81): handleParcel@resource://gre/modules/ril_worker.js:5038
I/Gecko ( 81): processParcel@resource://gre/modules/ril_worker.js:156
I/Gecko ( 81): processIncoming@blob:653f49a9-d8c8-47d4-8912-0ed25c11db56:536
I/Gecko ( 81): handleRilMessage@resource://gre/modules/ril_worker.js:14278
I/Gecko ( 81): onRILMessage@resource://gre/modules/ril_worker.js:14324
Reporter | ||
Comment 11•11 years ago
|
||
And in Tarako,
I/Gecko ( 81): RIL Worker: [1] Solicited response for request type 28, token 27, error 0
I/Gecko ( 81): RIL Worker: [1] Handling parcel as REQUEST_SIM_IO
I/Gecko ( 81): RIL Worker: [1] SPN: spn = , spnDisplayCondition = 0
I/Gecko ( 81): RIL Worker: Parcel handling threw TypeError: RIL.operator is null
I/Gecko ( 81): updateDisplayCondition@resource://gre/modules/ril_worker.js:13351
I/Gecko ( 81): callback@resource://gre/modules/ril_worker.js:12379
I/Gecko ( 81): processICCIOReadBinary@resource://gre/modules/ril_worker.js:11670
I/Gecko ( 81): ICC_COMMAND_READ_BINARY@resource://gre/modules/ril_worker.js:11705
I/Gecko ( 81): processICCIO@resource://gre/modules/ril_worker.js:11543
I/Gecko ( 81): REQUEST_SIM_IO@resource://gre/modules/ril_worker.js:5399
I/Gecko ( 81): handleParcel@resource://gre/modules/ril_worker.js:5038
I/Gecko ( 81): processParcel@resource://gre/modules/ril_worker.js:156
I/Gecko ( 81): processIncoming@blob:653f49a9-d8c8-47d4-8912-0ed25c11db56:536
I/Gecko ( 81): handleRilMessage@resource://gre/modules/ril_worker.js:14278
I/Gecko ( 81): onRILMessage@resource://gre/modules/ril_worker.js:14324
Reporter | ||
Comment 12•11 years ago
|
||
It is a USIM card
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to sam.hua from comment #11)
> And in Tarako,
>
> I/Gecko ( 81): RIL Worker: [1] Solicited response for request type 28,
> token 27, error 0
> I/Gecko ( 81): RIL Worker: [1] Handling parcel as REQUEST_SIM_IO
> I/Gecko ( 81): RIL Worker: [1] SPN: spn = , spnDisplayCondition = 0
> I/Gecko ( 81): RIL Worker: Parcel handling threw TypeError: RIL.operator
> is null
> I/Gecko ( 81):
> updateDisplayCondition@resource://gre/modules/ril_worker.js:13351
> I/Gecko ( 81): callback@resource://gre/modules/ril_worker.js:12379
> I/Gecko ( 81):
> processICCIOReadBinary@resource://gre/modules/ril_worker.js:11670
> I/Gecko ( 81):
> ICC_COMMAND_READ_BINARY@resource://gre/modules/ril_worker.js:11705
> I/Gecko ( 81): processICCIO@resource://gre/modules/ril_worker.js:11543
> I/Gecko ( 81): REQUEST_SIM_IO@resource://gre/modules/ril_worker.js:5399
> I/Gecko ( 81): handleParcel@resource://gre/modules/ril_worker.js:5038
> I/Gecko ( 81): processParcel@resource://gre/modules/ril_worker.js:156
> I/Gecko ( 81):
> processIncoming@blob:653f49a9-d8c8-47d4-8912-0ed25c11db56:536
> I/Gecko ( 81):
> handleRilMessage@resource://gre/modules/ril_worker.js:14278
> I/Gecko ( 81): onRILMessage@resource://gre/modules/ril_worker.js:14324
Please see Bug 944635 for above exception message.
Bug 976491 should be focused on ICCID only.
Thanks!!
Assignee | ||
Comment 15•11 years ago
|
||
Attachment #8381880 -
Attachment is obsolete: true
Assignee | ||
Comment 16•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8385249 -
Flags: review?(allstars.chh)
Assignee | ||
Updated•11 years ago
|
Attachment #8385250 -
Flags: review?(allstars.chh)
Comment on attachment 8385249 [details] [diff] [review]
Bug 976491 Part 1 : ril patch - [fugu]It throws exception when run readICCID for some CMCC cards.
Review of attachment 8385249 [details] [diff] [review]:
-----------------------------------------------------------------
I think the function readSwappedNibbleBcdString is doing the right thing here.
If we need to catch some exception, it should be done in the caller side,
like
readICCID: function () {
try {
RIL.iccInfo.iccid =
this.context.GsmPDUHelper.readSwappedNibbleBcdString(octetLen);
} catch (e) {
...
}
},
Attachment #8385249 -
Flags: review?(allstars.chh)
Assignee | ||
Comment 18•11 years ago
|
||
(In reply to Yoshi Huang[:allstars.chh] from comment #17)
> Comment on attachment 8385249 [details] [diff] [review]
> Bug 976491 Part 1 : ril patch - [fugu]It throws exception when run readICCID
> for some CMCC cards.
>
> Review of attachment 8385249 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I think the function readSwappedNibbleBcdString is doing the right thing
> here.
>
> If we need to catch some exception, it should be done in the caller side,
> like
>
> readICCID: function () {
>
> try {
> RIL.iccInfo.iccid =
> this.context.GsmPDUHelper.readSwappedNibbleBcdString(octetLen);
> } catch (e) {
> ...
> }
>
> },
Thanks for your comment, Yoshi.
1.
If we did the catch thing as you said above, we still got no sim on UI.
the reason is there will be no assignment on RIL.iccInfo.iccid due to exception.
2.
The original patch is to do the error handling inside readSwappedNibbleBcdString.
it will stop parsing rest of buffer when we hit error. and return parsed string to the caller.
IMHO, it is more generic to ICCID/SMSC/redialing address etc...
Please share with me your thoughts if any.
// Log for catching inside readICCID.
03-05 03:50:37.326 38 99 D AT : AT< +CRSM: 144,0,9868002e90909f001519
03-05 03:50:37.656 45 111 I Gecko : RIL Worker: Error reading ICCID: RangeError
03-05 03:50:37.656 45 111 I Gecko : RIL Worker: [0] ICCID: undefined
Assignee | ||
Comment 19•11 years ago
|
||
(In reply to shawn ku [:sku] from comment #18)
> (In reply to Yoshi Huang[:allstars.chh] from comment #17)
> > Comment on attachment 8385249 [details] [diff] [review]
> > Bug 976491 Part 1 : ril patch - [fugu]It throws exception when run readICCID
> > for some CMCC cards.
> >
> > Review of attachment 8385249 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > I think the function readSwappedNibbleBcdString is doing the right thing
> > here.
> >
> > If we need to catch some exception, it should be done in the caller side,
> > like
> >
> > readICCID: function () {
> >
> > try {
> > RIL.iccInfo.iccid =
> > this.context.GsmPDUHelper.readSwappedNibbleBcdString(octetLen);
> > } catch (e) {
> > ...
> > }
> >
> > },
> Thanks for your comment, Yoshi.
>
> 1.
> If we did the catch thing as you said above, we still got no sim on UI.
> the reason is there will be no assignment on RIL.iccInfo.iccid due to
> exception.
>
> 2.
> The original patch is to do the error handling inside
> readSwappedNibbleBcdString.
> it will stop parsing rest of buffer when we hit error. and return parsed
> string to the caller.
> IMHO, it is more generic to ICCID/SMSC/redialing address etc...
>
>
> Please share with me your thoughts if any.
>
>
> // Log for catching inside readICCID.
> 03-05 03:50:37.326 38 99 D AT : AT< +CRSM:
> 144,0,9868002e90909f001519
> 03-05 03:50:37.656 45 111 I Gecko : RIL Worker: Error reading ICCID:
> RangeError
> 03-05 03:50:37.656 45 111 I Gecko : RIL Worker: [0] ICCID: undefined
BTW, gaia use iccid to determine isAbsent or not.
/**
* Indicate the slot has SIM card or not.
* @return {Boolean} Without SIM card or not.
*/
SIMSlot.prototype.isAbsent = function ss_isAbsent() {
return (!this.simCard || this.simCard &&
this.simCard.iccInfo && this.simCard.iccInfo.iccid === null);
};
Comment 20•11 years ago
|
||
Hi, what's that /correct/ answer here when we got such a strange case? What exactly should that read ICCID be?
Assignee | ||
Comment 21•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #20)
> Hi, what's that /correct/ answer here when we got such a strange case? What
> exactly should that read ICCID be?
Hi Vicamo:
By fugu AOSP case, it return "898600" after parsing "9868002E90909F001519"
Since this is a error handling case, I think there might be no correct answer for it.
Proposal 1:
Follow what fugu AOSP did, just return the string before invalid BCD char.
Proposal 2:
Fake the iccid with "0000000000000000000" + clientID if we hit exception case during parsing ICCID.
What's your opinion/suggestion?
Thanks!!
Shawn
Assignee | ||
Updated•11 years ago
|
Summary: [fugu]It throws exception when run readICCID for some CMCC cards → B2g RIL: ril_worker throws exception when run readICCID for some CMCC cards.
Assignee | ||
Updated•11 years ago
|
Summary: B2g RIL: ril_worker throws exception when run readICCID for some CMCC cards. → B2G RIL: ril_worker throws exception when run readICCID for some CMCC cards.
Assignee | ||
Comment 22•11 years ago
|
||
Attachment #8385249 -
Attachment is obsolete: true
Assignee | ||
Comment 23•11 years ago
|
||
Attachment #8385250 -
Attachment is obsolete: true
Attachment #8385957 -
Attachment is obsolete: true
Attachment #8385250 -
Flags: review?(allstars.chh)
Assignee | ||
Comment 24•11 years ago
|
||
Assignee | ||
Comment 25•11 years ago
|
||
Attachment #8385958 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8385959 -
Flags: review?(allstars.chh)
Assignee | ||
Updated•11 years ago
|
Attachment #8385962 -
Flags: review?(allstars.chh)
Attachment #8385962 -
Flags: review?(allstars.chh) → review+
Attachment #8385959 -
Flags: review?(allstars.chh) → review+
Assignee | ||
Comment 26•11 years ago
|
||
Attachment #8381253 -
Attachment is obsolete: true
Attachment #8385959 -
Attachment is obsolete: true
Attachment #8385962 -
Attachment is obsolete: true
Attachment #8386504 -
Flags: review+
Assignee | ||
Comment 27•11 years ago
|
||
Attachment #8386505 -
Flags: review+
Assignee | ||
Comment 28•11 years ago
|
||
Attachment #8386507 -
Flags: review+
Assignee | ||
Comment 29•11 years ago
|
||
Try on master - https://tbpl.mozilla.org/?tree=Try&rev=56bd9abcf3ce
Try on 1.3t - https://tbpl.mozilla.org/?tree=Try&rev=5bf84711aa7d
Both are green.
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 30•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/6ee45d05f8e5
https://hg.mozilla.org/integration/b2g-inbound/rev/d10047c67052
Flags: in-testsuite+
Keywords: checkin-needed
Comment 31•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6ee45d05f8e5
https://hg.mozilla.org/mozilla-central/rev/d10047c67052
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S3 (14mar)
Comment 32•11 years ago
|
||
status-b2g-v1.3T:
--- → fixed
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•