-
blueman: blueman 2.4.2+mint1+wilma
Problem: Steps taken so far:
Steps i came up with but could not do:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Same thing. I have a number of devices pared with my laptop. They don't want to be connected to the laptop automatically. On all the devices the second line in the context menu i greyed out and not active. There is a config file. Changing parameters in it does not make any difference. |
Beta Was this translation helpful? Give feedback.
-
If you are referring to |
Beta Was this translation helpful? Give feedback.
-
okay, what is the expected behavior when the checkbox is checked? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately it looks like this broke at some point. Below patch with debug logging should fix this. Can you check if it does for you @Renegat27 . If it does I'll submit a PR for review. diff --git a/blueman/plugins/applet/AutoConnect.py b/blueman/plugins/applet/AutoConnect.py
index efb4d16d6..102737282 100644
--- a/blueman/plugins/applet/AutoConnect.py
+++ b/blueman/plugins/applet/AutoConnect.py
@@ -1,10 +1,12 @@
from gettext import gettext as _
from typing import TYPE_CHECKING, Union, Optional, Any
+import logging
from gi.repository import GLib
from blueman.Sdp import ServiceUUID
from blueman.bluez.Device import Device
+from blueman.bluez.errors import BluezDBusException
from blueman.gui.Notification import Notification
from blueman.plugins.AppletPlugin import AppletPlugin
@@ -40,18 +42,26 @@ class AutoConnect(AppletPlugin):
self._run()
def _run(self) -> bool:
- for address, uuid in self.get_option('services'):
- device = self.parent.Manager.find_device(address)
- if device is None or device.get("Connected"):
+ logging.debug("Autoconnect run")
+ for object_path, uuid in self.get_option('services'):
+ device = Device(obj_path=object_path)
+ try:
+ address = device["Address"]
+ except BluezDBusException:
+ address = None
+
+ if address is None or device.get("Connected"):
continue
def reply(dev: Optional[Device] = device, service_name: str = ServiceUUID(uuid).name) -> None:
assert isinstance(dev, Device) # https://github.com/python/mypy/issues/2608
+ logging.debug(f"Autoconnect {dev.display_name}")
Notification(_("Connected"), _("Automatically connected to %(service)s on %(device)s") %
{"service": service_name, "device": dev.display_name},
icon_name=dev["Icon"]).show()
def err(_reason: Union[Exception, str]) -> None:
+ logging.debug("Autoconnect failed")
pass
self.parent.Plugins.DBusService.connect_service(device.get_object_path(), uuid, reply, err) |
Beta Was this translation helpful? Give feedback.
Unfortunately it looks like this broke at some point. Below patch with debug logging should fix this. Can you check if it does for you @Renegat27 . If it does I'll submit a PR for review.