Closed Bug 818696 Opened 9 years ago Closed 9 years ago

Turning off bluetooth while pairing leaves bluetooth in bad state

Categories

(Firefox OS Graveyard :: General, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

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

VERIFIED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
b2g18 --- fixed

People

(Reporter: ggrisco, Assigned: echou)

Details

(Whiteboard: [LOE:S])

Attachments

(1 file)

1. Enable Bluetooth from Settings->Bluetooth.
2. Try to pair to another device.  When pairing is in progress, turn off Bluetooth.
3. Turn on Bluetooth after some time (say 30 seconds)

Result:  The pairing failed pop up is seen and bluetooth seems to do nothing as there is no device discovery taking place.  The "Rename my device" button is also disabled.
Blocks: 818234
Status: UNCONFIRMED → NEW
Ever confirmed: true
No longer blocks: 818234
Hi Eric, can you investigate this?

Thanks!
Assignee: nobody → echou
blocking-basecamp: ? → +
Priority: -- → P1
Eric, can you provide an estimate how long to take to fix this, and whether it can make C2 or not?
(In reply to Dietrich Ayala (:dietrich) from comment #2)
> Eric, can you provide an estimate how long to take to fix this, and whether
> it can make C2 or not?

We need more discussion about how to solve this. We will fix it before C3.

Eric
Whiteboard: [LOE:S]
We need more tests to make sure what the root cause is. As far as I can tell, this may require small fixes in both Gecko and Gaia. 

I know it's a P1 & C2 bug. We will try to solve this asap.
Evelyn has found the root cause. The patch is incoming.
(In reply to Eric Chou [:ericchou] [:echou] from comment #5)
> Evelyn has found the root cause. The patch is incoming.

Updated. 

The root cause is that the pairing failure callback function is invoked after turning on bluetooth, but we still can't be very sure about why this happened. Still looking for a better solution than just providing a workaround, and I'll work on it tomorrow.
Target Milestone: --- → B2G C3 (12dec-1jan)
* This was happened because a callback function was invoked after re-enabling Bluetooth.
* The patch has been tested that it's working. Nevertheless, I still filed a follow-up (Bug 820274) to see if there is a better solution.
Attachment #690756 - Flags: review?(gyeh)
Component: Gaia::Settings → General
QA Contact: wachen
Comment on attachment 690756 [details] [diff] [review]
patch 1: v1: prevent "pairing failed" prompt from appearing  after re-enabling Bluetooth

Review of attachment 690756 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=me
Attachment #690756 - Flags: review?(gyeh) → review+
Bizarrely the push after the original landing (but before the backout) was green. Maybe this was a compiler bug? Guess we'll find out once some of the runs after that complete.
The code here not only doesn't build on OS X, it wouldn't compile if we tried.

The problem was elsewhere.
https://hg.mozilla.org/mozilla-central/rev/4db89f8e3fbf
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
fixed in 2012.12.16 build https://releases.mozilla.com/b2g/
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.