Closed Bug 814618 Opened 8 years ago Closed 8 years ago

B2G STK: STK DisplayText Command not working properly with coding scheme is GSM 7 bit packed.

Categories

(Core :: DOM: Device Interfaces, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

()

VERIFIED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: frsela, Assigned: allstars.chh)

References

Details

Attachments

(6 files, 5 obsolete files)

338.48 KB, text/x-log
allstars.chh
: feedback+
Details
22.31 KB, image/png
Details
78.78 KB, image/png
Details
1.02 KB, patch
Details | Diff | Splinter Review
1.86 KB, patch
Details | Diff | Splinter Review
3.89 KB, patch
Details | Diff | Splinter Review
Tuenti has a STK USSD command to query the balance.

Since in Android is working properly, in B2G is not recovering it well.
Log calling the STK USSD command to query balance.

At 11-23 10:18:18.789 the STK app had been opened
At 11-23 10:18:30.999 the STK command balance query had been selected
At 11-23 10:18:32.879 received the bad response "Sald" instead "Saldo 2.28 E. Validex 20/05/13."
Attachment #684626 - Flags: feedback?(allstars.chh)
blocking-basecamp: --- → ?
Comment on attachment 684626 [details]
Log with RIL DEBUG activated

yeah, thanks for reporting this.
I'll fix it.
Attachment #684626 - Flags: feedback?(allstars.chh) → feedback+
Assignee: nobody → allstars.chh
Summary: STK USSD Command not working properly with Tuenti virtual carrier → STK DisplayText Command not working properly with coding scheme is GSM 7 bit packed.
somehow I got compile error when I am trying to build emulator, will upload marionee tests later.
blocking-basecamp: ? → +
Setting priority based on triage discussions.  Feel free to decrease priority if you disagree.
Priority: -- → P1
Attachment #685501 - Flags: review?(vyang) → review+
Attachment #685502 - Flags: review?(vyang) → review+
Comment on attachment 688149 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding.

Review of attachment 688149 [details] [diff] [review]:
-----------------------------------------------------------------

Finally, first Marionette based STK test case :)
The pendingEmulatorCmdCount thing has to be corrected.

::: dom/icc/tests/marionette/test_stk_proactive_command.js
@@ +8,5 @@
> +let icc = navigator.mozMobileConnection.icc;
> +
> +function verify() {
> +  ok(icc);
> +  ok(icc instanceof MozIccManager, "icc is instanceof " + icc.constructor);

You don't have to check ok(icc) because the next line is enough. Then, you don't need verify() function here because it will have only one check inside. You can simply do:

  let icc = navigator.mozMobileConnection.icc;
  ok(icc instanceof MozIccManager, "icc is instanceof " + icc.constructor);

@@ +21,5 @@
> +  runNextTest();
> +}
> +
> +let tests = [
> +  {command: "d0288103012180820281020d1d00d3309bfc06c95c301aa8e80259c3ec34b9ac07c9602f58ed159bb940",

I guess nobody but you can ever understand this string.

@@ +33,5 @@
> +    return;
> +  }
> +
> +  let cmd = "stk pdu " + test.command;
> +  runEmulatorCmd(cmd, function (result) {

Please have something like:

  let pendingEmulatorCmdCount = 0;
  function sendStkPduToEmulator(pdu) {
    ++pendingEmulatorCmdCount;

    let cmd = "stk pdu " + pdu;
    runEmulatorCmd(cmd, function (result) {
      --pendingEmulatorCmdCount;
    });
  }

  function cleanUp() {
    if (pendingEmulatorCmdCount) {
      window.setTimeout(cleanUp, 100);
      return;
    }

    // Real clean ups
  }

Or it will have problems when multiple emulator commands were sent.
Attachment #688149 - Flags: review?(vyang)
Addressed to Vicamo's comments,
Attachment #688149 - Attachment is obsolete: true
Attachment #688645 - Flags: review?(vyang)
Attachment #688645 - Attachment is obsolete: true
Attachment #688645 - Flags: review?(vyang)
Comment on attachment 688680 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding. v2

Addressed to Vicamo's comments.
Attachment #688680 - Flags: review?(vyang)
Comment on attachment 688680 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding. v2

Review of attachment 688680 [details] [diff] [review]:
-----------------------------------------------------------------

Don't forget r=me before commit :)
Attachment #688680 - Flags: review?(vyang) → review+
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Hardware: x86 → ARM
Summary: STK DisplayText Command not working properly with coding scheme is GSM 7 bit packed. → B2G STK: STK DisplayText Command not working properly with coding scheme is GSM 7 bit packed.
Mass Modify: All un-milestoned, unresolved blocking-basecamp+ bugs are being moved into the C3 milestone. Note that the target milestone does not mean that these bugs can't be resolved prior to 12/10, rather C2 bugs should be prioritized ahead of C3 bugs.
Target Milestone: --- → B2G C3 (12dec-1jan)
add r=vicamo
Attachment #685501 - Attachment is obsolete: true
Tested with the build

Gecko-cb6ee76.Gaia-16006ea and works fine. I'm able to check the balance with the Tuenti SIM card
Status: RESOLVED → VERIFIED
Try run for de3acda765ca is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=de3acda765ca
Results (out of 313 total builds):
    exception: 1
    success: 284
    warnings: 26
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/yhuang@mozilla.com-de3acda765ca
You need to log in before you can comment on or make changes to this bug.