bluetooth: GetNameForDisplay should treat non-printing unicode characters as empty. |
|||||||||
Issue descriptionDevice 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)
,
Jul 25 2016
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.
,
Jul 25 2016
,
Jul 25 2016
Jeffrey, I've updated the description to reflect the bug I wanted to highlight in the first place. Let me know what you think.
,
Jul 25 2016
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?
,
Jul 26 2016
It does. I guess BluetoothDevice::GetNameForDisplay needs to be updated then.
,
Jul 26 2016
,
Jul 26 2016
,
Jul 26 2016
,
Aug 25 2016
Fixed by http://crrev.com/2262393002
,
Aug 25 2016
,
Aug 31 2016
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
,
Dec 21 2016
As per #12 |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by fbeaufort@chromium.org
, Jul 25 2016Here 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