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

VERIFIED FIXED in Firefox 18

Status

()

Core
DOM: Device Interfaces
P1
critical
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: frsela, Assigned: allstars)

Tracking

unspecified
B2G C3 (12dec-1jan)
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed, firefox20 fixed)

Details

Attachments

(6 attachments, 5 obsolete attachments)

338.48 KB, text/x-log
allstars
: 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.
Created attachment 684626 [details]
Log with RIL DEBUG activated

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)
Created attachment 684627 [details]
Screenshot with the correct response in Android
Created attachment 684628 [details]
Screenshot with the bad response in Unagi
blocking-basecamp: --- → ?
(Assignee)

Comment 4

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

Updated

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

Updated

5 years ago
Blocks: 791161
(Assignee)

Comment 5

5 years ago
Created attachment 685501 [details] [diff] [review]
Part 1: Read GSM 7 bit packed string.
(Assignee)

Comment 6

5 years ago
Created attachment 685502 [details] [diff] [review]
Part 2: xpcshell tests
(Assignee)

Comment 7

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

Comment 9

5 years ago
Created attachment 688149 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding.
(Assignee)

Updated

5 years ago
Attachment #685501 - Flags: review?(vyang)
(Assignee)

Updated

5 years ago
Attachment #685502 - Flags: review?(vyang)
(Assignee)

Updated

5 years ago
Attachment #688149 - Flags: review?(vyang)
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)
(Assignee)

Comment 11

5 years ago
Created attachment 688645 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding. v2

Addressed to Vicamo's comments,
Attachment #688149 - Attachment is obsolete: true
Attachment #688645 - Flags: review?(vyang)
(Assignee)

Updated

5 years ago
Attachment #688645 - Attachment is obsolete: true
Attachment #688645 - Flags: review?(vyang)
(Assignee)

Comment 12

5 years ago
Created attachment 688680 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding. v2
(Assignee)

Comment 13

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

Comment 16

5 years ago
Created attachment 689124 [details] [diff] [review]
Part 1: Read GSM 7 bit packed string.

add r=vicamo
Attachment #685501 - Attachment is obsolete: true
(Assignee)

Comment 17

5 years ago
Created attachment 689125 [details] [diff] [review]
Part 2: xpcshell tests for Display Text. r=vicamo

add r=vicamo
Attachment #685502 - Attachment is obsolete: true
(Assignee)

Comment 18

5 years ago
Created attachment 689127 [details] [diff] [review]
Part 3: marionette test for Display Text with GSM 7 bit encoding. v2

add r=vicamo
Attachment #688680 - Attachment is obsolete: true
(Assignee)

Comment 19

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/083715f2116c
https://hg.mozilla.org/integration/mozilla-inbound/rev/0def12e6e4a7
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd845cbfc76e
https://hg.mozilla.org/mozilla-central/rev/083715f2116c
https://hg.mozilla.org/mozilla-central/rev/0def12e6e4a7
https://hg.mozilla.org/mozilla-central/rev/cd845cbfc76e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
https://hg.mozilla.org/releases/mozilla-aurora/rev/206dc6384dd5
https://hg.mozilla.org/releases/mozilla-aurora/rev/2831e3200fae
https://hg.mozilla.org/releases/mozilla-aurora/rev/0e7b801ff250

https://hg.mozilla.org/releases/mozilla-beta/rev/40d04d4c7b96
https://hg.mozilla.org/releases/mozilla-beta/rev/b40672524071
https://hg.mozilla.org/releases/mozilla-beta/rev/e5d5f35b3e82
status-firefox18: --- → fixed
status-firefox19: --- → fixed
status-firefox20: --- → fixed

Comment 22

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

Comment 23

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