Giter Club home page Giter Club logo

mconnect's Introduction

mconnect

mconnect - KDE Connect protocol implementation in Vala/C

GLib and Gio should be available even on trimmed down systems. Vala is really needed only at build time. Json-glib does packet parsing. Libnotify is responsible for displaying shell popups.

Building

Build dependencies (using package names as found in Fedora):

  • vala
  • glib2-devel
  • gobject-introspection-devel
  • libgee-devel
  • json-glib
  • gnutls-devel
  • libnotify-devel
  • gtk3-devel
  • at-spi2-core-devel (and at-spi2-atk)
  • meson
  • pkg-config

or see extra/travis-build in the source tree for example installation commands. Once build deps are in place, run:

mkdir build
cd build
meson ..
ninja
ninja install
# to set a custom installation directory run:
#   DESTDIR=<somedir> ninja install

Configuration

NOTE: manual configuration file is no longer needed

A sample configuration file is provided in source tree, see mconnect.conf. It will get installed to ${datadir}/mconnect/ (usually corresponding to /usr/share/mconnect/) by default. Once mconnect starts it will pick the default file and make a copy of it in user's config directory, specifically ~/.config/mconnect/.

A device described in it's own group and listed in main.devices, has to match exactly with incoming identity packets. However, since deviceId is not known beforehand, neither shown in KDE Connect Android application, only name and type are used for matching.

Usage

mconnect comes are 2 separate programs, the daemon - mconnect and a D-Bus client mconnectctl.

The daemon

Start it by running:

$ mconnect -d

The daemon starts listens on 0.0.0.0:1714 for incoming UDP packets. Once an identity packet (a sort of a handshake) is received, a connection to the sender's address will be made. Known devices are cached in ~/.cache/mconnect/devices.

File sharing to a device requires TCP ports 9970-9975 to be open. Files shared from the device are saved to ~/Downloads/mconnect/.

The client

List discovered devices:

$ mconnectctl list-devices
Devices:
    /org/mconnect/device/0    673ac2db27d2a331 - Motorola Moto G Maciek

Accept a device (previously done only through the configuration):

$ mconnectctl allow-device /org/mconnect/device/0

Show device details:

$ mconnectctl show-device /org/mconnect/device/0
Device 
  Name: Motorola Moto G Maciek
  ID: 673ac2db27d2a331
  Address: 192.168.1.103:1716
  Type: phone
  Allowed: true
  Paired: true
  Active: true
  Connected: true

Share a file/URL/text:

$ mconnectctl share-file /org/mconnect/device/0 <path>
$ mconnectctl share-url /org/mconnect/device/0 www.google.com
$ mconnectctl share-text /org/mconnect/device/0 'battery horse staple'

DBus API

The API is not documented. Use D-Feet or busctl to introspect and invoke methods manually.

Gnome Shell

A Gnome Shell extension is available here: https://github.com/andyholmes/gnome-shell-extension-mconnect or via the GNOME extensions page: https://extensions.gnome.org/extension/1272/mconnect/

Firewalls

It may be required to either temporarily disable the firewall or open up UDP port 1714.

An example service definition for firewalld is provided in extra/firewalld/mconnect.xml directory. The file needs to be copied into /etc/firewalld/services.

Contributing

Please open a Pull Request with your changes. Feel free to ping me (@bboozzoo) in description.

mconnect's People

Contributors

3v1n0 avatar andyholmes avatar bboozzoo avatar donraphaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mconnect's Issues

Crash when paired with multiple devices

I'm running mconnect and I have it paired with multiple devices.

Steps to reproduce:

  • Run mconnect
  • Pair with Device A
  • Pair with Device B
  • So far, everything works
  • Restart the mconnect daemon
  • It crashes soon after startup

It looks like the reason for this is the MPRIS plugin. When the daemon starts, it connects to one device, which immediately sends it a kde.mpris.request packet. mconnect responds by sending a kde.mpris packet to all connected devices, including the one that isn't connected yet.

Error building on Arch.

Gives me a whole bunch of errors when I run ninja and fails,

[1/41] Compiling Vala source ../src/mconnect/main.vala ../src/mconnect/discovery.vala ../src/mconnect/packet.vala ../src/mconnect/device.vala ../src/mconnect/discovereddevice.vala ../src/mconnect/device-proxy.vala ../src/mconnect/devicemanager.vala ../src/mconnect/devicemanager-proxy.vala ../src/mconnect/devicechannel.vala ../src/mconnect/core.vala ../src/mconnect/packethandlerinterface.vala ../src/mconnect/packethandlerinterface-proxy.vala ../src/mconnect/packethandlers.vala ../src/mconnect/packethandlers-proxy.vala ../src/mconnect/notification.vala ../src/mconnect/battery.vala ../src/mconnect/battery-proxy.vala ../src/mconnect/telephony.vala ../src/mconnect/telephony-proxy.vala ../src/mconnect/mousepad.vala ../src/mconnect/ping.vala ../src/mconnect/ping-proxy.vala ../src/mconnect/config.vala ../src/mconnect/application.vala ../src/mconnect/utils.vala ../src/mconnect/property-proxy.vala ../src/mconnect/share.vala ../src/mconnect/share-proxy.vala ../src/mconnect/mpris.vala ../src/mconnect/mpris-proxies.vala ../src/mconnect/io-job.vala ../src/mconnect/transfer-manager.vala ../src/mconnect/transfer-manager-proxy.vala ../src/mconnect/transfer-interface.vala ../src/mconnect/transfer-proxy.vala ../src/mconnect/transfer-download.vala ../src/mconnect/transfer-upload.vala ../src/mconnect/logging.vala ../src/crypt/certificate.vala. FAILED: mconnect@exe/src/mconnect/main.c mconnect@exe/src/mconnect/discovery.c mconnect@exe/src/mconnect/packet.c mconnect@exe/src/mconnect/device.c mconnect@exe/src/mconnect/discovereddevice.c mconnect@exe/src/mconnect/device-proxy.c mconnect@exe/src/mconnect/devicemanager.c mconnect@exe/src/mconnect/devicemanager-proxy.c mconnect@exe/src/mconnect/devicechannel.c mconnect@exe/src/mconnect/core.c mconnect@exe/src/mconnect/packethandlerinterface.c mconnect@exe/src/mconnect/packethandlerinterface-proxy.c mconnect@exe/src/mconnect/packethandlers.c mconnect@exe/src/mconnect/packethandlers-proxy.c mconnect@exe/src/mconnect/notification.c mconnect@exe/src/mconnect/battery.c mconnect@exe/src/mconnect/battery-proxy.c mconnect@exe/src/mconnect/telephony.c mconnect@exe/src/mconnect/telephony-proxy.c mconnect@exe/src/mconnect/mousepad.c mconnect@exe/src/mconnect/ping.c mconnect@exe/src/mconnect/ping-proxy.c mconnect@exe/src/mconnect/config.c mconnect@exe/src/mconnect/application.c mconnect@exe/src/mconnect/utils.c mconnect@exe/src/mconnect/property-proxy.c mconnect@exe/src/mconnect/share.c mconnect@exe/src/mconnect/share-proxy.c mconnect@exe/src/mconnect/mpris.c mconnect@exe/src/mconnect/mpris-proxies.c mconnect@exe/src/mconnect/io-job.c mconnect@exe/src/mconnect/transfer-manager.c mconnect@exe/src/mconnect/transfer-manager-proxy.c mconnect@exe/src/mconnect/transfer-interface.c mconnect@exe/src/mconnect/transfer-proxy.c mconnect@exe/src/mconnect/transfer-download.c mconnect@exe/src/mconnect/transfer-upload.c mconnect@exe/src/mconnect/logging.c mconnect@exe/src/crypt/certificate.c valac -C --debug --debug --vapidir /home/farris/Downloads/mconnect/vapi --pkg posix --pkg gtk+-3.0 --pkg posix --pkg gnutls --pkg atspi-2 --pkg gdk-3.0 --pkg libnotify --pkg gee-0.8 --pkg json-glib-1.0 --pkg gio-unix-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory mconnect@exe --basedir ../ ../src/mconnect/main.vala ../src/mconnect/discovery.vala ../src/mconnect/packet.vala ../src/mconnect/device.vala ../src/mconnect/discovereddevice.vala ../src/mconnect/device-proxy.vala ../src/mconnect/devicemanager.vala ../src/mconnect/devicemanager-proxy.vala ../src/mconnect/devicechannel.vala ../src/mconnect/core.vala ../src/mconnect/packethandlerinterface.vala ../src/mconnect/packethandlerinterface-proxy.vala ../src/mconnect/packethandlers.vala ../src/mconnect/packethandlers-proxy.vala ../src/mconnect/notification.vala ../src/mconnect/battery.vala ../src/mconnect/battery-proxy.vala ../src/mconnect/telephony.vala ../src/mconnect/telephony-proxy.vala ../src/mconnect/mousepad.vala ../src/mconnect/ping.vala ../src/mconnect/ping-proxy.vala ../src/mconnect/config.vala ../src/mconnect/application.vala ../src/mconnect/utils.vala ../src/mconnect/property-proxy.vala ../src/mconnect/share.vala ../src/mconnect/share-proxy.vala ../src/mconnect/mpris.vala ../src/mconnect/mpris-proxies.vala ../src/mconnect/io-job.vala ../src/mconnect/transfer-manager.vala ../src/mconnect/transfer-manager-proxy.vala ../src/mconnect/transfer-interface.vala ../src/mconnect/transfer-proxy.vala ../src/mconnect/transfer-download.vala ../src/mconnect/transfer-upload.vala ../src/mconnect/logging.vala ../src/crypt/certificate.vala ../src/mconnect/core.vala:51.13-51.37: warning: unhandled error GLib.Error'
var cert = init_crypto ();
^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/utils.vala:117.13-117.74: warning: unhandled error GLib.Error' var tls_serv = TlsServerConnection.@new (sock_conn, self_cert); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/utils.vala:123.50-123.80: warning: unhandled error GLib.Error'
sock_conn.get_remote_address ());
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/utils.vala:122.24-123.81: warning: unhandled error GLib.Error' ../src/mconnect/device.vala:168.21-169.86: warning: unhandled error GLib.Error'
../src/mconnect/device.vala:620.13-620.25: warning: implicit .begin is deprecated
../src/mconnect/mousepad.vala:124.13-124.32: warning: Gdk.Display.get_pointer has been deprecated since 3.0
../src/mconnect/transfer-download.vala:159.9-159.28: warning: unhandled error GLib.Error' this.file.@delete (); ^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/utils.vala:186.13-186.23: warning: null' incompatible with return type string[]' return null; ^^^^^^^^^^^ ../src/mconnect/share.vala:108.13-108.54: warning: unhandled error GLib.Error'
AppInfo.launch_default_for_uri (url, null);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/transfer-upload.vala:74.19-74.44: warning: unhandled error GLib.Error' var isa = conn.get_remote_address () as InetSocketAddress; ^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/share.vala:191.13-191.19: warning: unhandled error GLib.Error'
throw e;
^^^^^^^
../src/mconnect/mpris-proxies.vala:22.5-22.39: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public abstract string[] list_names () throws IOError;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/mpris-proxies.vala:36.5-36.29: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public abstract void next () throws IOError;
^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/mpris-proxies.vala:37.5-37.33: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public abstract void previous () throws IOError;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/mpris-proxies.vala:38.5-38.35: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public abstract void play_pause () throws IOError;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/mpris-proxies.vala:39.5-39.29: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public abstract void seek (int64 Offset) throws IOError;
^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:71.5-71.23: error: Property DeviceDBusProxy.allowed' with custom get' accessor and/or set' mutator cannot have default' value
public bool allowed {
^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:79.5-79.25: error: Property DeviceDBusProxy.is_active' with custom get' accessor and/or set' mutator cannot have default' value
public bool is_active {
^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:63.5-63.25: error: Property DeviceDBusProxy.is_paired' with custom get' accessor and/or set' mutator cannot have default' value
public bool is_paired {
^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:27.5-27.20: error: Property DeviceDBusProxy.id' with custom get' accessor and/or set' mutator cannot have default' value
public string id {
^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:35.5-35.22: error: Property DeviceDBusProxy.name' with custom get' accessor and/or set' mutator cannot have default' value
public string name {
^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:43.5-43.29: error: Property DeviceDBusProxy.device_type' with custom get' accessor and/or set' mutator cannot have default' value
public string device_type {
^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:51.5-51.32: error: Property DeviceDBusProxy.protocol_version' with custom get' accessor and/or set' mutator cannot have default' value
public uint protocol_version {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:273.9-273.53: warning: unhandled error GLib.IOError' handler.bus_register (conn, this.object_path); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/device-proxy.vala:284.13-284.41: warning: unhandled error GLib.IOError'
handler.bus_unregister (conn);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/share-proxy.vala:41.5-41.26: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public void share_file (string path) throws IOError {
^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/share-proxy.vala:45.5-45.25: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public void share_url (string url) throws IOError {
^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/share-proxy.vala:50.5-50.26: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public void share_text (string text) throws IOError {
^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/telephony-proxy.vala:41.5-41.24: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public void send_sms (string number, string message) {
^^^^^^^^^^^^^^^^^^^^
../src/mconnect/devicemanager-proxy.vala:158.13-158.53: warning: unhandled error GLib.IOError' h.bus_register (this.bus, dp.object_path); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/devicemanager-proxy.vala:67.5-67.28: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError' public void allow_device (string path) { ^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/devicemanager-proxy.vala:86.5-86.31: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError' public void disallow_device (string path) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/devicemanager-proxy.vala:104.5-104.36: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError' public ObjectPath[] list_devices () { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../src/mconnect/transfer-proxy.vala:39.28-39.72: warning: unhandled error GLib.IOError'
this.register_id = conn.register_object (this.object_path, this);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/transfer-proxy.vala:50.5-50.22: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public void cancel () {
^^^^^^^^^^^^^^^^^^
../src/mconnect/transfer-manager-proxy.vala:52.5-52.33: warning: DBus methods are recommended to throw at least GLib.Error' or GLib.DBusError, GLib.IOError'
public ObjectPath[] list_jobs () {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 7 error(s), 30 warning(s)
ninja: build stopped: subcommand failed.
`

Wayland mouse movement

The official KDE Connect has problems with Wayland currently, so one cannot move the mouse when trying to remote control it via the phone.
I can click and use keyboard input, but moving the cursor does not work.

So what about your version? As it seems to be written for GNOME mainly, and GNOME makes use of Wayland quite often and has a good compatibility, this feature should be added here, too.

Failed to send .mp4 video file from PC to phone.

Execute mconnectctl share-file /org/mconnect/device/0 /tmp/download/八段锦.mp4

Got this error:

** (mconnectctl:13429): CRITICAL **: 11:35:54.691: file ../src/mconnectctl/main.vala: line 79: unexpected error: Invalid byte sequence in conversion input (g_convert_error, 1)

Change the filename to 7.mp4, and the transfer finished successfully but I can't find the video file in the phone. The last messages of mconnect -d is:

** (mconnect:12259): DEBUG: 11:28:30.475: transfer-upload.vala:115: progress: 38.3 MB/38.3 MB 99%
** (mconnect:12259): DEBUG: 11:28:30.476: transfer-upload.vala:115: progress: 38.3 MB/38.3 MB 100%
** (mconnect:12259): DEBUG: 11:28:30.476: io-job.vala:64: transfer done, got 38.3 MB bytes
** INFO: 11:28:30.476: transfer-upload.vala:127: transfer finished
** (mconnect:12259): DEBUG: 11:28:30.476: transfer-upload.vala:130: transfer done, got 38.3 MB
** (mconnect:12259): DEBUG: 11:28:30.486: transfer-proxy.vala:45: unregister transfer at path /org/mconnect/transfer/0

So,

  1. Hope mconnectctl can support Unicode filenames with multi-byte characters.
  2. Why failed to save video file to phone? Is it a problem of kde-connect app?

autotools to meson build - upgrade

Hello guys,

I'd like to create Gentoo ebuild for mconnect (since I didn't found any). Before I'll start making it, would you guys consider moving to Meson build system [1] (as successor of automake ugly things?).

  • In case you do, I'll wait little bit.
  • If you not willing to do it, but you accept pull request, I can do it (it will take more time, but still good way to go)
  • in scenario when you'll reject Meson work, I'll just create ebuild based on old autotools..

Thanks
David

[1] https://blogs.gnome.org/mclasen/2017/04/20/meson-considerations/

Compile on Ubuntu

I don't manage to find the proper apt repos dependency to build this. Can we have some guidance about it please?

Another Ubuntu compilation problem

According to the instructions provided by @andyholmes at #20 I run into a roadblock at this step:

autoreconf -if

Which then spits out this error:

autoreconf: 'configure.ac' or 'configure.in' is required

Which means... File Not Found.

So... what should I do? If autoreconf needs a configure.ac or configure.in file... I cannot do anything.

Please help

sms-send

Both
mconnectctl send-sms phone_number text
and
mconnectctl send-sms /org/mconnect/device/0 phone_number text
main.vala: line 79: unexpected error: Invalid byte sequence in conversion input (g_convert_error, 1)

Copr repo for Fedora 25

Hi bboozzoo, thanks for your work! I've noticed your Copr repo for Fedora 23, 24, and 26. Would a repo for Fedora 25 be possible? I'm there now, since it's the latest version, and would like to test this. BTW, does it work with the kde connect android app?

Segfaults on every operation

I installed mconnect yesterday and it worked well, but today core dumps on every communication operation.

Linux: Linux 5.10.7-arch1-1
mconnect: 409.210b435-1 (? from AUR mconnect-git)
Peer: KDE Connect 1.16.0

As I mentioned, yesterday I was able to pair my Android device and send data in both directions. The laptop has been slept and woken since, and since then mconnect segfaults on any attempt to use mconnectctl. For example:

10068» mconnectctl list-devices                                                            ~
Devices:
    /org/mconnect/device/0    0a70a54d6c4d25ca - Pixel 2
10069» mconnectctl -v -d share-url /org/mconnect/device/0 https://www.google.com           ~
** (mconnectctl:1170476): DEBUG: 12:59:22.209: main.vala:120: command is: share-url
** (mconnectctl:1170476): DEBUG: 12:59:22.210: main.vala:128: found match for share-url, args expect: 2, have: 2
** (mconnectctl:1170476): DEBUG: 12:59:22.210: main.vala:138: running callback

** (mconnectctl:1170476): WARNING **: 12:59:22.383: main.vala:272: communication with service failed: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

and in the mconnect:

** (mconnect:1170280): DEBUG: 12:58:28.711: share-proxy.vala:46: share url https://www.google.com
** (mconnect:1170280): DEBUG: 12:58:28.711: share.vala:157: share url https://www.google.com to device 0a70a54d6c4d25ca-Pixel 2-phone-7
** (mconnect:1170280): DEBUG: 12:58:28.711: devicechannel.vala:229: send data: {"type":"kdeconnect.share.request","id":1611428308711,"body":{"url":"https://www.google.com"}}

**
ERROR:../src/mconnect/devicechannel.vala:231:device_channel_send_co: assertion failed: (this._dout != null)
Bail out! ERROR:../src/mconnect/devicechannel.vala:231:device_channel_send_co: assertion failed: (this._dout != null)
[1]    1169559 abort (core dumped)  mconnect

I'm also now unable to see mconnect from the phone, or unpair, or reconnect. mconnectctl says the device is not connected:

10076» mconnectctl show-device /org/mconnect/device/0                                      ~
Device
  Name: Pixel 2
  ID: 0a70a54d6c4d25ca
  Address: 192.168.50.121:1716
  Type: phone
  Allowed: true
  Paired: true
  Active: true
  Connected: false

Is the expected behavior a core dump, even when mconnect thinks it can't see the peer? The IP addresses of both devices haven't changed since yesterday, and I can still run an FTP server on the phone and connect to it from the laptop, so they can see each other. Is there any way to figure out why mconnect isn't seeing or answering the peer -- aside from packet sniffing?

Cannot pair with GSConnect

I'm attempting to pair a device running mconnect with a separate device running GSConnect. I solved my first problem in #51. After that, the first time I pair the device (using mconnectctl) it works correctly. However, if I restart the mconnect daemon, it gets stuck in a loop of sending and receiving pair packets:

** (mconnect:414689): DEBUG: 04:29:25.394: devicechannel.vala:283: check for IO, conditions: 0x1
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.394: SERVER[0xaaaae4ba0410]: starting to read data from TLS connection
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.395: SERVER[0xaaaae4ba0410]: claiming operation OP_READ
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.395: SERVER[0xaaaae4ba0410]: claiming operation OP_READ succeeded
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.395: SERVER[0xaaaae4ba0410]: yielding operation OP_READ
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.395: SERVER[0xaaaae4ba0410]: successfully read 67 bytes from TLS connection
** (mconnect:414689): DEBUG: 04:29:25.395: received line: {"id":1594873765372,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:414689): DEBUG: 04:29:25.395: packet type: kdeconnect.pair
** (mconnect:414689): DEBUG: 04:29:25.395: got packet
** (mconnect:414689): DEBUG: 04:29:25.395: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:414689): DEBUG: 04:29:25.396: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:414689): DEBUG: 04:29:25.396: device.vala:275: start pairing
** (mconnect:414689): DEBUG: 04:29:25.396: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1594873765396,"body":{"pair":true}}

(mconnect:414689): GLib-Net-DEBUG: 04:29:25.396: SERVER[0xaaaae4ba0410]: starting to write 67 bytes to TLS connection
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.396: SERVER[0xaaaae4ba0410]: claiming operation OP_WRITE
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.396: SERVER[0xaaaae4ba0410]: claiming operation OP_WRITE succeeded
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.396: SERVER[0xaaaae4ba0410]: yielding operation OP_WRITE
(mconnect:414689): GLib-Net-DEBUG: 04:29:25.396: SERVER[0xaaaae4ba0410]: successfully write 67 bytes to TLS connection
** INFO: 04:29:25.396: devicemanager.vala:190: device 4ca325d8-9f98-40c6-bb36-0ca26e2c6510-jamesdesktop-desktop-7 pair status change: true
** (mconnect:414689): DEBUG: 04:29:25.397: cache file: /home/mobian/.cache/mconnect/devices

Error during build: `Regex' is an ambiguous reference between `GLib.Regex' and `Posix.Regex'

I'm getting the following error when trying to build:

$ ninja
[1/57] Compiling Vala source ../test/mconn-utils-test.vala ../src/mconnect/utils.vala ../src/mconnect/logging.vala
FAILED: test-mconn-utils.p/test/mconn-utils-test.c test-mconn-utils.p/src/mconnect/utils.c test-mconn-utils.p/src/mconnect/logging.c
valac -C --debug --debug --vapidir /media/hdd/humbertofraga/local/mconnect/vapi --pkg libnotify --pkg posix --pkg gio-unix-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory test-mconn-utils.p --basedir ../ ../test/mconn-utils-test.vala ../src/mconnect/utils.vala ../src/mconnect/logging.vala
../src/mconnect/utils.vala:163.4-163.8: error: `Regex' is an ambiguous reference between `GLib.Regex' and `Posix.Regex'
			Regex r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+,.~#?&\/=]*)/;
			^^^^^
../src/mconnect/utils.vala:183.18-183.27: error: `RegexError' is an ambiguous reference between `GLib.RegexError' and `Posix.RegexError'
        } catch (RegexError e) {
                 ^^^^^^^^^^
Compilation failed: 2 error(s), 0 warning(s)

Any workaround this error?

mconnect creates and renames files non-stop in `~/.cache/mconnect`

I noticed heavy usage of my drive, caused by mconnect

% { strace mconnect } 2>&1| grep --line-buffered .cache/mconnect/devices....... | pv >/dev/null
30,0KiB 0:00:01 [30,0KiB/s] [  <=>                                                                                                                 ]

Sample log:

...
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.UYPW61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.UYPW61", "/home/moviuro/.cache/mconnect/devices") = 0
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.JXTW61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.JXTW61", "/home/moviuro/.cache/mconnect/devices") = 0
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.X8LW61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.X8LW61", "/home/moviuro/.cache/mconnect/devices") = 0
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.6POW61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.6POW61", "/home/moviuro/.cache/mconnect/devices") = 0
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.9BRV61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.9BRV61", "/home/moviuro/.cache/mconnect/devices") = 0
openat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices.SHKV61", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 13
newfstatat(AT_FDCWD, "/home/moviuro/.cache/mconnect/devices", {st_mode=S_IFREG|0644, st_size=6534, ...}, AT_SYMLINK_NOFOLLOW) = 0
rename("/home/moviuro/.cache/mconnect/devices.SHKV61", "/home/moviuro/.cache/mconnect/devices") = 0
...
% mconnect -d
...
** INFO: 15:25:30.795: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.798: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.798: devicechannel.vala:270: received line: {"id":1687267531432,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.798: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.798: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.798: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.798: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530798,"body":{"pair":true}}

** INFO: 15:25:30.798: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.803: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.803: devicechannel.vala:270: received line: {"id":1687267531434,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.803: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.803: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.803: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.803: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530803,"body":{"pair":true}}

** INFO: 15:25:30.803: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.806: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.806: devicechannel.vala:270: received line: {"id":1687267531440,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.806: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.806: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.806: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.806: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530806,"body":{"pair":true}}

** INFO: 15:25:30.807: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.811: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.811: devicechannel.vala:270: received line: {"id":1687267531443,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.811: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.811: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.811: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.811: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530811,"body":{"pair":true}}

** INFO: 15:25:30.811: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.814: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.814: devicechannel.vala:270: received line: {"id":1687267531448,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.814: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.814: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.814: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.814: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530814,"body":{"pair":true}}

** INFO: 15:25:30.814: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.820: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.820: devicechannel.vala:270: received line: {"id":1687267531452,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.820: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.820: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.820: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.820: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530820,"body":{"pair":true}}

** INFO: 15:25:30.820: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
** (mconnect:378616): DEBUG: 15:25:30.825: devicechannel.vala:285: check for IO, conditions: 0x1
** (mconnect:378616): DEBUG: 15:25:30.825: devicechannel.vala:270: received line: {"id":1687267531459,"type":"kdeconnect.pair","body":{"pair":true}}
** (mconnect:378616): DEBUG: 15:25:30.825: device.vala:418: pair in progress: false is paired: true pair: true
** (mconnect:378616): DEBUG: 15:25:30.825: device.vala:433: unsolicited pair change from device, pair status: true
** (mconnect:378616): DEBUG: 15:25:30.825: device.vala:275: start pairing
** (mconnect:378616): DEBUG: 15:25:30.825: devicechannel.vala:229: send data: {"type":"kdeconnect.pair","id":1687267530825,"body":{"pair":true}}

** INFO: 15:25:30.825: devicemanager.vala:190: device cda1530b_39c8_4e7e_add9_c09c32518d31-Oneirophrenia-phone-7 pair status change: true
...

can't put any files to SD card with file browser

QUESTION DESCRIPTION

Hi there, I can sent file to SD card by "Send file" option, but I can't put any file to SD card with file browser(I can copy file from SD card but can't put in).


BUG REPORT

Error opening file “/home/ruinb0w/.config/kdeconnect/43b7de3783abadf1/kdeconnect_sftp/43b7de3783abadf1/storage/6137-3334/123.png”: Operation not permitted

ENVIRONMENT
gnome shell version: 3.24.2
mconnect is newest.

MConnect gui

hello bboozzoo,
maybe its too early to ask, but how will mconnect daemon interact with other gui program?
I suggest to have a dbus which compatible to kdeconnect
as reference i wrote some indicator for kdeconnectd (https://github.com/vikoadi/indicator-kdeconnect) which use kdeconnect's dbus to interact and i hope that mconnect will be as flexible as original kde-connect.
Thanks

ImportError: bad magic number in 'nautilus-send-mconnect'

When killing Nautilus and running nautilus --version I get one strange line:

ImportError: bad magic number in 'nautilus-send-mconnect': b'\x03\xf3\r\n'

I guess this is your extension here (if not, please let me know), so I'm opening this issue here as I guess that's not how it's supposed to be. 😃

$ nautilus --version
ImportError: bad magic number in 'nautilus-send-mconnect': b'\x03\xf3\r\n'
Initializing Nextcloud-client-nautilus extension
Using python version sys.version_info(major=3, minor=9, micro=2, releaselevel='final', serial=0)
Initializing nautilus-image-converter extension
GNOME nautilus 3.38.2

Fedora 33
Accidentally found in https://gitlab.gnome.org/GNOME/nautilus/-/issues/1766

Licensing issues with OpenSSL

As this project is licensed under GPLv2 only and uses OpenSSL, there is a license incompatibility 1 2 3

In order to be able to properly distribute this software, a different license is required. There are basically two options:

  • Relicense to GPL2+ to be compatible with the future OpenSSL relicense to ASL2 (A rewrite to GnuTLS requires this too, as GnuTLS is effectively LGPL3+)
  • Add an exception to the license to deal with the incompatibility.

Since licensing to GPLv2 only looks intentional, I guess option 2 would be preferrable.

Ubuntu compiling error

Ubuntu 14.04 amd64

...
make[1]: Entering directory /home/ubuntu/Downloads/mconnect-0.2' VALAC mconnect_vala.stamp src/core.vala:50.4-50.7: error: The nameinfo' does not exist in the context of Core.instance' info("supported interfaces: %s", string.joinv(", ", ^^^^ src/notification.vala:55.7-55.21: error: The namematch_string' does not exist in the context of string?' if (id.match_string("com.android.dialer", false) == true) ^^^^^^^^^^^^^^^ Compilation failed: 2 error(s), 0 warning(s) make[1]: *** [mconnect_vala.stamp] Error 1 make[1]: Leaving directory/home/ubuntu/Downloads/mconnect-0.2'
make: *** [all] Error 2
...
See full LOG:
http://pastebin.com/KNMMQsiG

Feature Request: Gnome Shell Extension

I see this been receiving attention since the WebUpd8 post about KDE Connect. Since Ubuntu has announced the switch to Gnome Shell an extension seems like a sound approach.

Cursor moves but does not show

Hi!
First of all, thanks for the amazing app you have created!

I was testing the Remote Input and noticed that the cursor is moving, log shows the positions being updated, but the pointer on the screen does not change, it keeps in the same position. Clicks and keyboard works fine.
Do you have any idea of how can I debug this to try to find a solution?

Thanks!

Umlauts crash client

Hi, I just tried to send some text to my phone and noticed that umlauts seem to crash the client:

$ mconnectctl share-text /org/mconnect/device/0 "äöüß"

** (mconnectctl:116036): CRITICAL **: 13:24:28.728: file ../src/mconnectctl/main.vala: line 79: unexpected error: Invalid byte sequence in conversion input (g_convert_error, 1)

I havent yet taken a look into the code, but I guess only a very limited encoding (ASCII?) is supported?
Of course I can work around this by not using umlauts, but I just wanted to report this.

EDIT: I just noticed this is probably related to this issue: #47

integrate ofono (use desktop speaker/mic as headset, start and answer calls)

ofono comes with a great dbus api, i have played around a bit and found that it would be doable to use desktop speaker/mic for input/output on android phones with ease over bluetooth (desktop as headset). also ofono dbus-api allows to dial and answer calls at the phone from the desktop. this would basically allow functionality that is known from macOS

Implement PropertiesChanged signal for DBus properties

If the properties exported over DBus are annotated with org.freedesktop.DBus.Property.EmitsChangedSignal then PropertiesChanged will be emitted when a value has changed and redundant signals can be avoided. I've encountered several race conditions with KDE Connect where signals are emitted before the properties are updated, and this could help make property changes and signals more atomic.

https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
https://wiki.gnome.org/Projects/Vala/DBusServerSample#Service_with_D-Bus_property_change_notifications

Can't build mconnect on Fedora 24

Hello,

I want to try mconnect on Fedora 24 but I can't build it. This is what I have made :

$ sudo dnf install vala glib2-devel gobject-introspection-devel libgee-devel openssl-devel libnotify-devel json-glib-devel
$ git clone https://github.com/bboozzoo/mconnect.git
$ cd mconnect
$ autoreconf -if
$ ./configure --prefix=/usr
$ make

Note that json-glib on the readme explanation have to be replaced by json-glib-devel.

At the "make" step there is this error :

sed -e 's,[@]bindir[@],/usr/bin,g' < mconnect.desktop.in > mconnect.desktop
  VALAC    mconnect_vala.stamp
gee-0.8.vapi:267.4-267.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:662.4-662.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:664.4-664.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:672.4-672.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:674.4-674.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
src/mconnect/devicechannel.vala:111.16-112.29: error: Assignment: Cannot convert from `GLib.Source' to `GLib.SocketSource?'
src/mconnect/devicechannel.vala:113.3-113.8: error: The name `source' does not exist in the context of `DeviceChannel.open'
        source.set_callback((src, cond) => {
        ^^^^^^
src/mconnect/devicechannel.vala:118.12-118.17: error: The name `source' does not exist in the context of `DeviceChannel.open'
        _srcid = source.attach(null);
                 ^^^^^^
src/mconnect/device.vala:79.20-79.53: warning: unhandled error `GLib.KeyFileError'
        this.device_id = cache.get_string(name, "deviceId");
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/device.vala:80.22-80.57: warning: unhandled error `GLib.KeyFileError'
        this.device_name = cache.get_string(name, "deviceName");
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/device.vala:81.22-81.57: warning: unhandled error `GLib.KeyFileError'
        this.device_type = cache.get_string(name, "deviceType");
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/device.vala:82.27-82.68: warning: unhandled error `GLib.KeyFileError'
        this.protocol_version = cache.get_integer(name, "protocolVersion");
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/device.vala:83.26-83.59: warning: unhandled error `GLib.KeyFileError'
        this.tcp_port = (uint) cache.get_integer(name, "tcpPort");
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/device.vala:84.21-84.59: warning: unhandled error `GLib.KeyFileError'
        var last_ip_str = cache.get_string(name, "lastIPAddress");
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/mconnect/discovery.vala:55.24-58.5: error: lambda expression: too many parameters
Compilation failed: 4 error(s), 11 warning(s)
Makefile:1047 : la recette pour la cible « mconnect_vala.stamp » a échouée
make: *** [mconnect_vala.stamp] Erreur 1

How can this be fixed ? I also noticed that you have a copr repo but it's not maintained anymore. Can you update it please ?

Thanks !

Ps. Is mconnect still an active project ?

no clipboard sharing?

So I got mconnect working on my machine, and can get everything working it seems (well, no indicator) except for clipboard sharing. I can manually do this (from laptop to phone) via 'share-text' (though nothing the other direction) but it doesn't actually sync clipboards otherwise.

Customized downloads directory

I noticed that directory for downloaded files is in ~/Downloads/mconnect, which sometimes is not the case I want. Would you like enhance mconnect so that it can support a customized download directory, which can be specified in mconnect.conf.

Actually I have done the code change on my local repo for the customized download directory. If you like, please grant the access to me so I can create a pull request for code review.

Status of "maybe-rust" and "golang" branches

I've noticed these 2 active branches (maybe-rust and golang) in mconnect repository: does it mean you are rewriting mconnect in either rust or go language?
I would be interested to know the status of these branches as of now: are they already usable or just proof of concept?

Feature request: PPA

For many people will be useful to have PPA for easy install mconnect on Ubuntu and flavours (Ubuntu GNOME, elementary OS etc).

Connection refused

Hi iam trying to connect to my pc but it dosent even show up and when I refresh the list it will print this error
failed to connect to 192.168.1.3:1717: Could not connect to 192.168.1.3: Connection refused`
I tried running it as root and normal user also tried disabling the pcs firewall but non worked (and yes I allowed the phone through the mconnect ctl)
Can you help please?

Other vala client

Hi,
I have been working an another vala/GLib client for KDEConnect, I just wanted to mention it to you: https://github.com/getzze/gconnect
It follows the class structure of the original Qt/C++ code, with ideas I have taken from mconnect (for cryptography especially).
The differences:

  • heavier
  • use cmake (I would like to switch to meson/ninja)
  • use libpeas for the plugins, so they can be written in Python
  • use GSettings to store configuration.

Thank you for your great work and to the developpers of KDEConnect!

mconnect not working - phone can't see PC - PC can't see phone

Hi,

I tried to use mconnect but, well, it failed.

Situation:

Issues:

  • PC can't see phone:
$ mconnectctl list-devices
No objects were found
  • phone can't see PCs
  • PCs can't see each other
  • there is no traffic on ports 1714-1716. # tcpdump -tttnei wlan0 portrange 1714-1764 stays silent the whole time
  • PCs do seem to work, somewhat.
PC1$ mconnect -d
PC2# nmap -sU -p 1714 <IP of PC1>
PC1: # runs mconnect, and receives some malformed packets from PC2
(mconnect:4185): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed
** Message: packet.vala:114: failed to parse message: '', error: Missing root object

** (mconnect:4185): CRITICAL **: packet_get_pkt_type: assertion 'self != NULL' failed

** (mconnect:4185): CRITICAL **: packet_get_pkt_type: assertion 'self != NULL' failed
** Message: discovery.vala:85: unexpected packet type (null) from device 192.168.0.24

(mconnect:4185): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed
** Message: packet.vala:114: failed to parse message: '', error: Missing root object

** (mconnect:4185): CRITICAL **: packet_get_pkt_type: assertion 'self != NULL' failed

** (mconnect:4185): CRITICAL **: packet_get_pkt_type: assertion 'self != NULL' failed
** Message: discovery.vala:85: unexpected packet type (null) from device 192.168.0.24
PC2:
# nmap -sU -p 1714 192.168.0.24

Starting Nmap 7.60 ( https://nmap.org ) at 2017-12-03 21:04 CET
Nmap scan report for 192.168.0.24
Host is up.

PORT     STATE         SERVICE
1714/udp open|filtered sesi-lm

Nmap done: 1 IP address (1 host up) scanned in 2.20 seconds
  • Waiting doesn't help
$ mconnect -d
** (mconnect:487): DEBUG: config.vala:46: config search dir: /home/moviuro/.config/mconnect
** (mconnect:487): DEBUG: config.vala:46: config search dir: /usr/local/share/mconnect
** (mconnect:487): DEBUG: config.vala:46: config search dir: /usr/share/mconnect
** Message: config.vala:58: loaded configuration from /home/moviuro/.config/mconnect/mconnect.conf

** (mconnect:487): WARNING **: share.vala:42: failed to create downloads directory: Invalid argument
** INFO: share.vala:47: downloads will be saved to 
** (mconnect:487): DEBUG: core.vala:43: init core
** INFO: core.vala:59: supported interfaces: kdeconnect.telephony, kdeconnect.notification, kdeconnect.share.request, kdeconnect.battery, kdeconnect.mousepad.request, kdeconnect.ping
** (mconnect:487): DEBUG: discovery.vala:40: start listening for new devices at: 0.0.0.0:1714
** (mconnect:487): DEBUG: application.vala:85: activate
** (mconnect:487): DEBUG: devicemanager.vala:57: try loading devices from device cache /home/moviuro/.cache/mconnect/devices
[A long moment passes, at the same moment, the KDE Connect app is active on the phone]
^C

strace mconnect -d gives: the following output http://sprunge.us/MgCK ; but I'm not able to interpret any of this.

Any idea with what's wrong?

mpris support

I recently had some time, so I tried to implement the mpris functionality.
You can see my results here.
Don't know if you have planned implementing it, if so feel free to comment, edit, copy, pull.
I have no previous vala experience so I'm sure my code can be improved, but for me it works quite well.

[Notifications] Name missing from incoming call.

When I receive a notification of message, it shows the persons name as listed in my phone and in the notification on phone, but when receiving an incoming call notification, it only shows their number. I have enabled permissions for notifs, contacts, phone in kdeconnect. Any ideas?

Pixel 3XL
mconnect-git (arch AUR)

build error on Manjaro 18.0.2

../src/mconnect/device-proxy.vala:71.5-71.23: error: Property DeviceDBusProxy.allowed' with custom get' accessor and/or set' mutator cannot have default' value
public bool allowed {
^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:79.5-79.25: error: Property DeviceDBusProxy.is_active' with custom get' accessor and/or set' mutator cannot have default' value
public bool is_active {
^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:63.5-63.25: error: Property DeviceDBusProxy.is_paired' with custom get' accessor and/or set' mutator cannot have default' value
public bool is_paired {
^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:27.5-27.20: error: Property DeviceDBusProxy.id' with custom get' accessor and/or set' mutator cannot have default' value
public string id {
^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:35.5-35.22: error: Property DeviceDBusProxy.name' with custom get' accessor and/or set' mutator cannot have default' value
public string name {
^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:43.5-43.29: error: Property DeviceDBusProxy.device_type' with custom get' accessor and/or set' mutator cannot have default' value
public string device_type {
^^^^^^^^^^^^^^^^^^^^^^^^^
../src/mconnect/device-proxy.vala:51.5-51.32: error: Property DeviceDBusProxy.protocol_version' with custom get' accessor and/or set' mutator cannot have default' value
public uint protocol_version {
......
Compilation failed: 7 error(s), 30 warning(s)
[12/57] Compiling C object 'test-mconn-crypt@exe/meson-generated_src_crypt_certificate.c.o'.
ninja: build stopped: subcommand failed.

Error "device not on whitelist"

Ubuntu 14.04.
kdeconnect 0.7.3 on Android-phone
log:

mconnect -d
** (mconnect:3585): DEBUG: config.vala:46: config search dir: /home/alex/.config/mconnect
** (mconnect:3585): DEBUG: config.vala:46: config search dir: /usr/share/ubuntu/mconnect
** (mconnect:3585): DEBUG: config.vala:46: config search dir: /usr/share/gnome/mconnect
** (mconnect:3585): DEBUG: config.vala:46: config search dir: /usr/local/share/mconnect
** (mconnect:3585): DEBUG: config.vala:46: config search dir: /usr/share/mconnect
** Message: config.vala:58: loaded configuration from /home/alex/.config/mconnect/mconnect.conf
** (mconnect:3585): DEBUG: mconn-crypt: new crypt for key /home/alex/.local/share/mconnect/private.pem
** (mconnect:3585): DEBUG: mconn-crypt: new instance
** (mconnect:3585): DEBUG: mconn-crypt: loading key from /home/alex/.local/share/mconnect/private.pem
** (mconnect:3585): DEBUG: core.vala:33: init core
** INFO: core.vala:50: supported interfaces: kdeconnect.notification, kdeconnect.battery, kdeconnect.telephony
** (mconnect:3585): DEBUG: devicemanager.vala:27: device manager..
** (mconnect:3585): DEBUG: discovery.vala:43: start listening for new devices at: 0.0.0.0:1714
** (mconnect:3585): DEBUG: discovery.vala:63: incoming packet
** (mconnect:3585): DEBUG: discovery.vala:72: got 166 bytes from: 10.42.0.66:36883
** (mconnect:3585): DEBUG: discovery.vala:79: message data: {"type":"kdeconnect.identity","id":1423232507585,"body":{"protocolVersion":5,"deviceName":"s4502","deviceType":"phone","deviceId":"4b32126eef8f0edb","tcpPort":1714}}

** (mconnect:3585): DEBUG: packet.vala:70: packet type: kdeconnect.identity
** (mconnect:3585): DEBUG: device.vala:56: got packet: {"type":"kdeconnect.identity","id":1423232507585,"body":{"protocolVersion":5,"deviceName":"s4502","deviceType":"phone","deviceId":"4b32126eef8f0edb","tcpPort":1714}}
** (mconnect:3585): DEBUG: device.vala:66: added new device: 4b32126eef8f0edb-s4502-phone-5
** Message: discovery.vala:95: connection from device: 's4502', responds at: 10.42.0.66:1714
** (mconnect:3585): DEBUG: devicemanager.vala:33: found device: 4b32126eef8f0edb-s4502-phone-5
** (mconnect:3585): DEBUG: config.vala:81: check if device s4502 type phone is allowed
** (mconnect:3585): DEBUG: config.vala:86: checking dev s4502
** (mconnect:3585): DEBUG: config.vala:89: no group s4502
** Message: devicemanager.vala:36: device 4b32126eef8f0edb-s4502-phone-5 not on whitelist

mconnect.conf:

[main]
debug = 0
devices = s4502
[s4502]
name = s4502
type = phone
allowed = 1

But, where group?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.