Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After clicking Load to list the headsets, it keeps flashing BT icon but nothing listed #7

Open
jorgedso opened this issue Feb 9, 2021 · 4 comments

Comments

@jorgedso
Copy link

jorgedso commented Feb 9, 2021

Environment:

  • Ubuntu 20.04.2 LTS
  • Python 3.8.5
  • PyBluez 0.23

Logs:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/jorgedso/Projects/Bluetooth_project-master/external_threads.py", line 9, in get_headsets_devices
    blueClass.get_bluetooth_devices()
  File "/home/jorgedso/Projects/Bluetooth_project-master/blueP.py", line 60, in get_bluetooth_devices
    "name": str(obj.Get("org.bluez.Device1", "Name")),
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.InvalidArgs: No such property 'Name'
@fransschreuder
Copy link

Same for me too. This could very well be an issue with Ubuntu 20.04, did someone try it on a later version?

@ftoledo
Copy link

ftoledo commented Sep 9, 2021

same issue on debian buster

@carlosmca44
Copy link

same issue on manjaro

@gizmo66
Copy link

gizmo66 commented May 16, 2022

Same issue on Linux Mint 20.2, but I've found a workaround. Some devices in range probably have hidden names, so you can try to change blueP#get_bluetooth_devices() to something like this:

55        bt_devices = []
56
57        for device in devices:
58            obj = self.proxyobj(bus, device, 'org.freedesktop.DBus.Properties')
59            name = 'Unknown name'
60            try:
61            	name = str(obj.Get("org.bluez.Device1", "Name"))
62            except BaseException as e:
63            	pass
64            bt_devices.append({
65                "name": name,
66                "address": str(obj.Get("org.bluez.Device1", "Address")),
67                "port": self.get_device_port(str(obj.Get("org.bluez.Device1", "Address")))
68            })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants