Closed Bug 1102798 Opened 10 years ago Closed 9 years ago

[Bluetooth] Implement pairing flow in Bluetooth app to support BT v2 API

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: iliu, Assigned: iliu)

References

Details

(Whiteboard: [webbt-api])

Attachments

(1 file, 1 obsolete file)

Implement pairing flow in Bluetooth app to support BT v2 API
Blocks: 1070823
Attached file WIP for bug 1102798 (obsolete) —
Attachment #8545090 - Attachment is obsolete: true
Attached file WIP for pr 27186
Hi Jamin, this is a WIP for implement pair flow in BT app with BT 2.0 API.

You will need to pull https://github.com/mozilla-b2g/gaia/pull/26139. Then, pull https://github.com/mozilla-b2g/gaia/pull/27186 for checking the feedback patch here. 

Per offline discussion, I cannot receive any pairing event after BT is launching via system message. Could you please help to check the problem here. Thanks.
Attachment #8545851 - Flags: feedback?(jaliu)
For the steps of flashing WIP in detail:

1. pull https://github.com/mozilla-b2g/gaia/pull/26139
2. make reset-gaia
3. pull https://github.com/mozilla-b2g/gaia/pull/27186
4. make install-gaia APP=bluetooth
Note:

Since bug 1100818 is fixed, we can receive system message in Bluetooth app while receiving pairing request. But the callback function which is listened via `BluetoothPairingListener` won't be executed(comment 2).
Depends on: 1100818
(In reply to Ian Liu [:ianliu] from comment #2)
> Created attachment 8545851 [details] [review]
> WIP for pr 27186
> 
> Hi Jamin, this is a WIP for implement pair flow in BT app with BT 2.0 API.
> 
> You will need to pull https://github.com/mozilla-b2g/gaia/pull/26139. Then,
> pull https://github.com/mozilla-b2g/gaia/pull/27186 for checking the
> feedback patch here. 
> 
> Per offline discussion, I cannot receive any pairing event after BT is
> launching via system message. Could you please help to check the problem
> here. Thanks.

Hi Ian,
I'll take look.
Thank you for reporting this issue.
Would you mind to file a bug ?
Depends on: 1119734
Let's tracking the problem via bug 1119734.
Comment on attachment 8545851 [details] [review]
WIP for pr 27186

I've tested the WIP patch for pr 27186.
The issue Ian mentioned at #comment 2 is a gecko bug.

Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=1119734#c3
Attachment #8545851 - Flags: feedback?(jaliu)
Since Jamin gives me a WIP quickly, I'm able to implement the feature.
Status: NEW → ASSIGNED
Depends on: 1120842
The WIP of bug 1119734 is working for phone device. But it cannot work for pairing with headset(like SONY Ericsson HBH-DS220, HBH-DS970).

Let's track the blocking problem via bug 1120842.
Depends on: 1121334
Since implementation of pairing process via WIP of bug 1119734, I meet a bug about no device name from the 'onpairingconfirmationreq' event.

Let's track the blocking problem via bug 1121334.
Depends on: 1121404
Since implementation of pairing process via WIP of bug 1119734, I meet a bug about incorrect number of paired device from API adapter.getPairedDevices().

Let's track the blocking problem via bug 1121404.
Whiteboard: [webbt-api]
Comment on attachment 8545851 [details] [review]
WIP for pr 27186

Arthur, could you please help to review my pull request? Thanks.
Attachment #8545851 - Flags: review?(arthur.chen)
Component: Bluetooth → Gaia::Settings
Depends on: 1127261
Depends on: 1127665
Depends on: 1127670
Comment on attachment 8545851 [details] [review]
WIP for pr 27186

There are only a few comments to be addressed, please check them in github, thanks.
Attachment #8545851 - Flags: review?(arthur.chen)
Comment on attachment 8545851 [details] [review]
WIP for pr 27186

Arthur, I have updated the patch to pick up your suggestion. It will need your review again. Thanks.
Attachment #8545851 - Flags: review?(arthur.chen)
Comment on attachment 8545851 [details] [review]
WIP for pr 27186

r=me with the comments addressed. Note that GU fails because the path of MockNavigatorSettings is incorrect. And remember to update the title of the merge in github. Thanks.
Attachment #8545851 - Flags: review?(arthur.chen) → review+
Thanks for Arthur's review. I have updated the patch to fix GU fails. And add unit test for pair_manager.js. All of the Bluetooth app GU are passed normally. We can land the patch while there is no other Gb/GU failed. We can see Calendar GU failed, Gb failed in these days.
Since the patch is landed, we can close the issue now.

Gaia/master:  1217bf61e26c48e071419cf173622b32b3c4a80f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Ian, since you're working on Bluetooth refactors, can you switch from raw Notification API to use NotificationHelper to remove mozL10n.get's from bluetooth app?

Here's some API info: https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/localization_code_best_practices#Notification_API
Zibi, I file Bug 1128806 for tracking the Notification refactor. I will go back to the refactor work after supported Bluetooth API version 2. Thanks for the reminder.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: