Closed Bug 997626 Opened 11 years ago Closed 11 years ago

[Tarako][bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure case

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3T+, b2g-v1.3T fixed, b2g-v1.4 unaffected)

RESOLVED FIXED
2.0 S1 (9may)
blocking-b2g 1.3T+
Tracking Status
b2g-v1.3T --- fixed
b2g-v1.4 --- unaffected

People

(Reporter: shawnjohnjr, Assigned: shawnjohnjr)

References

Details

(Whiteboard: [sprd294431] [partner-blocker][dolphin land])

Attachments

(2 files, 5 obsolete files)

7.16 KB, patch
Details | Diff | Splinter Review
2.06 KB, patch
Details | Diff | Splinter Review
A follow-up for bug 938003. Pairing confirmation shall be replied.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Summary: [Tarako][bluez] Handle RequestPairingConsent and reply pairing confirmation directly → [Tarako][bluez] Handle RequestPairingConsent and reply pairing confirmation directly to resolve pairing failure case
blocking-b2g: --- → 1.3T?
Summary: [Tarako][bluez] Handle RequestPairingConsent and reply pairing confirmation directly to resolve pairing failure case → [Tarako][bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure case
Attachment #8408933 - Attachment is obsolete: true
Attachment #8408933 - Flags: review?(echou)
Attachment #8408933 - Flags: feedback?(btian)
The patch can fix compatibility of Nokia BH105. We need merge patch to 1.3t branch. Hi Shawn, you need give a patch for 1.3t.
We need 1.3t+ to fix compatibility of Nokia BH105.
Flags: needinfo?(ttsai)
Flags: needinfo?(styang)
Comment on attachment 8408934 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure Review of attachment 8408934 [details] [diff] [review]: ----------------------------------------------------------------- f=me with following comment addressed. ::: dom/bluetooth/bluez/BluetoothDBusService.cpp @@ +1186,5 @@ > + > + if (!sPairingReqTable->Get(mDeviceAddress, &msg) && mRunnable) { > + BT_WARNING("%s: Couldn't get original request message.", __FUNCTION__); > + errorStr.AssignLiteral("Couldn't get original request message."); > + if (mRunnable) { This |if| is redundant since outer |if| ensures mRunnable is non-empty. @@ +1219,5 @@ > + > + dbus_message_unref(msg); > + dbus_message_unref(reply); > + sPairingReqTable->Remove(mDeviceAddress); > + if (!mRunnable) { nit: rewrite as following to be consistent with prior condition. if (mRunnable) { DispatchBluetoothReply(mRunnable, v, errorStr); } @@ +1404,2 @@ > > // Do not send an notification to upper layer, too annoying. nit: 'a' notification @@ +1408,5 @@ > + // Directly SetPairingconfirmation for RequestPairingConsent here > + if (!dbus_message_get_args(msg, nullptr, > + DBUS_TYPE_OBJECT_PATH, &objectPath, > + DBUS_TYPE_INVALID)) { > + errorStr.AssignLiteral("Invalid arguments: RequestConfirmation()"); Should the error string still be "RequestConfirmation()"? @@ +1416,5 @@ > + nsString address = GetAddressFromObjectPath(NS_ConvertUTF8toUTF16(objectPath)); > + sPairingReqTable->Put(address, msg); > + Task* task = new SetPairingConfirmationTask(address, true, nullptr); > + DispatchToDBusThread(task); > + // Increases dbus message reference count, it will be decreased in nit: 'Increase' dbug message @@ +1419,5 @@ > + DispatchToDBusThread(task); > + // Increases dbus message reference count, it will be decreased in > + // SetPairingConfirmationTask > + dbus_message_ref(msg); > + // Do not send an notification to upper layer nit: 'a' notification
Attachment #8408934 - Flags: feedback?(btian) → feedback+
When can you land this patch?
(In reply to James Zhang from comment #6) > When can you land this patch? The patch can't land unless it passes review process. I'll review it today.
Attachment #8408934 - Attachment is obsolete: true
Attachment #8408934 - Flags: review?(echou)
Comment on attachment 8409528 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure (master) Review of attachment 8409528 [details] [diff] [review]: ----------------------------------------------------------------- Actually you can just reply to BlueZ once you get "RequestPairingConsent" instead of dispatching the job to SetPairingConfirmationTask, but yeah, the patch should work as well.
Attachment #8409528 - Flags: review?(echou) → review+
Attachment #8409528 - Attachment description: Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure → Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly to resolve pairing failure (master)
1.3t+ and land it, please.
Whiteboard: [sprd294431]
Flags: needinfo?(fabrice)
triage: partner blocker, 1.3T+
blocking-b2g: 1.3T? → 1.3T+
Flags: needinfo?(styang)
Whiteboard: [sprd294431] → [sprd294431] [partner-blocker]
Flags: needinfo?(fabrice)
Comment on attachment 8409638 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly (v1.3t) Review of attachment 8409638 [details] [diff] [review]: ----------------------------------------------------------------- f=me with following comment. Thanks. ::: dom/bluetooth/bluez/linux/BluetoothDBusService.cpp @@ +1159,5 @@ > > + // Do not send a notification to upper layer, too annoying. > + return DBUS_HANDLER_RESULT_HANDLED; > + } else if (dbus_message_is_method_call(msg, DBUS_AGENT_IFACE, "RequestPairingConsent")) { > + // Directly SetPairingconfirmation for RequestPairingConsent here The comment should be removed or revised since SetPairingConfirmation is not called.
Attachment #8409638 - Flags: feedback?(btian) → feedback+
Attachment #8409638 - Attachment is obsolete: true
Attachment #8409638 - Flags: review?(echou)
Attachment #8410042 - Flags: review?(echou) → review+
Attachment #8410056 - Attachment description: Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly (v1.3t), r=echou, f=btian, a=1.3t+ → Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly, r=echou, f=btian, a=1.3t+ (v1.3t)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
Comment on attachment 8410056 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly, r=echou, f=btian, a=1.3t+ (v1.3t) NOTE: This flag is now for security issues only. Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): None User impact if declined: The Bluetooth headset got paired when: 1. Local IO capabilities are DisplayYesNo and remote IO capabiltiies are DisplayOnly or NoInputNoOutput. 2. Call PairingConsent callback for "incoming" request. This patch is try to directly reply pairing confirmation for consent cases. Testing completed: 1. Initialize pairing request with IO capabilities-NoInputNoOutput as headset role to b2g phone 2. Check pairing status of bluetooth headset Risk to taking this patch (and alternatives if risky): None String or UUID changes made by this patch: None
Hi Fabrice, could you help this uplift for 1.3t?
Flags: needinfo?(fabrice)
Flags: needinfo?(ttsai)
Comment on attachment 8410056 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly, r=echou, f=btian, a=1.3t+ (v1.3t) Please see https://bugzilla.mozilla.org/show_bug.cgi?id=997626#c20 for the approval request form. We'll need this uplifted if possible for our Dolphin 1.4 release.
Attachment #8410056 - Flags: approval-mozilla-b2g30?
Comment on attachment 8410056 [details] [diff] [review] Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly, r=echou, f=btian, a=1.3t+ (v1.3t) will need to land in Dolphin branch
Attachment #8410056 - Flags: approval-mozilla-b2g30?
Whiteboard: [sprd294431] [partner-blocker] → [sprd294431] [partner-blocker][dolphin land]
Hi Shawn, Can you request for approval to land this to 1.4 again if the patch is ready? We're now going to land directly to 1.4 instead of a dolphin branch. Thanks!
Flags: needinfo?(shuang)
Wayne, Dolphin actually change bluetooth backend from bluez to bluedroid. The original patch fixed for bluez. Even if we re-base the original patch for v1.4, still need to make another patch for bluedroid. I kept ni flag and will update later after patch for bluedroid completed.
My bad, after testing it looks like the consent pairing can work on bluedroid backend based.
Flags: needinfo?(shuang)
(In reply to Shawn Huang [:shuang] [:shawnjohnjr] from comment #27) > My bad, after testing it looks like the consent pairing can work on > bluedroid backend based. Hi Shawn, So does this mean the bug does not affect v1.4? If so, we should change status-b2g-v1.4 to be unaffected.
Flags: needinfo?(shuang)
Thanks Shawn for the update. Dolphin is using Bluedroid so that the bug does not affect Dolphin v1.4. Given that 1.4 is dolphin branch now, there is no need to uplift this to v1.4.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: