KDE Connect

$ ps -ef | grep kdeconnect
paulh 1210 1 0 18:20 ? 00:00:00 /usr/lib/kdeconnectd
paulh 6891 6882 0 18:34 pts/1 00:00:00 grep kdeconnect
[paulh@hplaptop ~]$
[paulh@hplaptop ~]$ sudo netstat -tunelp | grep -i kdeconnect
[sudo] password for paulh:
tcp6 0 0 :::1716 :::* LISTEN 1000 26565 1210/kdeconnectd
udp6 0 0 :::1716 :::* 1000 26564 1210/kdeconnectd
[paulh@hplaptop ~]$ netcat -z -v 1714-1764
Error: Couldn’t resolve host “1714-1764”
[paulh@hplaptop ~]$ ls -al /home//.config/kdeconnect/
ls: cannot access ‘/home//.config/kdeconnect/’: No such file or directory

I have an Huawei Mate 10 Pro and I know that Huawei has aggressive battery killing functionality built in. Make sure you turn off the Power battery saving option for KDE Connect app. Just a thought.

Hm, it’s been a while since I put this together, looks like it need’s an update, and a bit more detail.

netcat needs an IP address, run it twice, first you check if the ports on your PC are responding, and second you check if you can reach your phone:

$ netcat -z -v 175.0.0.200 1714-1764
Warning: Host 175.0.0.200 isn't authoritative! (direct lookup mismatch)
  175.0.0.200 -> hermes  BUT  hermes -> 127.0.0.1
175.0.0.200 1716 (xmsg) open

$ netcat -z -v 175.0.0.202 1714-1764
TZS7.lan [175.0.0.202] 1716 (xmsg) open

Sorry, a little typo:

ls -al /home//.config/kdeconnect/

Put your username between the two // or maybe even better use:

ls -al ~/.config/kdeconnect/
drwxr-xr-x 1 thomas users 86 Sep 4 2019 1edda4c75137ff77
drwxr-xr-x 1 thomas users 74 Aug 1 2019 3581bcf30289c407
drwxr-xr-x 1 thomas users 128 Aug 1 2019 64764113419d39ef
drwxr-xr-x 1 thomas users 166 Feb 13 2020 f1dee369be453a02
-rw------- 1 thomas users 1220 Aug 1 2019 certificate.pem
-rw-r–r-- 1 thomas users 22 Aug 1 2019 config
-rw------- 1 thomas users 1704 Aug 1 2019 privateKey.pem
-rw-r–r-- 1 thomas users 2356 Mär 25 16:00 trusted_devices

What’s in your directory?

What does kdeconnect-cli show?

kdeconnect-cli -l
- Samsung SM-T830: 1edda4c75137ff77 (paired)
- Samsung SM-A520F: 4a5cd2573ae680c1 (reachable)
- Samsung@Samsung: _e30dc0cd_fffff_4908_85a9_c3042a3b50b7_ (reachable)
- Phone: f1dee369be453a02 (paired and reachable)
4 devices found

Screenshot_20200820_103716

No config file? Hm, try to rename the folder to let’s say kdeconnect.old and start all over = reboot
After the reboot a new folder should be created with hopefully a file called config. Mine looks like this:

cat ~/.config/kdeconnect/config
[General]
name=Hermes

Hermes is the name of my machine.
You can also check what’s in trusted_devices

cat ~/.config/kdeconnect/trusted_devices

It should have an entry for each device which has been connected in the past.

On reboot, the new .config/kdeconnect folder is there but doesn’t contain a config file.

Hm, I don’t have a scientific way to troubleshoot any more.
What happens when you open the KDEConnect User Interface and scan for devices? At some point the config file and settings need to be created.

Or try one of the kdeconnect-cli options to either provoke an error we can work with or get it to work

kdeconnect-cli --help

Try -a, --refresh, etc.

Hi TomZ

Thank you for all your interest so far.

Here is the results for kdeconnect-cli:
Screenshot_20200820_173637

As you can see I also tried with sudo. What does “Not connected to D-Bus server” mean???

Not sure but U guess kdeconnect is not supposed to run as root, hence you get an error when starting with sudo.
But I noticed you didn’t run the the netcat test. Can you look up the ip address of your machine and the one of your phone and try netcat with those two addresses as shown below, replacing my 175.0.0.200 with whatever your address is.

netcat -z -v 175.0.0.200 1714-1764

Response should be similar to my example higher up.
If this fails we may have a firewall issue.

Screenshot_20200820_183846

Thanks, I get sudo error. Always learning…

BTW, I uninstalled firewalld yesterday - could some of its configs still be active?

Dont think so. And your netcat response looks good anyway, doesn’t look like anything gets in the way.
Laptop responds on kdeconnect port and so does your phone.

I am running out of ideas :thinking:

OK TomZ.

I really appreciate the time you took for this.

If I solve it I’ll post it here.

All the best.

2 Likes

SOLVED, this morning.

In Android KDEConnect app; for Trusted Networks setting de-selected “All”; replaced with name of shared wi-fi network and connection is established.

Thank you everyone for your time and suggestions.

5 Likes