Closed Bug 1076553 Opened 10 years ago Closed 10 years ago

[woodduck] Update Device properties to refresh device in Bluetooth Settings

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0M+, b2g-v2.0 unaffected, b2g-v2.0M fixed, b2g-v2.1 unaffected, b2g-v2.2 unaffected)

RESOLVED FIXED
2.1 S7 (24Oct)
blocking-b2g 2.0M+
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.0M --- fixed
b2g-v2.1 --- unaffected
b2g-v2.2 --- unaffected

People

(Reporter: shawnjohnjr, Assigned: shawnjohnjr)

References

Details

(Whiteboard: [ETA:10/13][blueangel][2.0M_only])

Attachments

(1 file, 3 obsolete files)

Update device properties to refresh device in Bluetooth Settings
Some of the devices alway shown Unkown device on DUT.
When device_found_cb callback doesn't get name,FXOS doesn't handle remote_device_properties_cb callback to update device name again.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Whiteboard: [ETA:10/7]
This is not a trivial fix, and I think will fix for v2.0M first before 10/7.
Blocks: Woodduck
blocking-b2g: --- → 2.0M?
status-b2g-v2.0: --- → ?
status-b2g-v2.1: --- → ?
status-b2g-v2.2: --- → ?
Hi Shawn,
Thanks for helping fixing this bug.
Should I mark status-b2g-v2.0, status-b2g-v2.1, status-b2g-v2.2 all to 'affected'?
BTW. Do you like to update the ETA date?
blocking-b2g: 2.0M? → 2.0M+
status-b2g-v2.1: ? → ---
status-b2g-v2.2: ? → ---
Flags: needinfo?(shuang)
Flags: needinfo?(shuang)
Whiteboard: [ETA:10/7] → [ETA:10/11]
Whiteboard: [ETA:10/11] → [ETA:10/13]
Device property name was updated after inquiry results.

10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): +++[GAP] btmtk_handle_gap_message msg:[MSG_ID_BT_BM_DISCOVERY_UPDATE_IND]+++!
10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP] btmtk_inquired_dev_cache_find: addr=0x860ECE:0x3C:0x21
10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP] btmtk_inquired_dev_cache_find found
10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): [GAP] MSG_ID_BT_BM_DISCOVERY_UPDATE_IND addr: [0x860ECE:0x3C:0x21]
10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): [GAP] btmtk_util_update_device_property_name: name = BIG JAMBOX by Jawbone
10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP] btmtk_inquired_dev_cache_find: addr=0x860ECE:0x3C:0x21
Currently Gaia does not have any chance to update device list after fetching ondevicefound callback. If we don't want to touch any part of API. The only way is to pass via system-message or pass again ondevicefound.
(In reply to Shawn Huang [:shawnjohnjr] from comment #3)
> Device property name was updated after inquiry results.
> 
> 10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): +++[GAP] btmtk_handle_gap_message
> msg:[MSG_ID_BT_BM_DISCOVERY_UPDATE_IND]+++!
> 10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP]
> btmtk_inquired_dev_cache_find: addr=0x860ECE:0x3C:0x21
> 10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP]
> btmtk_inquired_dev_cache_find found
> 10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): [GAP]
> MSG_ID_BT_BM_DISCOVERY_UPDATE_IND addr: [0x860ECE:0x3C:0x21]
> 10-06 18:19:21.965 I/bt_gap_hdl.c( 1325): [GAP]
> btmtk_util_update_device_property_name: name = BIG JAMBOX by Jawbone
> 10-06 18:19:21.965 I/bt_gap_api.c( 1325): [GAP]
> btmtk_inquired_dev_cache_find: addr=0x860ECE:0x3C:0x21

I guess this is something related to EIR information updated later, so we have to handle device update after ondevicefound.

I tested with my Big Jambox, I found bluetooth friendly name always get update later. But on bluedroid, I don't see this behavior, the name comes with ondevicefound. So I think this is different stack behavior on woodduck.
Add blueangel tag for trakcing this different stack behavior.
Whiteboard: [ETA:10/13] → [ETA:10/13][blueangel]
Currently the design of Bluetooth Setting, it won't refresh and update Bluetooth device list (after devicefound), however, on woodduck the stack behaves different, the device name will be updated later. Do you have any recommend preferable ways let gecko notify gaia to update name again?
I would like to switch to bluetooth2 new API for v2.2 (m-c). So I will open a new bug for m-c to handle this name update.
See also:
Bug 1081885 - [woodduck][bluetooth2] Update Device properties to refresh device in Bluetooth Settings
Whiteboard: [ETA:10/13][blueangel] → [ETA:10/13][blueangel][2.0M only]
Comment on attachment 8504002 [details] [diff] [review]
Bug 1076553 - Update Device properties to refresh device list for Settings

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

This is obviously a workaround for 2.0M only. Please do more tests to make sure that DeviceFound events won't be fired even when it's not discovering.

::: dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ +448,5 @@
>      MOZ_ASSERT(NS_IsMainThread());
>  
>      if (sRequestedDeviceCountArray.IsEmpty()) {
>        // This is possible because the callback would be called after turning
> +      // Bluetooth on, or simply remote device properties get updated.

nit: please also mention that this will be fixed on mainline after bug 1076553 getting fixed.
Attachment #8504002 - Flags: review?(echou) → review+
I tested on woodduck for the following scenarios:
1. Turn on/off bluetooth
2. Check GetPairedDevices
3. Unpair devices

Except for discovery case, i don't see additional DeviceFound events were sent.
This only phased into v2.0m. Thanks.
Flags: needinfo?(kli)
http://hg.mozilla.org/releases/mozilla-b2g32_v2_0m/rev/1cb8603f401e
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(kli)
Resolution: --- → FIXED
Whiteboard: [ETA:10/13][blueangel][2.0M only] → [ETA:10/13][blueangel][2.0M_only]
Target Milestone: --- → 2.1 S7 (24Oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: