Bluetooth discovery does not show names for BT 2.0 devices

RESOLVED FIXED

Status

Firefox OS
Bluetooth
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Greg Grisco, Assigned: Ben Tian (inactive))

Tracking

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.2+, firefox38 wontfix, firefox38.0.5 wontfix, firefox39 wontfix, firefox40 affected, firefox41 fixed, b2g-v2.2 fixed, b2g-master fixed)

Details

(Whiteboard: [caf priority: p2][CR 823390])

Attachments

(9 attachments)

(Reporter)

Description

3 years ago
Steps to reproduce:

1. Have a 2.0 device (such as Sony SBH50, Jabra BT3030, or Motorola HT820 in the field and in pair mode
2. From Bluetooth settings, Enable Bluetooth

Expected Result:

The list of devices in the area are listed by name, including the 2.0 device

Actual Result:

The 2.0 device is listed as "Unknown device"
When there are several 2.0 devices in the field, this makes it difficult to distinguish them from one another.


I'm told that 2.0 uses RNR (Remote Name Request) -- as opposed to 2.1 and later which use EIR -- and that FFOS does the RNR but does not display the name that is retrieved form RNR.
(Reporter)

Updated

3 years ago
Blocks: 1063044

Updated

3 years ago
Whiteboard: [CR 823390] → [caf priority: p2][CR 823390]

Comment 1

3 years ago
Hi! Ben,

Please help to take a look.
Thanks

--
Keven
Flags: needinfo?(btian)
(Assignee)

Comment 2

3 years ago
Sure. I'll check it first.
Assignee: nobody → btian
Flags: needinfo?(btian)
(Assignee)

Comment 3

3 years ago
Similar symptom as bug 1076553. I'll repro this bug first and check if they are related.
(Assignee)

Comment 4

3 years ago
Created attachment 8595206 [details]
[pic] Orion discovers Jabra BT3030

Greg, can you provide correspondent snoop log? Also does the symptom always happen? 

In my trials on Orion, Jabra BT3030's device name is shown correctly (as attached pic) except the first discovery. The first discovery shows 'Unknown device' as EIR cases that bluetooth stack notifies gecko of found device before receiving its EIR/RNR.

(In reply to Greg Grisco from comment #0)
> The 2.0 device is listed as "Unknown device"
> When there are several 2.0 devices in the field, this makes it difficult to
> distinguish them from one another.
Flags: needinfo?(ggrisco)
(Reporter)

Comment 5

3 years ago
Hi Ben,

I personally don't have a 2.0 device to test with (I'll see if I can find one).  But I can ask the tester who reported this if he can provide the bt snoop.  It just might take another day.  

Can you verify that your Jabra BT3030 is 2.0?  Also, attachment 8595206 [details] shows other "Unknown device" listings, is there an explanation for that already?
Flags: needinfo?(btian)
(Reporter)

Comment 6

3 years ago
Created attachment 8595642 [details]
Unknown_device.cfa
Flags: needinfo?(ggrisco)
(Reporter)

Comment 7

3 years ago
Created attachment 8595643 [details]
logcat_1.txt
(Assignee)

Comment 8

3 years ago
Created attachment 8596317 [details]
bt3030_orion_hci.log

(In reply to Greg Grisco from comment #5)
> Can you verify that your Jabra BT3030 is 2.0?  Also, attachment 8595206 [details]
Yes. Following RNR shows in attached snoop log on my device:

< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:23:78:11:52:AA mode 1 clkoffset 0x41ec (valid)
...
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:23:78:11:52:AA name 'Jabra BT3030'

> [details] shows other "Unknown device" listings, is there an explanation for
> that already?
Please refer to comment 4. Also they may be LE devices without device name in broadcasted adv data.
Flags: needinfo?(btian)
(Assignee)

Comment 9

3 years ago
Again, does the symptom happen in each discovery?

(In reply to Ben Tian [:btian] from comment #4)
> Greg, can you provide correspondent snoop log? Also does the symptom always
> happen?
Flags: needinfo?(ggrisco)
(Assignee)

Comment 10

3 years ago
Created attachment 8596398 [details]
(2.2) devicefound.zip

Greg, can you reproduce this bug with attached gecko+gaia patches? The patches print more logs for device discovery.

Please discover several times continuously and capture logs + symptom video, in order to help clarify 1) whether this bug happens in each discovery and 2) whether non-BT 2.0 devices also meet the bug. Thanks.

Updated

3 years ago
blocking-b2g: 2.2? → 2.2+
(Reporter)

Comment 11

3 years ago
Ok, Nick applied this patch internally, it should go into AU139.  We'll send logs after it's reproduced with the steps you provided.
Flags: needinfo?(ggrisco) → needinfo?(ntroast)

Comment 12

3 years ago
Hi! Greg,

Any update from your side?

--
Keven
Flags: needinfo?(ggrisco)
(Reporter)

Comment 13

3 years ago
Created attachment 8599518 [details]
logs_snoop.cfa
Flags: needinfo?(ntroast)
Flags: needinfo?(ggrisco)
(Reporter)

Comment 14

3 years ago
Created attachment 8599519 [details]
logcat_1.txt
(Reporter)

Comment 15

3 years ago
I added attachment 8599518 [details] (bt snoop) and attachment 8599519 [details] (android logs) in response to comment 10.  The UI showed the following devices when these logs were captured:

"Unknown Device", "SHENOYS", "Unknown Device", "GBM", "Unknown Device", "SEJALC", "HAPARNA1", "GMARWAH", "anubhav auto", and "QCOM"
(Assignee)

Comment 16

3 years ago
Created attachment 8599768 [details] [diff] [review]
(v2.2) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang

Log file in comment 14 shows some devices' name are informed via |RemoteDevicePropertiesNotification| instead of |DeviceFoundNotification|. Attached v2.2 patch fires 'devicefound' again in |RemoteDevicePropertiesNotification| to notify gaia of updated name, as bug 1076553 fix.

Greg/Nick, can you feedback whether attached patch fixes the bug on your devices? Please apply this patch based on comment 10 log patches, and provide log file for analysis (in case it doesn't work).

Note the following points are still unclear since comment 14 log file only discovers once and no BT version info of devices with "Unknown Device" is provided. 

(In reply to Ben Tian [:btian] from comment #10)
> in order to help clarify 1) whether this bug happens in each discovery and
> 2) whether non-BT 2.0 devices also meet the bug. Thanks.
Attachment #8599768 - Flags: feedback?(ntroast)
Attachment #8599768 - Flags: feedback?(ggrisco)
(Assignee)

Comment 17

3 years ago
Greg/Nick, any update on comment 16 patch?
Flags: needinfo?(ggrisco)
(Reporter)

Comment 18

3 years ago
(In reply to Ben Tian [:btian] from comment #17)
> Greg/Nick, any update on comment 16 patch?

Hi Ben, sorry for delayed response.  We're still waiting for test to be performed, hopefully we can get feedback tomorrow.
Flags: needinfo?(ggrisco) → needinfo?(ntroast)
(Reporter)

Comment 19

3 years ago
Comment on attachment 8599768 [details] [diff] [review]
(v2.2) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang

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

Tester reports that problem does not reproduce when this patch is applied.
Attachment #8599768 - Flags: feedback?(ggrisco) → feedback+
(Assignee)

Comment 20

3 years ago
Created attachment 8603111 [details] [diff] [review]
(m-c) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang
Flags: needinfo?(ntroast)
Attachment #8603111 - Flags: review?(shuang)
Attachment #8603111 - Flags: review?(shuang) → review+
(Assignee)

Updated

3 years ago
Attachment #8603111 - Attachment description: (m-c) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery → (m-c) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang
(Assignee)

Updated

3 years ago
Attachment #8599768 - Flags: feedback?(ntroast)
(Assignee)

Comment 23

3 years ago
Comment on attachment 8599768 [details] [diff] [review]
(v2.2) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
  None
User impact if declined: 
  BT discovery shows "Unknown Device" instead of device name for BT 2.0 devices.
Testing completed: 
  - qcom verification (comment 19)
  - treeherder (comment 21)
Risk to taking this patch (and alternatives if risky):
  None 
String or UUID changes made by this patch:
  None
Attachment #8599768 - Attachment description: (v2.2) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery → (v2.2) Patch: Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang
Attachment #8599768 - Flags: approval-mozilla-b2g37?

Updated

3 years ago
Attachment #8599768 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
status-b2g-v2.2: --- → affected
status-b2g-master: --- → fixed
status-firefox38: --- → wontfix
status-firefox38.0.5: --- → wontfix
status-firefox39: --- → wontfix
status-firefox40: --- → affected
https://hg.mozilla.org/mozilla-central/rev/152f16cf0602
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.