Closed Bug 1180154 Opened 9 years ago Closed 6 years ago

[Stingray] Pairing BT device in Device Deck

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dwi2, Assigned: rexboy)

References

()

Details

(Whiteboard: [ft:conndevices])

Implement the functionality of pairing BT device
Assignee: nobody → tzhuang
Depends on: 1186301
Status: NEW → ASSIGNED
Blocks: 1189251
[Blocking Requested - why for this release]:
This is part of user story of FxOS 2.5 TV
blocking-b2g: --- → 2.5?
blocking-b2g: 2.5? → ---
feature-b2g: --- → 2.5+
Target Milestone: --- → FxOS-S5 (21Aug)
In Gecko, BluetoothAdapter only allows bluetooth app (app://bluetooth.gaiamobile.org) to have pairingReqs
https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp#318

In order to have this feature done, We might need to let device-deck to work with bluetooth app together.
Depends on: 1192695
Blocks: 1194620
WIP is here
https://github.com/dwi2/gaia/commit/7804eae9a19581be6dd0cd836e66b8077008d9d7

This WIP has done things below:
1. Make bluetooth_manager[1] as bower component because I also need it in bt-test[2].
2. Remove bluetooth app from build/config/tv/apps-engineering.list because it is designed for phone.
3. Enable 'discoverable' and make device-deck able to receive pairing request system message.

And the things still need to do are:
1. Display pin code when device deck receive pairing request and `displaypasskeyreq` event (we propagate it through BluetoothManager as `display-passkey-req`
2. Pipe pairing related tasks by handling `enterpincodereq`, `pairingconfirmationreq`, `pairingconsentreq`, `devicepaired`, `deviceunpaired`, and `pairingaborted` events. We may use some help with SmartDialog.

[1]: https://github.com/fxos-bt-squad/bluetooth_manager
[2]: https://github.com/fxos-bt-squad/bt-test/
[3]: https://github.com/smart-components/smart-dialog
Assignee: dwi2 → nobody
Status: ASSIGNED → NEW
There is one more thing. After bug 1192695 landed, we could set 'dom.bluetooth.app-origin' in pref to specify the only app that could do pairing. In our case, we should write this in build/config/tv/custom-prefs.js:

    user_pref('dom.bluetooth.app-origin', 'app://device-deck.gaiamobile.org');
Hi Rex,
Can you help to find someone who can continue the work?
Thanks!
Flags: needinfo?(rexboy)
Target Milestone: FxOS-S5 (21Aug) → FxOS-S6 (04Sep)
Assign to myself for now.
Assignee: nobody → rexboy
Flags: needinfo?(rexboy)
Priority: -- → P2
Priority: P2 → P3
Target Milestone: FxOS-S6 (04Sep) → FxOS-S8 (02Oct)
feature-b2g: 2.5+ → ---
Priority: P3 → --
Target Milestone: FxOS-S8 (02Oct) → ---
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.