New issue
Advanced search Search tips

Issue 630946 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 604105



Sign in to add a comment

bluetooth: GetNameForDisplay should treat non-printing unicode characters as empty.

Project Member Reported by fbeaufort@chromium.org, Jul 25 2016

Issue description

Device names that do not contain printable characters should be treated the same as 'empty' device names in BluetoothDevice::GetNameForDisplay.

---

Google Chrome	53.0.2785.23 (Official Build) dev (64-bit)
Platform	8530.24.0 (Official Build) dev-channel link

What steps will reproduce the problem?
(1) Make sure WowWee MiP Robot device is nearby and broadcasting its presence
(2) Go to https://googlechrome.github.io/samples/web-bluetooth/device-info.html
(3) Fill service that is advertised by the device and click "Get Bluetooth device info" button

What is the expected output?
Bluetooth chooser should include WowWee MiP Robot device.

What do you see instead?
I can't see it even though it is there.
Clicking on an empty line make it appear...

As you can see in the logs, device name is a non-printing character (\001).

Note that when device type is advertised as well, there's at least a " - " line...

For info, I can reproduce this as well with:
 - Android (Chromium 54.0.2800)
 - macOS   (Chrome   54.0.2804)
 
Screenshot 2016-07-25 at 10.54.10 AM.png
153 KB View Download
mip-device-name.png
25.2 KB View Download
Here are raw btmon log for info:

> HCI Event: LE Meta Event (0x3e) plen 32
    LE Advertising Report
      ADV_IND - Connectable undirected advertising (0)
      bdaddr 1C:05:43:5C:E3:54 (Public)
      Flags: 0x06
      Complete service classes: 0xfff0 0xffb0
      Unknown type 0xff with 9 bytes data
      RSSI: -67

> 04 3E 20 02 01 00 00 54 E3 5C 43 05 1C 14 02 01 06 05 03 F0 
  FF B0 FF 0A FF 00 05 FF FF FF FF 64 00 FF BD 

> HCI Event: LE Meta Event (0x3e) plen 18
    LE Advertising Report
      SCAN_RSP - Scan Response (4)
      bdaddr 1C:05:43:5C:E3:54 (Public)
      Complete local name: '.'
      TX power level: 0
      RSSI: -67

> 04 3E 12 02 01 04 00 54 E3 5C 43 05 1C 06 02 09 01 02 0A 00 
  BD
Status: WontFix (was: Available)
Remember how anyDevice() works: it lists the characters that the device name can start with, which don't include '\x01', so the device isn't listed.

To do this well, we need the explicit "include all devices" option.
Description: Show this description
Status: Available (was: WontFix)
Jeffrey, I've updated the description to reflect the bug I wanted to highlight in the first place. Let me know what you think.
Ok, so we should probably render a device with no printing characters in its name as if it had no name. Does that sound right?
It does.
I guess BluetoothDevice::GetNameForDisplay needs to be updated then.

Comment 7 by scheib@chromium.org, Jul 26 2016

Description: Show this description

Comment 8 by scheib@chromium.org, Jul 26 2016

Summary: bluetooth: GetNameForDisplay should treat non-printing unicode characters as empty. (was: bluetooth: WowWee MiP Robot device name is non-printing unicode character )

Comment 9 by scheib@chromium.org, Jul 26 2016

Components: IO>Bluetooth
Fixed by http://crrev.com/2262393002
Status: Fixed (was: Available)
I confirm this is fixed in:

Google Chrome	54.0.2840.6 (Official Build) dev (64-bit)
Platform	8743.4.0 (Official Build) dev-channel link


 
Screenshot 2016-08-31 at 4.34.08 PM.png
67.4 KB View Download
Status: Verified (was: Fixed)
As per #12

Sign in to add a comment