Closed Bug 1090041 Opened 10 years ago Closed 9 years ago

[Bluetooth] No onpairedstatuschanged event coming after paired/unpaired a device.


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

Gonk (Firefox OS)
Not set


(blocking-b2g:2.2+, b2g-v2.1 unaffected, b2g-v2.2 verified)

blocking-b2g 2.2+
Tracking Status
b2g-v2.1 --- unaffected
b2g-v2.2 --- verified


(Reporter: iliu, Assigned: iliu)



(Keywords: regression)


(2 files)

Steps to Reproduce:

0. No paired device in the phone.
1. Launch settings app to pair a device in Bluetooth panel.
2. Checking description of Bluetooth menu in settings root panel.

The first paired device name should be listed in the description of Bluetooth menu.

Still display 'No devices paired'. (Sometimes, it displays the name of paired device.)

Steps to Reproduce:
Base on STR 2, and the first paired device name displayed normally.

3. Go into Bluetooth panel.
4. Unpair a paired devices in the list.

Should display 'No devices paired' in the description of Bluetooth menu.

Still display the unpaired device name which we just unpaired it.

Gaia-Rev        6a7fb482a03c5083ef79b41e7b0dfab27527cd04
Build-ID        20141027175024
Version         36.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141027.211305
FW-Date         Mon Oct 27 21:13:15 EDT 2014
Bootloader      L1TC10011800
I try to add some console log for tracking `onpairedstatuschanged` event. I don't see the event coming while paired/unpaired a device.
See Also: → 1088028
This is a regression form 2.1 so nominating this 2.2?
blocking-b2g: --- → 2.2?
QA Contact: ddixon
Unable to provide a regression window for this issue.  The issue is blocked from being reproduced. 

A bluetooth connection between devices cannot be made.

I am seeing the following results in earlier builds (9/4 - 10/25)
-Device 'B' will display a confirmation number while Device 'A' will only trigger a notification which does not function when selected. 
-This blocks the user from pairing devices via bluetooth.

Also, the repro rate is intermittent (less than 50%). 

Overall, 30+ builds were tested while attempting to find a regression window here.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
QA Contact: ddixon
Triage: regression, blocking.
Assignee: nobody → btian
blocking-b2g: 2.2? → 2.2+
On today's build I see settings app receive 'onpairedstatuschanged' event but description is still incorrect. Investigating settings app for cause.

(In reply to Ian Liu [:ianliu] from comment #1)
> I try to add some console log for tracking `onpairedstatuschanged` event. I
> don't see the event coming while paired/unpaired a device.
> bluetooth.js#L152-L157
The cause is that onpairedstatuschanged event handler is not re-attached to watch paired status change [1] after BT is turned on again. Attach gaia patch to show debugging logs.

Ian, please help check this bug in gaia. Thanks.
Assignee: btian → iliu
Component: Bluetooth → Gaia::Settings
Attached file pull request 26759
Per offline discussion with Arthur and Ben, the new adapter won't hold callback functions which is register before. So that the callback function won't be executed after we turned Bluetooth on/off. We have to register the callback function from old adapter to the new one.

Arthur, could you please help to review my pull request? Thanks.
Attachment #8536352 - Flags: review?(arthur.chen)
Comment on attachment 8536352 [details] [review]
pull request 26759

r=me, thanks!
Attachment #8536352 - Flags: review?(arthur.chen) → review+
Thanks for Arthur's reviewing effort. Since the patch is landed, we can close the issue now.

Gaia/master:  f1316844d0dc0da139619041cf62c6498821a9ea
Closed: 9 years ago
Resolution: --- → FIXED
This issue is verified fixed on Flame 2.2.

Result: The name of paired device or "No devices paired" is displayed correctly on the Settings menu screen.

Device: Flame 2.2 Master (319mb)(Kitkat Base)(Full Flash)
BuildID: 20141218040201
Gaia: 58734e8a48157f99d5b733412b600c2e04c954fe
Gecko: 5c7a6294b82a
Gonk: e5c6b275d77ca95fb0f2051c3d2242e6e0d0e442
Version: 37.0a1 (2.2 Master)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.