Closed Bug 1118154 Opened 5 years ago Closed 5 years ago

FFOS can not receive Cell Broadcast messages on SIM2.

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.1+, b2g-v2.0 wontfix, b2g-v2.0M wontfix, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S5 (6feb)
blocking-b2g 2.1+
Tracking Status
b2g-v2.0 --- wontfix
b2g-v2.0M --- wontfix
b2g-v2.1 --- fixed
b2g-v2.1S --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: xianmao.meng, Assigned: steveck)

Details

(Whiteboard: sprd Bug 391009)

Attachments

(5 files, 1 obsolete file)

only insert one sim in SIM2,it can not receive CBM.
Dear shawn,

We have already received the CBM in gecko RIL, but while broadcasting CBM to gaia,the event.serviceId is always undefined in following code,  

  show: function cbs_show(event) {
    // XXX: check bug-926169
    // this is used to keep all tests passing while introducing multi-sim APIs
    var msg = event.message;
    var serviceId = event.serviceId || 0;
    var conn = window.navigator.mozMobileConnections[serviceId];

and it shows the following TypeError massage:

01-05 16:34:15.582   133   133 E GeckoConsole: [JavaScript Error: "TypeError: conn.voice.network is null" {file: "app://system.gaiamobile.org/js/cell_broadcast_system.js" line: 43}]

Please help find the owner to check the issue.

Thanks!
Flags: needinfo?(sku)
Whiteboard: sprd Bug 391009
Hi,

Would you please help to collect adb logcat with debug flags enabled for both main/radio logs for further clarification?
https://github.com/bevis-tseng/Debug_Tools

Thanks!
Flags: needinfo?(sku) → needinfo?(xianmao.meng)
Attached file 0-main-16-21-00.log
main log
Flags: needinfo?(xianmao.meng)
Attached file 0-radio-16-21-00.log
radio log
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #2)
> Hi,
> 
> Would you please help to collect adb logcat with debug flags enabled for
> both main/radio logs for further clarification?
> https://github.com/bevis-tseng/Debug_Tools
> 
> Thanks!

I have attached the main log and radio log in the attachment,please help check the issue.

Thanks!
Flags: needinfo?(btseng)
(In reply to 孟宪茂 from comment #5)
> (In reply to Bevis Tseng[:bevistseng][:btseng] from comment #2)
> > Hi,
> > 
> > Would you please help to collect adb logcat with debug flags enabled for
> > both main/radio logs for further clarification?
> > https://github.com/bevis-tseng/Debug_Tools
> > 
> > Thanks!
> 
> I have attached the main log and radio log in the attachment,please help
> check the issue.
> 
> Thanks!

Thanks for collecting the logs.

From the log, the serviceId/clientId is correct from gecko's perspective:
RadioInterface[1]: CBS system message to be broadcasted: {"serviceId":1,
RILContentHelper: Received message 'RIL:CellBroadcastReceived': {"clientId":1,"data":

After reviewing the implementation in gaia, it seems that gaia retrieves |serviceId| in wrong way [1]:
  var msg = event.message;
  var serviceId = event.serviceId || 0;
It shall be as followed instead:
  var msg = event.message;
  var serviceId = msg.serviceId || 0;

NI Steve for help to clarify this.

[1] https://github.com/mozilla-b2g/gaia/blob/db9c35438be5bc1ebe79ec3ef103f7e17c339e71/apps/system/js/cell_broadcast_system.js#L70
Flags: needinfo?(btseng) → needinfo?(schung)
Thanks Bevis, it's because we didn't fetch the correct serviceId here. Will give a quick patch for reporter to test.
Assignee: nobody → schung
Flags: needinfo?(schung)
Hi Xianmao, could you please help verify the patch? Thanks.
Attachment #8546441 - Flags: feedback?(xianmao.meng)
(In reply to Steve Chung [:steveck] from comment #8)
> Created attachment 8546441 [details] [diff] [review]
> Bug-1118154.patch
> 
> Hi Xianmao, could you please help verify the patch? Thanks.

Hi Steve,

I have tested the attached patch, but it still can not receive CBM. It shoes the error message:
01-12 13:50:03.617   130   130 E GeckoConsole: [JavaScript Error: "TypeError: conn.voice.network is null" {file: "app://system.gaiamobile.org/js/cell_broadcast_system.js" line: 44}] 

We have already obtained the serviceID,but the serviceID is 0,that is why showing error message.

I am confused by previous test by our test team and my new test.
As we use clientId 0 to route all CBS messages,why two tests has different serviceID ?

Thanks for your kindly help!
Flags: needinfo?(schung)
Attached file 0-main-13-48-55.log
main log for new test
Hi Reporter,

The log in comment 10 looks weird:
1. By my understanding, the scenario you test is that the SIM#1 is empty and the SIM#2 is available.
2. In the log of comment 3, we can see that the cb message was received from RIL Worker[1]:
   RIL Worker: [1] Handling parcel as UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS
3. However, compared the log in comment 10, the cb message was received unexpected from RIL Worker[0]:
   RIL Worker: [0] Handling parcel as UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS

It seems something wrong in vendor's RILD implementation instead.
set NI to reporter per comment 11.
Flags: needinfo?(schung) → needinfo?(xianmao.meng)
Unassign myself because it need partner modem issue fixed first.
Assignee: schung → nobody
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #12)
> set NI to reporter per comment 11.

Hi Bevis,

In attached log in the comment10,I test the CBM reveive using wrong AT command, today we test it under real network, it receives CBM on sim2.

Thanks for your help!
Flags: needinfo?(xianmao.meng)
Duplicate of this bug: 1120760
Hi 孟宪茂

There is the same behaviour in [FFOS2.0][Woodduck], I want to know which AT command is wrong and how to fix it ? could you show me the patch ?  Thank you.
(In reply to xiongqin.bi from comment #16)
> Hi 孟宪茂
> 
> There is the same behaviour in [FFOS2.0][Woodduck], I want to know which AT
> command is wrong and how to fix it ? could you show me the patch ?  Thank
> you.

Hi xiongqin,

This bug is actually not related to the wrong AT command. It's just a mistake made by vendor while verifying the patch in comment 8.

If you want to try it as well, please adopt the simple fix in patch in comment 8 instead.
Dear 宪茂,

There are some difference between [FFOS7715 v2.1] and [FFOS2.0], but it help me a lot.

Thank you very much!
Summary: [FFOS7715 v2.1] [dolphin] FFOS can not receive Cell Broadcast messages on SIM2. → FFOS can not receive Cell Broadcast messages on SIM2.
2.0m? for bug 1120760.
blocking-b2g: --- → 2.0M?
blocking-b2g: 2.0M? → 2.0M+
(In reply to xiongqin.bi from comment #18)
> Dear 宪茂,
> 
> There are some difference between [FFOS7715 v2.1] and [FFOS2.0], but it help
> me a lot.
> 
> Thank you very much!

Dear xiongqin,

We does not work on FFOS2.0,I could not understand the difference you mean.It seems it is the same issue as FFOS2.1 in comment 17.Please try the patch in comment 8.

Thanks!
Flags: needinfo?(xiongqin.bi.hz)
Dears,

The patch in comment 8 can't be used on FFOS2.0M, this is the code on FFOS2.0M, we need more help, thanks!

show: function cbs_show(event) {
    // XXX: check bug-926169
    // this is used to keep all tests passing while introducing multi-sim APIs
    var conn = window.navigator.mozMobileConnection ||
      window.navigator.mozMobileConnections &&
        window.navigator.mozMobileConnections[0];
    var msg = event.message;
    if (this._settingsDisabled) {
      return;
    }
    if (conn &&
        conn.voice.network.mcc === MobileOperator.BRAZIL_MCC &&
        msg.messageId === MobileOperator.BRAZIL_CELLBROADCAST_CHANNEL) {
      var evt = new CustomEvent('cellbroadcastmsgchanged',
        { detail: msg.body });
      window.dispatchEvent(evt);
      return;
    }
    var body = msg.body;
    // XXX: 'undefined' test until bug-1021177 lands
    if (msg.etws && (!body || (body == 'undefined'))) {
      body = navigator.mozL10n.get('cb-etws-warningType-' +
        (msg.etws.warningType ? msg.etws.warningType : 'other'));
    }
    CarrierInfoNotifier.show(body,
      navigator.mozL10n.get('cb-channel', { channel: msg.messageId }));
  }
Flags: needinfo?(xiongqin.bi.hz)
Flags: needinfo?(btseng)
NI Steve for gaia patch in comment 8 for branch v2.1.
Flags: needinfo?(btseng) → needinfo?(schung)
(In reply to (OOO on 1/22) Bevis Tseng[:bevistseng][:btseng] from comment #22)
> NI Steve for gaia patch in comment 8 for branch v2.1.
Sorry, I mean v2.0m instead.
Attached patch 0001-CB-DSDS-test.patch (obsolete) — Splinter Review
This patch sould be available for 2.0m
Flags: needinfo?(schung)
Attachment #8552916 - Flags: feedback?(xiongqin.bi.hz)
Hi Josh,

Per offline discussion with Steve,
we just realized that the CBS support is not complete yet in v2.0.
For Gecko, the feature set was done in bug 921326 and was landed in v2.1.
For Gaia, corresponding bugs for display CBS from different serviceId and setting of CBS to different service Id are also required.

In gaia, device will always try to check the network information from slot-0. [1]
However, in gecko, the serviceId is not provided to gaia to check the network inform from correct slot.

In v2.0, what we can try is to see how to display the received CBS message without blocking in [1].

[1] https://github.com/mozilla-b2g/gaia/blob/v2.0m/apps/system/js/cell_broadcast_system.js#L47
Flags: needinfo?(jocheng)
The root cause for v2.0m is different from this one.
Reopen bug 1120760 to track the problem in v2.0m.
blocking-b2g: 2.0M+ → ---
Flags: needinfo?(jocheng)
blocking-b2g: --- → 2.1S?
Comment on attachment 8552916 [details] [diff] [review]
0001-CB-DSDS-test.patch

cancel feedback per https://bugzilla.mozilla.org/show_bug.cgi?id=1120760#c9
Attachment #8552916 - Flags: feedback?(xiongqin.bi.hz)
[Blocking Requested - why for this release]:
More general speaking, this is a regression of bug 1068978 per comment 6, comment 7 and with postive test result in comment 14.
blocking-b2g: 2.1S? → 2.1?
Triage:
Hi Bevis 2.1+ Thanks!
blocking-b2g: 2.1? → 2.1+
Flags: needinfo?(vliu)
Steve, are you the best one to own it? Thanks.
Flags: needinfo?(schung)
Flags: needinfo?(vliu)
(In reply to Kevin Hu [:khu] from comment #30)
> Steve, are you the best one to own it? Thanks.

Yes because the patch is already in comment 9 for version later than 2.0.
And I think it's fine to remove all the woodduck dependency meta now?
Assignee: nobody → schung
No longer blocks: Woodduck, Woodduck_Blocker
Flags: needinfo?(schung)
Attached file Link to github
Hi Kevin, it's a tiny patch that fix the fetching of cell broadcast serviceId. I couldn't come out a good way to verify the serviceId, so I add another test for SIM2 with different mcc to verify whether cellbroadcastmsgchanged event dipatched instead.
Attachment #8552916 - Attachment is obsolete: true
Attachment #8554378 - Flags: review?(kgrandon)
Comment on attachment 8554378 [details] [review]
Link to github

From a code perspective, this looks fine to me. Thanks!
Attachment #8554378 - Flags: review?(kgrandon) → review+
Thanks!
In master: https://github.com/mozilla-b2g/gaia/commit/1eedbee8f26efbaa4a113e002c46f64e9b90249d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Comment on attachment 8554378 [details] [review]
Link to github

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #):Bug 1068978
[User impact] if declined: User could not receive cell broadcast from SIM2. 
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: N/A
Attachment #8554378 - Flags: approval-gaia-v2.1?
Josh, can you please help get this patch verified from partners as they are in the best position to test this?Thanks!
Flags: needinfo?(jocheng)
Hi Bhavana, 
Partner tried applied partial patches on 2.0M with:

1. https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=921326&attachment=8441150 (part 3)
2. https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=1118154&attachment=8552916 (comment 24)

They replied test passed at https://bugzilla.mozilla.org/show_bug.cgi?id=1120760#c17

They can only verify this on 2.0. However if we like to fully verified this, we may need Steven's help to check whether partner using 2.1S can help fully verify this. 

Thanks!
Flags: needinfo?(jocheng) → needinfo?(styang)
This needs a Gaia v2.2 approval request as well.
Flags: needinfo?(schung)
Target Milestone: --- → 2.2 S5 (6feb)
(In reply to Josh Cheng [:josh] from comment #37)
> Hi Bhavana, 
> Partner tried applied partial patches on 2.0M with:
> 
> 1.
> https://bugzilla.mozilla.org/page.cgi?id=splinter.
> html&bug=921326&attachment=8441150 (part 3)
> 2.
> https://bugzilla.mozilla.org/page.cgi?id=splinter.
> html&bug=1118154&attachment=8552916 (comment 24)
> 
> They replied test passed at
> https://bugzilla.mozilla.org/show_bug.cgi?id=1120760#c17
> 
> They can only verify this on 2.0. However if we like to fully verified this,
> we may need Steven's help to check whether partner using 2.1S can help fully
> verify this. 
> 
> Thanks!

Thanks Josh, steven lets follow-up on getting this verified post-landing! thanks!
Attachment #8554378 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #38)
> This needs a Gaia v2.2 approval request as well.

Sorry I thought gaining the 2.1 approval means 2.2 upliftable as well. Will request both for 2.1 blocker next time.
Flags: needinfo?(schung)
Vincent should pick the solutions from 2.1 to 2.1S regularly, ni for double check.
Flags: needinfo?(styang) → needinfo?(vliu)
Flags: needinfo?(vliu)
Attachment #8546441 - Flags: feedback?(xianmao.meng) → feedback+
You need to log in before you can comment on or make changes to this bug.