Cannot connect through WiFi my Mobile Phone (Android Samsung S24 Ultra) with KDE Connect on Cachy Os. Brand New OS install. But it works with Bluetooth

I was wondering if someone could give me a hand with this problem I am having. When trying to connect my mobile device with KDE Connect using WiFi I cannot pair the mobile device with the CachyOS PC (I have already tried setting up the firewall with the correct settings, ports, etc.), even disabling the firewall doesn’t work. Now I did try enabling the Bluetooth (beta) option and after pairing both devices via Bluetooth it does work. I would like to know if someone could help with the WiFi portion of this issue, I am open to provide logs, or anything needed. Also there is no SSID Isolation enabled on my router, and yes both the PC and the Android Phone are connected via WiFi to the same network.

Could you tell us the kdeconnect version on your mobile and your CachyOS ?

Firstly are both using the same network?

Secondly I occasionally have an issue where they won’t connect, but turning off the wifi on the mobile then re-enabling it 20 seconds later seems to reset things and it works.

Also make sure KDE Connect app on your phone isn’t being battery optimized (settings>apps>kde connect>Battery>Set it to unrestricted)

My KDE Connect version on the PC is 26.04.0 and on the Mobile Phone is 1.35.5

Hello smash and thank you for replying, as mentioned in the post, both devices are in the same network. I made the changes you suggested in the Mobile App, and here are my Firewall settings:

What do you get for:

sudo netstat -tunelp | grep -i kdeconnect

and

netcat -z -v <your-phones-ip> 1714-1764

I couldn’t use netstat but I used ss instead here are the results:

❯ sudo ss -tunelp | grep -i kdeconnect
udp   UNCONN 0      0                  *:1716             *:*    users:(("kdeconnectd",pid=3531,fd=18)) uid:1000 ino:150586 sk:2016 cgroup:/user.slice/user-1000.slice/user@1000.service/app.slice/app-dbus\x2d:1.2\x2dorg.kde.kdeconnect.slice/dbus-:1.2-org.kde.kdeconnect@0.service v6only:0 <->
tcp   LISTEN 0      50                 *:1716             *:*    users:(("kdeconnectd",pid=3531,fd=19)) uid:1000 ino:150587 sk:300d cgroup:/user.slice/user-1000.slice/user@1000.service/app.slice/app-dbus\x2d:1.2\x2dorg.kde.kdeconnect.slice/dbus-:1.2-org.kde.kdeconnect@0.service v6only:0 <->

I get “unkown command” for netcat. Sorry I am not an experienced Linux user, I am still learning

Wait I was able to get netcat installed:

❯ netcat -z -v 200.200.192.159 1714-1764
netcat: connect to 200.200.192.159 port 1714 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1715 (tcp) failed: Connection refused
Connection to 200.200.192.159 1716 port [tcp/xmsg] succeeded!
Connection to 200.200.192.159 1717 port [tcp/fj-hdnet] succeeded!
netcat: connect to 200.200.192.159 port 1718 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1719 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1720 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1721 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1722 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1723 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1724 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1725 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1726 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1727 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1728 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1729 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1730 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1731 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1732 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1733 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1734 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1735 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1736 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1737 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1738 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1739 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1740 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1741 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1742 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1743 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1744 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1745 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1746 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1747 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1748 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1749 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1750 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1751 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1752 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1753 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1754 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1755 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1756 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1757 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1758 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1759 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1760 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1761 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1762 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1763 (tcp) failed: Connection refused
netcat: connect to 200.200.192.159 port 1764 (tcp) failed: Connection refused

It appears that your mobile and your PC communicate :
Connection to 200.200.192.159 1716 port [tcp/xmsg] succeeded!

If you have disabled the FW (ufw for you) and if you can’t connect the PC and the mobile, the problem lies elsewhere. According to your netcat command, is your network’s IP address 200.200.192.x?

That is correct, that is my network’s IP address and yes even with my FireWall disable I cannot connect my phone with CachyOs without Bluetooth

As @alfred07 said, your PC and mobile can communicate and is using port 1716 so the network and firewall are not the issue.

On your mobile do you have anything listed in “KDE Connect>Settings>Trusted Networks”?

Can you get it to work by adding your PC manually via the android app “Settings>Add devices by IP”?

See that : KDE - ArchWiki

You have too CachyOS forum : Search results for 'kdeconnect' - CachyOS Forum

Not even adding the ip manually, it still doesn’t work.

Your pc and your mobile are on the same network.

A lan ? A wan ? Because your ip doesn’t look like a lan.

Yes both my PC and my mobile are in the same network, I changed the IP of my network on my router configuration to avoid conflicts with my work PC that uses 192.182.xxx.xxx

Sorry I didn’t notice this before. This is potentially the problem. The IP you’re using is not in the reserved private network range (List of reserved IP addresses - Wikipedia). Either your PC or mobile are likely getting confused between your local network and a device apparently in Rio de Janeiro.

Reconfigure your network to use private network addresses (10.0.0.0–10.255.255.255) or (192.168.0.0–192.168.255.255). If your network is configured correctly you shouldn’t have an issue with conflicts unless you’re hard coding IP addresses into something or you’re trying to connect to 2 networks at the same time which will have other security implications of it’s own.

OMG that fixed it, sorry for being such a troublemaker with this issue, I just changed the IP address of my lan in the router and suddenly everything worked!!! I would have never found the solution to this problem myself. Thank you @smash and @alfred07 for your dedication and assistance