I’m trying to get kdeconnect working over bluetooth on nixos. The hardware.bluetooth is enabled and I am able to pair my phone but I am unable to see it in kdeconnect. Is it working for someone else?
kdeconect works via networking, not bluetooth. Your phone and kdeconnect need to be on the same (wifi) network.
Kdeconnect has a bluetooth backend as well. I am in a uni and since the uni wifi is eduroam (isolated clients), I am unable to connect with my phone over wifi.
I tried zerotier and tailscale, but it’s a hit and miss with kdeconnect. There are times when kdeconnect won’t detect my linux machine for days, idk why. Bluetooth sounds like a nice alternative but I am unable to get it working on nixos. Here’s an article on this KDE Connect over Bluetooth and a forum Make KDE Connect work with Bluetooth • KDE Community Forums
kdeconnect needs to be compiled with BLUETOOTH_ENABLED=ON
in order to work which ours isn’t. PR?
Is it possible to test this on my system? Idk which attributes to override.
Edit: I came up with this, but I am receiving an error.
(libsForQt5.kdeconnect-kde.overrideAttrs (oldAttrs: {
cmakeFlags = ["-DBLUETOOTH_ENABLED=ON"];
}))
But I am getting this error:
CMake Error at /nix/store/0p9j1kpywyy00126mn46ck7wn4qinpr5-qtbase-5.15.7-dev/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
By not providing "FindQt5Bluetooth.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Bluetooth", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Bluetooth" with
any of the following names:
Qt5BluetoothConfig.cmake
qt5bluetooth-config.cmake
Add the installation prefix of "Qt5Bluetooth" to CMAKE_PREFIX_PATH or set
"Qt5Bluetooth_DIR" to a directory containing one of the above files. If
"Qt5Bluetooth" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
core/CMakeLists.txt:23 (find_package)
-- Configuring incomplete, errors occurred!
See also "/build/kdeconnect-kde-22.08.3/build/CMakeFiles/CMakeOutput.log".
Need to add the dependency containng Qt5Bluetooth:
pkgs.libsForQt5.kdeconnect-kde.overrideAttrs (oldAttrs: {
buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.libsForQt5.qtconnectivity ];
cmakeFlags = (oldAttrs.cmakeFlags or []) ++ [ "-DBLUETOOTH_ENABLED=ON" ];
})
@raphi was able to compile, but still can’t find the device.
I think we need the PAN support for bluetooth to make it work Make KDE Connect work with Bluetooth • KDE Community Forums but blueman does not find the net-tools in path.
g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.Failed: Traceback (most recent call last):
File "/nix/store/bkb1z2lwy4fqzf8qxabwc0a5sfdn7c1m-blueman-2.3.4/lib/python3.10/site-packages/blueman/main/DbusService.py", line 156, in _handle_method_call
ok(method(*args))
File "/nix/store/bkb1z2lwy4fqzf8qxabwc0a5sfdn7c1m-blueman-2.3.4/lib/python3.10/site-packages/blueman/plugins/mechanism/Network.py", line 53, in _enable_network
nc.apply_settings()
File "/nix/store/bkb1z2lwy4fqzf8qxabwc0a5sfdn7c1m-blueman-2.3.4/lib/python3.10/site-packages/blueman/main/NetConf.py", line 426, in apply_settings
raise NetworkSetupError(
blueman.main.NetConf.NetworkSetupError: Neither ifconfig or ip commands are found. Please install net-tools or iproute2
(0)
That’s separate from KDEConnect over Bluetooth (based on my limited understanding of the subject matter.