Closed
Bug 869776
Opened 13 years ago
Closed 12 years ago
[B2G][CDMA] Set cell broadcast channel and disable/enable the CB function in CDMA network
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(blocking-b2g:koi+, firefox26 fixed)
People
(Reporter: kchang, Assigned: aknow)
References
Details
(Whiteboard: [ETA:7/26], [Under review], [FT:RIL], [Sprint:1])
Attachments
(2 files, 7 obsolete files)
|
5.42 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.90 KB,
patch
|
Details | Diff | Splinter Review |
We may need this interface, REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG, to set cell broadcast channel in CDMA network.
| Reporter | ||
Comment 1•13 years ago
|
||
(In reply to Ken Chang from comment #0)
> We may need this interface, REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG, to set
> cell broadcast channel in CDMA network.
And we also need the interface, REQUEST_CDMA_SMS_BROADCAST_ACTIVATION, to activated the CB function.
Summary: [B2G][CDMA] Set cell broadcast channel in CDMA network → [B2G][CDMA] Set cell broadcast channel and disable/enable the CB function in CDMA network
| Reporter | ||
Updated•13 years ago
|
Blocks: b2g-ril-cdma
| Reporter | ||
Updated•13 years ago
|
Assignee: nobody → vyang
Comment 3•12 years ago
|
||
Ken, Is UX definition needed here?
| Reporter | ||
Comment 4•12 years ago
|
||
Sandip, yes, it is better to have the UX definition.
| Reporter | ||
Updated•12 years ago
|
Assignee: nobody → szchen
| Assignee | ||
Comment 5•12 years ago
|
||
We should support these two ril commands.
REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
ACTIVATION is just the same as it in GSM.
However, the data for REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG has different format.
In GSM:
Config data is an array of (serviceId range, codeScheme range)
The cell broadcast search list is config from
1. setting "ril.cellbroadcast.searchlist" ex: "12,15-34"
2. sim card (CBMI/CBMID/CBMIR)
Then, we merge all the search list into an array.
So the `Config data` send to ril will be
[(12-12, 0x00-FF), (15-34, 0x00-FF) ... ]
In CDMA:
Config data is an array of (service_category, language).
My proposal is to use a similar setting "ril.cdma.cellbroadcast.searchlist"
Ex:
(i) "12,15-34" <= if we don't want to specify the language indicator, or
(ii) "12/1,15-34/6" <= use language indicator
Gecko could split the the range and send the request to ril
So the correspondent `Config data` for ril will be
(i) [(12,0), (15,0), (16,0), ..., (34,0)] or
(ii) [(12,1), (15,6), (16,6), ..., (34,6)]
Comment 6•12 years ago
|
||
UX folks should know that stock Android shows the same screen for GSM or CDMA (no language selection option given) should they want to take that into account. Things might be different if we're targeting dual-tech (DSDS/DSDA) markets however.
Updated•12 years ago
|
QA Contact: echu
Updated•12 years ago
|
blocking-b2g: --- → koi+
Updated•12 years ago
|
Whiteboard: [ETA:7/26]
| Assignee | ||
Comment 7•12 years ago
|
||
Attachment #783514 -
Flags: review?(vyang)
| Assignee | ||
Comment 8•12 years ago
|
||
Attachment #783516 -
Flags: review?(vyang)
Updated•12 years ago
|
Whiteboard: [ETA:7/26] → [ETA:7/26], [Under review]
| Assignee | ||
Comment 9•12 years ago
|
||
vicamo,
There are some rules on sim card should be followed.
See 3gpp2 C.S0023 (spec of R-UIM) and search BCSMS
(also http://goo.gl/RlUPYN )
First, we should check EFCST (CDMA Service Table) and find Service n14 (Service Category Program for BC-SMS)
If n14 exists, ...
EFBCSMScfg (Broadcast Short Message Configuration), operator setting
-- disallow cb
-- allow all service categories
-- only allow the service categories programmed in EFBCSMStable
EFBCSMSpref(Broadcast Short Message Preference), user setting
similar to EFBCSMScfg
EFBCSMStable (Broadcast Short Message Table) ...
EFBCSMSP (Broadcast Short Message Parameter) ...
Not sure whether we have to handle these logic. If we are lucky, modem might be powerful enough to handle all of them. I'll check this part later.
| Assignee | ||
Updated•12 years ago
|
Attachment #783514 -
Flags: review?(vyang)
| Assignee | ||
Comment 10•12 years ago
|
||
Comment on attachment 783516 [details] [diff] [review]
Part 2: Test cell broadcast config
Cancel the review until the question or issue in Comment 9 is fixed.
Attachment #783516 -
Flags: review?(vyang)
Updated•12 years ago
|
Whiteboard: [ETA:7/26], [Under review] → [ETA:7/26], [Under review], [FT:RIL], [Sprint:1]
| Assignee | ||
Comment 11•12 years ago
|
||
Attachment #783514 -
Attachment is obsolete: true
Attachment #784909 -
Flags: review?(vyang)
| Assignee | ||
Comment 12•12 years ago
|
||
Attachment #783516 -
Attachment is obsolete: true
Attachment #784910 -
Flags: review?(vyang)
Comment 13•12 years ago
|
||
Comment on attachment 784909 [details] [diff] [review]
Part 1#2: Support cdma cell broadcast config
Review of attachment 784909 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/ril_worker.js
@@ +4533,5 @@
> + // CBMI should be ready in GSM.
> + if (!("MMI" in this.cellBroadcastConfigs) ||
> + (!this._isCdma && !this._isCBMIReady())) {
> + return false;
> + }
That's too complicated. Please have:
if (!("MMI" in this.cellBroadcastConfigs)) {
return false;
}
if (!this._isCdma) {
if (!("CBMI" in this.cellBroadcastConfigs) ||
!("CBMID" in this.cellBroadcastConfigs) ||
!("CBMIR" in this.cellBroadcastConfigs)) {
return false;
}
}
return true;
Attachment #784909 -
Flags: review?(vyang) → review+
Comment 14•12 years ago
|
||
Comment on attachment 784910 [details] [diff] [review]
Part 2#2: Test cell broadcast config
Review of attachment 784910 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ +17,5 @@
> + }
> + });
> +
> + let parcelTypes = [];
> + let org_newParcel = worker.Buf.newParcel;
orig_newParcel? What does 'org_newParcel' mean?
@@ +26,5 @@
> +
> + function setup(options) {
> + if (options && options.cdma) {
> + worker.RIL._isCdma = true;
> + }
We can just have:
function setup(isCdma) {
worker.RIL._isCdma = isCdma;
...
@@ +46,5 @@
> + setup({cdma: true});
> + worker.RIL.setCellBroadcastDisabled({disabled: true});
> + // Makesure that request parcel is sent out.
> + do_check_neq(parcelTypes.indexOf(REQUEST_CDMA_SMS_BROADCAST_ACTIVATION), -1);
> + do_check_eq(worker.RIL.cellBroadcastDisabled, true);
Can we merge these repeating steps into one common test function? So we have:
test(false, REQUEST_GSM_SMS_BROADCAST_ACTIVATION);
test(true, REQUEST_CDMA_SMS_BROADCAST_ACTIVATION);
@@ +76,5 @@
> + recordedParcel = null;
> + worker.Buf.sendParcel = function() {
> + org_sendParcel.apply(this, arguments);
> + if (parcelTypes[parcelTypes.length - 1] == parcelType) {
> + recordedParcel = currentParcel;
We all know where does the parcel data begin, and that's already addressed in other test script. So, can you just skip all the complex steps here and validate the sent parcel directly?
@@ +189,5 @@
> + function setup(options) {
> + if (options && options.cdma) {
> + worker.RIL._isCdma = true;
> + }
> + worker.RIL.cellBroadcastDisabled = false;
You don't need this in validating |mergedCellBroadcastConfig|, right?
@@ +208,5 @@
> +
> + // Test merge cell broadcast config. (CDMA)
> + setup({cdma: true});
> + worker.RIL._mergeAllCellBroadcastConfigs();
> + do_check_eq(worker.RIL.mergedCellBroadcastConfig.toString(), "1,2,4,7");
Can we have a test function like:
test(isCdma, configs, expected) {
...
}
test(false, {<current configs>}, <expected merged config string>);
test(true, ....);
Then we can test all possible executing branches of |mergedCellBroadcastConfig|.
Attachment #784910 -
Flags: review?(vyang)
| Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 784910 [details] [diff] [review]
Part 2#2: Test cell broadcast config
Review of attachment 784910 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ +17,5 @@
> + }
> + });
> +
> + let parcelTypes = [];
> + let org_newParcel = worker.Buf.newParcel;
Original function of Buf.newParcel.
I will replace the function later but would like to keep the original version and use it.
@@ +26,5 @@
> +
> + function setup(options) {
> + if (options && options.cdma) {
> + worker.RIL._isCdma = true;
> + }
Don't like this. It lacks the information when called by 'setup(true)'
... However, I will accept the suggestion.
@@ +76,5 @@
> + recordedParcel = null;
> + worker.Buf.sendParcel = function() {
> + org_sendParcel.apply(this, arguments);
> + if (parcelTypes[parcelTypes.length - 1] == parcelType) {
> + recordedParcel = currentParcel;
Sorry, I can't got the idea between your comment and the code.
The function here is to record the parcel which we are interested because it is possible to sent out several parcels at the same time.
| Assignee | ||
Comment 16•12 years ago
|
||
Attachment #784910 -
Attachment is obsolete: true
Attachment #785769 -
Flags: review?(vyang)
| Assignee | ||
Comment 17•12 years ago
|
||
Attachment #785769 -
Attachment is obsolete: true
Attachment #785769 -
Flags: review?(vyang)
Attachment #786097 -
Flags: review?(vyang)
Comment 18•12 years ago
|
||
Comment on attachment 786097 [details] [diff] [review]
Part 2#4: Test cell broadcast config
Review of attachment 786097 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ +44,5 @@
> +
> + run_next_test();
> +});
> +
> +add_test(function test_ril_worker_cellbroadcast_config() {
I mean:
let worker = newWorker();
function test(isCdma, configs, expected) {
let parcelType = isCdma ? REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
: REQUEST_GSM_SET_BROADCAST_SMS_CONFIG;
let found = false;
worker.postRILMessage = function (id, parcel) {
let type = parcel[4] | (parcel[5] << 8) | \
(parcel[6] << 16) | (parcel[7] << 24)
if (type != parcelType) {
return;
}
found = true;
do_check_eq(parcel.slice(???).toString(), expected);
},
worker.RIL._isCdma = isCdma;
worker.RIL.cellBroadcastDisabled = false;
worker.RIL.mergedCellBroadcastConfig = configs;
worker.RIL.setSmsBroadcastConfig(worker.RIL.mergedCellBroadcastConfig);
do_check_eq(found, true);
}
// GSM
test(false, <config_1>, <expected_1>);
...
test(false, <config_n>, <expected_n>);
// CDMA
test(true, <config_1>, <expected_1>);
...
test(true, <config_n>, <expected_n>);
Attachment #786097 -
Flags: review?(vyang)
| Assignee | ||
Comment 19•12 years ago
|
||
Attachment #786097 -
Attachment is obsolete: true
Attachment #788027 -
Flags: review?(vyang)
Comment 20•12 years ago
|
||
Comment on attachment 788027 [details] [diff] [review]
Part 2#5: Test cell broadcast config
Review of attachment 788027 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you.
Attachment #788027 -
Flags: review?(vyang) → review+
| Assignee | ||
Comment 21•12 years ago
|
||
| Assignee | ||
Comment 22•12 years ago
|
||
Attachment #784909 -
Attachment is obsolete: true
| Assignee | ||
Comment 23•12 years ago
|
||
Attachment #788027 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 24•12 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/8c23a78dd46d
https://hg.mozilla.org/integration/b2g-inbound/rev/186e3f794eb0
Flags: in-testsuite+
Keywords: checkin-needed
Comment 25•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8c23a78dd46d
https://hg.mozilla.org/mozilla-central/rev/186e3f794eb0
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•12 years ago
|
Component: DOM: Device Interfaces → RIL
Product: Core → Boot2Gecko
Target Milestone: mozilla26 → ---
Updated•12 years ago
|
status-firefox26:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•