Describe the bug
I have installed the 0.12 toolBLEx flatpak version from Flathub (IMHO it should be the flatpak version at commit 121003c55b9c52223b4545af5210457aaddc9eca
).
Out-of-the-box / without any flatpak security changes, this flatpak version did not work with Bluetooth, i.e. did not list Bluetooth devices (which on the other hand my operating system (Debian 12 bookworm under KDE 5 Plasma, Wayland) can see and interact with):
$ flatpak run io.emeric.toolblex
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
qrc:/qml/PanelDeviceInfos.qml:94:21: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/AdapterWidget.qml:137:13: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/AdapterWidget.qml:83:13: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/PanelDeviceInfos.qml:266: TypeError: Cannot read property 'pairingStatus' of null
qrc:/qml/PanelDeviceInfos.qml:346: TypeError: Cannot read property 'majorClass' of null
qrc:/qml/PanelDeviceInfos.qml:371: TypeError: Cannot read property 'majorClass' of null
qrc:/qml/PanelDeviceInfos.qml:386: TypeError: Cannot read property 'servicesCount' of null
qrc:/qml/PanelDeviceInfos.qml:396: TypeError: Cannot read property 'serviceClass' of null
qrc:/qml/PanelDeviceInfos.qml:629: TypeError: Cannot read property 'mtu' of null
qrc:/qml/PanelDeviceInfos.qml:675: TypeError: Cannot read property 'rssi' of null
qrc:/qml/PanelDeviceInfos.qml:821: TypeError: Cannot read property 'servicesCount' of null
qt.bluetooth.bluez: Cannot open HCI socket: "Address family not supported by protocol"
qt.bluetooth.bluez: Cannot determine bluetoothd version and required Bluetooth HCI ioctols
qt.bluetooth.bluez: Disabling Qt Bluetooth LE feature
qt.bluetooth.bluez: Cannot open HCI socket
qrc:/qml/ButtonScanMenu.qml:44: ReferenceError: getDeviceStatusIcon is not defined
qrc:/qml/ButtonScanMenu.qml:44: ReferenceError: getDeviceStatusIcon is not defined
qt.bluetooth.bluez: l2cp socket not initialised
Device::deviceErrored( "XX:XX:XX:XX:XX:XX" ) error: QLowEnergyController::ConnectionError
Using Flatseal, I gave toolBLEx a bunch of additional permissions. The additional permissions are:
share=network
socket=session-bus
socket=system-bus
device=all
With the permissions already set up in the flathub version release, in sum the permissions look like this:
$ flatpak info --show-permissions io.emeric.toolblex
[Context]
shared=network;ipc;
sockets=x11;wayland;session-bus;system-bus;fallback-x11;
devices=dri;all;
features=bluetooth;
[System Bus Policy]
org.bluez=talk
Also, for portals, I allowed "can run in the backgorund" and "can send notifications":
$ flatpak permission-show io.emeric.toolblex
Table Object App Permissions Data
background background io.emeric.toolblex yes 0x00
notifications notification io.emeric.toolblex yes 0x00
With these additional permissions, toolBLEx does find Bluetooth devices:
$ flatpak run io.emeric.toolblex
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
qrc:/qml/PanelDeviceInfos.qml:94:21: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/AdapterWidget.qml:137:13: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/AdapterWidget.qml:83:13: QML TextSelectable: Binding loop detected for property "implicitWidth"
qrc:/qml/PanelDeviceInfos.qml:266: TypeError: Cannot read property 'pairingStatus' of null
qrc:/qml/PanelDeviceInfos.qml:346: TypeError: Cannot read property 'majorClass' of null
qrc:/qml/PanelDeviceInfos.qml:371: TypeError: Cannot read property 'majorClass' of null
qrc:/qml/PanelDeviceInfos.qml:386: TypeError: Cannot read property 'servicesCount' of null
qrc:/qml/PanelDeviceInfos.qml:396: TypeError: Cannot read property 'serviceClass' of null
qrc:/qml/PanelDeviceInfos.qml:629: TypeError: Cannot read property 'mtu' of null
qrc:/qml/PanelDeviceInfos.qml:675: TypeError: Cannot read property 'rssi' of null
qrc:/qml/PanelDeviceInfos.qml:821: TypeError: Cannot read property 'servicesCount' of null
That is, the following error messages no longer show up:
qt.bluetooth.bluez: Cannot open HCI socket: "Address family not supported by protocol"
qt.bluetooth.bluez: Cannot determine bluetoothd version and required Bluetooth HCI ioctols
qt.bluetooth.bluez: Disabling Qt Bluetooth LE feature
qt.bluetooth.bluez: Cannot open HCI socket
qrc:/qml/ButtonScanMenu.qml:44: ReferenceError: getDeviceStatusIcon is not defined
qrc:/qml/ButtonScanMenu.qml:44: ReferenceError: getDeviceStatusIcon is not defined
qt.bluetooth.bluez: l2cp socket not initialised
Device::deviceErrored( "XX:XX:XX:XX:XX:XX" ) error: QLowEnergyController::ConnectionError
The error messages qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. ...
and all qrc:/qml/...
error messages are probably irrelevant for this issue;
Expected behavior
toolBLEx flatpak version works with Bluetooth out of the box
To Reproduce
Steps to reproduce the behavior:
# DON'T have lingering flatpak toolBLEx configurations from previous installations
flatpak install flathub io.emeric.toolblex
flatpak run io.emeric.toolblex
Screenshots
If applicable, add screenshots to help explain your problem.
(I don't add a screenshot, because I don't want to jinx my working installation)
Your environment
Please describe the environment you are using:
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.7.12+bpo-rt-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7640U w/ Radeon 760M Graphics
Memory: 27,2 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A5
-
Where did you download/bought the application
from flathub ( https://flathub.org/apps/io.emeric.toolblex ) via flatpak install flathub io.emeric.toolblex
-
The version of the application you are running
$ flatpak info io.emeric.toolblex
toolBLEx - Bluetooth device scanner and analyzer
ID: io.emeric.toolblex
Ref: app/io.emeric.toolblex/x86_64/stable
Arch: x86_64
Branch: stable
Version: 0.12
License: GPL-3.0+
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 136.2 MB
Runtime: org.freedesktop.Platform/x86_64/23.08
Sdk: org.freedesktop.Sdk/x86_64/23.08
Commit: 3bbe0b9bd4b84b93b456f6926f15c5968424daa2245eb354e20dd19d2213e3c0
Parent: b1acbc3de4fc93cc3191e1ef7be22d625ecbfd2090255435d1c4a84aa0e90aa6
Subject: Add back shadertools (121003c5)
Date: 2024-06-20 11:24:11 +0000
Additional context
Add any other context about the problem here.