diff --git a/CHANGELOG.md b/CHANGELOG.md index 38c064525..4933a9eab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ * Store network configuration in GSettings instead of /var/lib/blueman/network.state. * Replace custom MessageArea widget with regular Gtk.InfoBar +### Bugs fixed + +* Issues with NM PANU connections of equally named devices + ## 2.3.1 ### Bugs fixed diff --git a/blueman/main/NetworkManager.py b/blueman/main/NetworkManager.py index 9426bda68..bc0910d8c 100644 --- a/blueman/main/NetworkManager.py +++ b/blueman/main/NetworkManager.py @@ -161,12 +161,13 @@ def store_uuid(self, conn_uuid: str) -> None: @property def connection_uuid(self) -> str: # PANU connections are automatically created so attempt to find it - # It appears the Name property is used not Alias! - conn = self.client.get_connection_by_id(f"{self.device['Name']} Network") res: str - if conn is not None: - conn_settings = conn.get_setting_connection() - res = conn_settings.get_uuid() + for conn in self.client.get_connections(): + bluetooth_setting = conn.get_setting_bluetooth() + if bluetooth_setting is not None and bluetooth_setting.get_bdaddr() == self.bdaddr: + conn_settings = conn.get_setting_connection() + res = conn_settings.get_uuid() + break else: res = self.Config['nmpanuuid'] return res