Bug 512315

Summary: Neither side of KDE Connect can find (discover) the other
Product: [Applications] kdeconnect Reporter: John <ilikefoss>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal CC: andrew.g.r.holmes
Priority: NOR    
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description John 2025-11-18 22:30:29 UTC
SUMMARY
Neither side (the Android one or the Linux / Plasma one) of KDE Connect can find (discover) the other.

STEPS TO REPRODUCE
1. Use  a mobile phone with Lineage OS 23.0 (Android 16).
2. Install F-droid.
3. From F-droid, install KDE Connect app.
4. Open Plasma's KDE Connect program.
5. Open Android's KDE Conect app.
6. Try on both of them to see if they see each other.

OBSERVED RESULT
Even though both devices are connected to the same Wi-Fi network, they could not see each other, from either side.

EXPECTED RESULT
They see each other, at least from one side, so I can send a pairing request to the other side.


SOFTWARE/OS VERSIONS
Linux
KDE Plasma Version: 6.5.2 
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
KDE Connect (on the laptop): 25.08.1
KDE Connect (on the phone): 1.34.3

HARDWARE VERSIONS
ISP provided router: TP-Link EX220 v1.0 (AP Isolation: Not enabled)

ADDITIONAL INFORMATION
On the laptop no firewall is installed. I checked with Nala (Apt front-end) if firewalld, ufw, opensnitch are installed and I got confirmation that neither of the 3 was installed.

On the phone, a firewall is installed and running and that's AFWall+ (from F-droid too):
https://f-droid.org/en/packages/dev.ukanth.ufirewall/
I have been using it for 10-15 years, until about 2 years ago, when I switched to NetGuard (from F-droid too), that doesn't require superuser (root) permission because it just uses a VPN to work, so it works on all phones.

But I have reverted back to AFWall+ because of NetGuard requiring a VPN, I cannot set up a WireGuard tunnel home or to some other place, as that requires a VPN too and it's impossible to have 2 on Android.
AFWall+ requires superuser (root) permission, which LineageOS has as I have installed at the end of the flashing process also the Magisk add-on, which gives this superuser (root) management for apps that request it and I allow it, which I did for AFWall+.
So AFWall+ has everything it needs and works correctly!
I have created a rule in AFWall+ for KDE Connect app to have the permission to talk on the local network (LAN permission only).
Like I have given it in the past and like I give to Kore too (Kodi's remote) because both KDE Connect and Kore apps should work only in the LAN and this permission in AFWall+ was enough in the past.

After a few minutes of trying and waiting, I have managed to make the connection work by entering the IP address of the laptop in the KDE Connect app for Android, so the rule in the firewall works and it lets KDE Connect on Android talk with the computer just fine.

The only problem is the discovery that remains and for which I opened this bug report!
As I think that should be solved too, even when the user is a power user on Android too and has installed some firewalls, like I did.
And if the firewalls on either side are the problem, then a few informative messages should be added to either or both the KDE connect sides to inform the user what should be allowed through firewall besides the obvious KDE Connect.
AFWall+ allows you to also set the rules for system apps / tools, if you  go to:
Hamburger (3 vertical dots) menu -> Preferences -> UI Preferences -> Tick (check the "Show filters" checkbox.
So I can let other core / system things to go through firewall that KDE Connect needs calls from the system, but I don't know what as there is not info anywhere about that.
Can you please tell me what KDE Connect for Android (in this case the version from F-droid) calls for discovering the computers running Plasma?
As the app is not saying when it's search for devices and I've seen no hints appearing saying it either.
I would like to enable that too in the AFWall+ application firewall, to see if that's the dependency that needs to be allowed in firewall too, so that it fixes this discovery problem.