Closed Bug 800261 Opened 12 years ago Closed 12 years ago

B2G STKUI: Support STK_CMD_PLAY_TONE

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P1)

x86
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
B2G C2 (20nov-10dec)
blocking-basecamp +

People

(Reporter: frsela, Assigned: frsela)

References

()

Details

Attachments

(3 files, 5 obsolete files)

As implemented Bug 793137, we need to support "Play Tone".

This is needed for remote SIM activation.
blocking-basecamp: --- → ?
Depends on: 793137
Summary: B2G STK UI: Support STK_CMD_PLAY_TONE → B2G STKUI: Support STK_CMD_PLAY_TONE
blocking-basecamp+ based upon the blocking status of bug 793137. CC dietrich and clee so that they're aware of the lingering feature.
blocking-basecamp: ? → +
Priority: -- → P1
From a design angle... Do we need anything for this? Assets?
(In reply to Patryk Adamczyk [:patryk] UX from comment #2)
> From a design angle... Do we need anything for this? Assets?

We are using building blocks but some minor tweaks for the whole SKT implementation. @rafaelrebolleda was working on it.
Assignee: nobody → frsela
This version only includes ONE tone (default one). Who can provide more tones? UX?
Attachment #671456 - Flags: feedback?(21)
(In reply to Fernando R. Sela from comment #4)
> Created attachment 671456 [details] [diff] [review]
> Patch to support PLAY TONE commands
> 
> This version only includes ONE tone (default one). Who can provide more
> tones? UX?

Can you send me a requirements spec? What exactly is needed, how many tones, what are they used for?
(In reply to Patryk Adamczyk [:patryk] UX from comment #5)
> Can you send me a requirements spec? What exactly is needed, how many tones,
> what are they used for?

Hi, Patryk

The spec is from 3GPP TS 11.14, clause 12.16 Tone

I list the values below.
'01' Dial tone
'02' Called subscriber busy
'03' Congestion
'04' Radio path acknowledge
'05' Radio path not available / Call dropped
'06' Error / Special information
'07' Call waiting tone
'08' Ringing tone
'10' General beep
'11' Positive acknowledgement tone
'12' Negative acknowledgement or error tone


Also Android has a class called ToneGenerator will generate these tones.

http://developer.android.com/reference/android/media/ToneGenerator.html
Can we inherit these tones from Android instead of using Patryk for this? This seems low priority.
The Android ToneGenerator is for generate DTMF tones ... we can use the MozTelephony tone methods:

https://developer.mozilla.org/en-US/docs/DOM/Telephony.startTone
https://developer.mozilla.org/en-US/docs/DOM/Telephony.stopTone

So next step is: which tone to use for each of the 3GPP tones? ... :)
Yes, I'd mirror Andreas' response and mirror the tones from Android if we can.
Fernando, how are things going here?
Flags: needinfo?(frsela)
(In reply to Andrew Overholt [:overholt] from comment #10)
> Fernando, how are things going here?

Hi,

As I told on comment #8, I can use tones generated by the mozTelephony API or ogg files (as the current patch is using)

So the patch is only waiting for the final tones :p

In the http://developer.android.com/reference/android/media/ToneGenerator.html we've the frequencies and times per each tone so it's easy to generate it but my question is: Which tone we should use for each of the STK tone required? :

'01' Dial tone
'02' Called subscriber busy
'03' Congestion
'04' Radio path acknowledge
'05' Radio path not available / Call dropped
'06' Error / Special information
'07' Call waiting tone
'08' Ringing tone
'10' General beep
'11' Positive acknowledgement tone
'12' Negative acknowledgement or error tone
Flags: needinfo?(frsela)
Assignee: frsela → padamczyk
Attached file DTMF Tones (obsolete) —
(In reply to Patryk Adamczyk [:patryk] UX from comment #12)
> Created attachment 677739 [details]
> DTMF Tones

Cool, Thank you Patryk.

These tones are the DTMF ones, but we also need others to represent this events:

 * Dial tone
 * Called subscriber busy
 * Congestion
 * Radio path acknowledge
 * Radio path not available / Call dropped
 * Error / Special information
 * Call waiting tone
 * Ringing tone
 * General beep
 * Positive acknowledgement tone
 * Negative acknowledgement or error tone

Is it possible to also cover these events? Thanks in advance. Feel free to use the tones you prefer.

In order to help: Here are the Android ones: (http://developer.android.com/reference/android/media/ToneGenerator.html)

For example:

TONE_SUP_DIAL 	Call supervisory tone, Dial tone: CEPT: 425Hz, continuous ANSI (IS-95): 350Hz+440Hz, continuous JAPAN: 400Hz, continuous
Patryk, whats the ETA for these?
Attached file DTMF Tones
Attachment #677739 - Attachment is obsolete: true
Attached file Signal Tones (obsolete) —
I attached the final DTMF tones and the signal tones (still need to get those optimized for OGG format), let me know if it all works we you expected.
Assignee: padamczyk → frsela
Comment on attachment 671456 [details] [diff] [review]
Patch to support PLAY TONE commands

>+    if (options.text) {
>+      alert(options.text);
>+    }

Please drop the alert() call.
Attachment #671456 - Flags: feedback?(kaze) → feedback+
Attached file Optimized Signal Tones
Attachment #679273 - Attachment is obsolete: true
Attachment #671456 - Attachment is obsolete: true
Component: Gaia → Gaia::Settings
Milestoning for C2 (deadline of 12/10), as this meets the criteria of "remaining P1 bugs not already milestoned for C1".
Target Milestone: --- → B2G C2 (20nov-10dec)
It would be much easier to test and review with a pull request…

>+     case icc.STK_TONE_TYPE_NEGATIVE_ACK_TONE:
>+       selectedPhoneSound = 'tones/300Hz+400Hz+500Hz_400ms_16bit_48kHz_-1dBFS_mono.ogg';
>+       break;

* using shorter file names would be nice;
* please use a `resources/dtmf_tones' directory for that (see `resources/ringtones')
Fernando, please link to a github pull request so I can r+ it. Thanks!
Moved tone files to resources folder
Attachment #680036 - Attachment is obsolete: true
Attachment #680036 - Flags: review?(kaze)
Attachment #681428 - Flags: review?
Attachment #681428 - Flags: review? → review?(kaze)
(In reply to Fabien Cazenave [:kaze] from comment #23)
> It would be much easier to test and review with a pull request…
> 
> >+     case icc.STK_TONE_TYPE_NEGATIVE_ACK_TONE:
> >+       selectedPhoneSound = 'tones/300Hz+400Hz+500Hz_400ms_16bit_48kHz_-1dBFS_mono.ogg';
> >+       break;
> 
> * using shorter file names would be nice;
> * please use a `resources/dtmf_tones' directory for that (see
> `resources/ringtones')

I just reduced the tones filenames in the GitHub PR
Comment on attachment 681428 [details]
PR link to support PLAY TONE commands

Nice work! Merging.
Attachment #681428 - Flags: review?(kaze) → review+
Great! Thanks Kaze.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: