win10 local_name is 'Unknown'
See original GitHub issue- bleak version: 0.6.1
- Python version: 3.6
- Operating System: Win10
- BlueZ version (
bluetoothctl -v
) in case of Linux:
Description
I use scanner get_discovered_devices but I see device name’s ‘Unknown’ always
What I Did
I saw scanner.py in the 135. line:
if (
not new_device.name
and event_args.BluetoothAddress in self._scan_responses
):
new_device.name = self._scan_responses[
event_args.BluetoothAddress
].Advertisement.LocalName
found.append(new_device)
this new_device.name never nothing because in the 160. line:
return BLEDevice(
bdaddr, local_name, event_args, uuids=uuids, manufacturer_data=data
BLEDevice init local_name = 'Unknown
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to remove the Unknown Locale(qaa-latn) language
Hi. After I updated the Windows 10 ,there is a keyboard selection on the keyboard list called Unknown Locale (qaa-latn).
Read more >Unknown username or password when connecting via ...
Press the Windows key and type 'Control" select the Control Panel App from the listing. Unknown username or password when connecting via SMB...
Read more >Installing or updating the latest version of the AWS CLI
This topic describes how to install or update the latest release of the AWS Command Line Interface (AWS CLI) on supported operating systems....
Read more >Windows 10 can't resolve hostnames - ping with IP works ...
Open "View network connections" and try disabling each adapter one-by-one. After disabling each one, test the DNS and then re-enable it. Perhaps ...
Read more >Windows 10 Pro suddenly creates strange - unknown to me
As stated in the title, all of a sudden my SSD-WIN10PRO - booted in VMware - is creating unknown usernames e.g.: Even though...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, I wrote some thoughts about how to make Windows more like other platforms by internally combining the different advertisement types in #394.
This requires an update to the constructor of BLEDevice. If the ‘name’ parameter is None, the BLEDevice.name gets set to ‘Unknown’.
So long as BLEDevice never accepts None as a name, the code in the following branch in the dotnet scanner.py will never execute:
Allowing BLEDevice to accept None as a name, and then replacing the code in the dotnet scanner.py with the following fixes the issue for me:
@dlech is right… This of course is contingent upon a ScanResponse type advertisement being available for all device addresses that were found since that is what contains the local name. I have situations where sometimes a device will show Unknown and sometimes it will show its actual name. I think this has more to do with the advertising interval and scans not waiting for a corresponding ScanResponse for each address that has been encountered.
Hope this helps!