Closed Bug 892392 Opened 8 years ago Closed 8 years ago

[OTA][Data Migration][Bluetooth] Bluetooth function is turned off after update from v1.0.1 to v1.1.0


(Firefox OS Graveyard :: Bluetooth, defect)

Gonk (Firefox OS)
Not set


(blocking-b2g:leo+, firefox23 wontfix, firefox24 wontfix, firefox25 fixed, b2g18 verified, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

1.1 QE5
blocking-b2g leo+
Tracking Status
firefox23 --- wontfix
firefox24 --- wontfix
firefox25 --- fixed
b2g18 --- verified
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed


(Reporter: hlu, Assigned: echou)




(2 files)

Attached file logcat
Bluetooth function is turned off after update from v1.0.1 to v1.1.0

* Build Number (Both Gecko and Gaia)
Gaia:     680c72ccbd2d5045e590a6ba08de2aac6af71953
  B-D     2013-07-11 05:27:20
BuildID   20130710230201
Version   18.0

* Reproduce Steps
1. Flash device to v1.0.1 build from pvt
2. Change update URL to
3. Pair a BT device with phone device
4. Transfer one file to make sure phone pair with BT device and function works well.
5. Download and install gaia/gecko OTA update.
6. After auto-restart, go settings page to check if paired device information still exist.

* Actual results:
The Bluetooth function is turned off after update.

* * Expected results:
The Bluetooth function should not be turned off after update.
Component: Gaia::Bluetooth File Transfer → Bluetooth
Summary: [OTA][Data Migration][BT] Bluetooth function is turned off after update from v1.0.1 to v1.1.0 → [OTA][Data Migration][Bluetooth] Bluetooth function is turned off after update from v1.0.1 to v1.1.0
Hubert tested it in inari by askeing's special script and get the OTA.
please refer to TW-QA scripts repository for changing OTA url:

I tested it in unagi in v1train.
I think no matter from v101 to v110 or from v110 to v110,
After ota, bt would be turned off.

Gina, Shawn, Eric,
Is this expected? Or, maybe it should be handled in other ways?
Just a side note.
20130710230201 buildID looks like pvt build.
I can reproduce. I'll take a look.
Assignee: nobody → echou
The root cause of this issue is that, everytime when B2G process restarts, BluetoothService::HandleStartupSettingsCheck() would be called. Then, if the Bluetooth status which has been set in mozSettings is true, the low-level Bluetooth firmware should be up as well. Follow the call path and it will run into ToggleBtTask::Run(), and you'll find out that 

  mEnabled == gBluetoothService->IsEnabledInternal()

is true, so StartInternal() won't be called.

In general cases, it's fine. However, if only b2g process restarts, StartInternal() has to be run because it's actually in charge of initialization of BluetoothService.

The patch fixes this problem via handling startup case individually.
Attachment #782466 - Flags: review?(gyeh)
Comment on attachment 782466 [details] [diff] [review]
patch 1: v1: execute BluetoothService::StartInternal() at startup

Review of attachment 782466 [details] [diff] [review]:

Sorry for the late reply. Looks great to me.
Attachment #782466 - Flags: review?(gyeh) → review+
Closed: 8 years ago
Resolution: --- → FIXED
blocking-b2g: --- → leo?
Blocking as we want the user to be in the same state post update.
blocking-b2g: leo? → leo+
Keywords: verifyme
Verified Fixed in today's pvt build

After updated:
Gaia:     5628b2ca37bea107d5da7f03959f70def2d55676
  B-D     2013-08-11 04:04:20
BuildID   20130811041203
Version   18.0
Removing keyword tag based on comment 11.
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.