Review Request 122174: Add initial bluetooth backend implementation.

Saikrishna Arcot saiarcot895 at gmail.com
Mon Jan 26 02:53:13 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122174/
-----------------------------------------------------------

(Updated Jan. 26, 2015, 2:53 a.m.)


Review request for kdeconnect.


Repository: kdeconnect-kde


Description
-------

Add initial bluetooth backend implementation.

This is based on the frameworks branch.

The `getPairedDevices()` method in the link provider class uses D-Bus to get the list of paired devices, since Qt doesn't have a method giving that information. As a result, that part of the code only works on Linux.

Note that the Qt Connectivity package in Ubuntu 14.04 and 14.10 doesn't include support for BlueZ, as it wasn't compiled with the BlueZ headers. I recompiled the package for 14.10 and is available [here](https://launchpad.net/~saiarcot895/+archive/ubuntu/myppa).


Diffs (updated)
-----

  interfaces/modeltest.cpp 40d7d282a8aef0d1c6932ccff5f5ae105ee9ff01 
  interfaces/notificationsmodel.h f9a747973e726193ad25b32447c36a357ddc5c9f 
  interfaces/notificationsmodel.cpp 7ff163821b2d05072ed0321de67f5ef7a3bd6e56 
  kcm/CMakeLists.txt 0e30819ea5b3e7d23b8804b46b5d07d5c7fa8d4c 
  kcm/devicessortproxymodel.cpp 929371df4c38db0c83ed8ea7cf7248b701d569f3 
  kcm/kcm.cpp 2eff3cdad5fccac3130cf137966d6ee30a2037ea 
  kcm/kcm_kdeconnect.desktop f626b7825475e4db9bad0ea352884dd052ed4630 
  kcm/kdeconnect.desktop 336680b9e493332f2c3b9444bbca9ec12928c9fc 
  kdeconnect-non-plasma.desktop PRE-CREATION 
  kded/CMakeLists.txt 4c4e46b34af8d6d2fd82a49a00e5dd31cc9143e9 
  kded/config-kded.h.cmake PRE-CREATION 
  kded/kdeconnect.desktop 1a1200e55d35e190581a2de980fcb3fed8f54ef6 
  kded/kdeconnectd.cpp 06cec727723e64954d1ed13e5b7f12cd35a6b784 
  kded/kdeconnectd.desktop.cmake PRE-CREATION 
  kded/kded.h 9ae70310de1908862acabba5fa79641cf3f72cd9 
  kded/kded.cpp 2ec9062e6f95bbe04d3eff18dcbf30c180a58bb5 
  kded/org.kde.kdeconnect.service.in 9777642945f2ece13fee46819c3b138778ff2128 
  kio/CMakeLists.txt b54bb1a2a927017005d37b670618969b05696150 
  kio/kiokdeconnect.h ae63c1fb6bcf616444d85c0968dfe5f136b041b2 
  kio/kiokdeconnect.cpp b7420934ccfa66efee854a3ae16214f11a8d4129 
  plasmoid/CMakeLists.txt 3289115e43efde562a7ae169852df8d5f02e71a8 
  plasmoid/Messages.sh 89e3c4059167121d1327eaed090fff2e70b8419f 
  plasmoid/declarativeplugin/CMakeLists.txt 615ee533cae740ea806c01d4997e1ba7ec4a4162 
  plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h 6324b7aba9f5fb305299e9b16442b7aa563b2704 
  plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp 0fa00b7b788de8f69962ff9020db37d0fb21f584 
  plasmoid/declarativeplugin/processrunner.h PRE-CREATION 
  plasmoid/declarativeplugin/processrunner.cpp PRE-CREATION 
  plasmoid/declarativeplugin/qmldir 9d5f411cb9dea3a76d7faf356fee150baa2c8854 
  plasmoid/declarativeplugin/responsewaiter.h 3d2a63dd2cc6aefe984c9b5c899dd4e9b250a391 
  plasmoid/package/contents/ui/Battery.qml 4b58e2da1604551b33d68ee4f39e2bb0915e5285 
  plasmoid/package/contents/ui/CompactRepresentation.qml 7614893d8d16eff20777ac62569bb384e2d8e7d3 
  plasmoid/package/contents/ui/DeviceDelegate.qml 372a1b63eb70ff7fda5ed480d86c1bfa82d6f70f 
  plasmoid/package/contents/ui/Sftp.qml 5a2437b92db30b9011fc2a320cd5d1adc9c42643 
  plasmoid/package/contents/ui/kdeconnect.qml 27a594e2f04653fcaffbfd457615f4c1cc63bb27 
  plasmoid/package/contents/ui/main.qml PRE-CREATION 
  plasmoid/package/metadata.desktop 1dbbbd7dc121b9e4a0b9e2469845a1d8ccb2afb8 
  plugins/CMakeLists.txt ed1efe0886e4938d2f40aced89e33ddc5c995e48 
  plugins/battery/CMakeLists.txt 1fea3b7929a12b2679ef2456f10cd2475bb2ac28 
  plugins/battery/batterydbusinterface.cpp b3b22dd640658694a38dd9db5b4bd343f9b543cd 
  plugins/battery/batteryplugin.h 9ab9c509dc433193aecfd42927e2a01667e2ffdc 
  plugins/battery/batteryplugin.cpp 975ebaefad611da822468d8b73e47e3c3c3e838f 
  plugins/clipboard/CMakeLists.txt b6624a03c0a5ee9b1b722c8565c786fffad06ff3 
  plugins/clipboard/clipboardplugin.cpp 655cb104f52aecfac69e18697ba5718f6a6b5482 
  core/device.cpp c4043182b8d6dd47fa1d19f8097fe1fb68489bfa 
  CMakeLists.txt 5b916d929dfa3f3304a8ac84e7ef6c19f9aa4663 
  cli/CMakeLists.txt 0eb84026bb997869c68aae815940f25ed19e04f4 
  cli/kdeconnect-cli.cpp b5336aa663a479345b6a9b27d2faf48ef6db7dad 
  cmake/DbusInterfaceMacros.cmake 9d4810d9540f868d6da6869493deec032afced59 
  core/CMakeLists.txt 17209b1a801b33d99e31a4b19eac45df2fa6fe02 
  core/backends/bluetooth/CMakeLists.txt PRE-CREATION 
  core/backends/bluetooth/bluetoothdevicelink.h PRE-CREATION 
  core/backends/bluetooth/bluetoothdevicelink.cpp PRE-CREATION 
  core/backends/bluetooth/bluetoothlinkprovider.h PRE-CREATION 
  core/backends/bluetooth/bluetoothlinkprovider.cpp PRE-CREATION 
  core/backends/devicelinereader.h PRE-CREATION 
  core/backends/devicelinereader.cpp PRE-CREATION 
  core/backends/lan/landevicelink.cpp e344e83747acb8dc0e1f33d1909253886df13d4f 
  core/backends/lan/lanlinkprovider.cpp 3042ff75a4e4163d9ff78e697e8696612406818c 
  core/backends/lan/uploadjob.cpp 77641171d24a7a608a8ee2a2e01b7f9b32e58be5 
  core/backends/loopback/loopbacklinkprovider.cpp df793a6dde47f4df9be9b564406cb8fe7ad7fce0 
  core/daemon.h 5f2ae2624532c4dde657d0eda02a7336c73c754d 
  core/daemon.cpp 57548e5a671b7694125e733db06a58eebbadd264 
  core/device.h 82ecd81ee12511266c0e55ea7046b87c9a3755d6 
  icon/CMakeLists.txt ffc1183c108dcb5a0aa63930e57cf1804c38443e 
  interfaces/CMakeLists.txt 174c65939ff26bb50268a0e8d1a5bf68ed937b10 
  interfaces/devicesmodel.h 75ee0c12b217c5a54a00fa460a65b2e81a57fcd1 
  interfaces/devicesmodel.cpp bef9db4f3a28e54d6f3092a2ad99a8bdd07fc77b 
  interfaces/interfaces_debug.h PRE-CREATION 
  fileitemactionplugin/sendfileitemaction.cpp 54653b923cde13116481b1110103ed10d0d14ad1 
  core/filetransferjob.h b022210b6fe64b064cecbcc84e20a56fdcefe5f9 
  core/filetransferjob.cpp 2dad5deba790608b3de7ccc2bcec7d8bb575d149 
  core/kdebugnamespace.h c7a094a48e0c2b8a0e57e9eeecb443ce2fc03573 
  core/kdeconnectplugin.h d73491f5ea7cb9ac114a3995c0f770aeb49ed73f 
  core/kdeconnectplugin.cpp 620550b214706e70a491d1e15e462e5150dfb460 
  core/networkpackage.h 5f1cfe87cb9809fce15291f5fdf4ed3d2c653eae 
  core/networkpackage.cpp db44658b112183924835923dbe71edc5a500ea5f 
  core/pluginloader.cpp 12d7864608f6e3c929f745781c1a76d7cf38b938 
  fileitemactionplugin/CMakeLists.txt 3043f695457fd11a6dd8cc45587f28fd3a313e59 
  fileitemactionplugin/Messages.sh 118c91208fed047f1478872dabdd056a4a61cd7b 
  fileitemactionplugin/sendfileitemaction.h d5dd74b9c99c8e4d937730ecc4df3c1adac66e55 
  plugins/sftp/sftp_debug.h PRE-CREATION 
  plugins/sftp/sftpplugin.cpp 53b818a999d5f6c772c1a90d07a74fbd04c3870f 
  plugins/share/CMakeLists.txt ab91134c4cd2ceb8fa71a44a8083e868bb627f20 
  plugins/share/autoclosingqfile.h c9673d8d918acf324b6421636fae848eb801206e 
  plugins/share/share_config.cpp 805f2770201d9461f7fed97dd4e2fd4cab0b30e9 
  plugins/share/share_config.ui d6f618fb7295cfdb2cb187a048617e7a30ce378e 
  plugins/share/share_debug.h PRE-CREATION 
  plugins/share/shareplugin.h 72c79d2d924bdc463c6ee70bc578d494cee6a8b5 
  plugins/share/shareplugin.cpp 2c7c8152ef97e2bc600a04ca88079224e600a428 
  plugins/telephony/CMakeLists.txt 01b2f9a8654fdb392fd1fcbc4cedae62590c70f8 
  plugins/telephony/telephonyplugin.h 047d9869f58910492468d5828514e1be183b5a4e 
  plugins/telephony/telephonyplugin.cpp 5e46ba3bc7caa028083de28d363b2c09f8034b21 
  tests/CMakeLists.txt 51ad49d481cd1e805a0836ba08fe75891246da35 
  plugins/sftp/CMakeLists.txt e6fd20444aad3dfbc6825295172726875ca6d098 
  plugins/sftp/mounter.cpp c414f77b1aefbbbfe14b35eea0ae7e1b6bee644a 
  plugins/sftp/sftp_config.cpp c996dd3f85898b9e4cba0719995d030151ff3d2a 
  plugins/ping/CMakeLists.txt 0f6f0ac3e12f611fec4b6e83d0dd74355cc931b4 
  plugins/ping/pingplugin.h 614da48504dfd42431175dd40c66bde28534706b 
  plugins/ping/pingplugin.cpp 042a953cb3d9ba210a30630cc68a779ac170e8bf 
  plugins/screensaver-inhibit/CMakeLists.txt 2f0d56d5677a478b9ae0c770f88705cb43563ad7 
  plugins/screensaver-inhibit/screensaverinhibitplugin.h 460ac6023f228d1d2925ed7a236684a07cd63f5f 
  plugins/screensaver-inhibit/screensaverinhibitplugin.cpp 85ac1995faee53b6e5288a2b79f892b1891d403b 
  plugins/mousepad/mousepadplugin.cpp cf5f70ec9836b69c9db7875c75a9c96bd4f918cb 
  plugins/mpriscontrol/CMakeLists.txt d5332fab6cb3f5832984c3ed077259ddcc067005 
  plugins/mpriscontrol/mpriscontrolplugin.h 737abc5f14783dc82a67c3ca5f155d2a0b6221b1 
  plugins/mpriscontrol/mpriscontrolplugin.cpp 003ad4227594b63f3549bd93dc345ed7c293d02d 
  plugins/mpriscontrol/propertiesInterface.xml 5118061546aa72b204a86a3fe73bdea88ed4bb7c 
  plugins/notifications/CMakeLists.txt cfd271d22c9ba7379181ffd8268723c75bad598a 
  plugins/notifications/notification.cpp 3c15d47dcd263c0999717c827db6dd9dadabacd5 
  plugins/notifications/notification_debug.h PRE-CREATION 
  plugins/notifications/notificationsdbusinterface.cpp 84a71a73e09b899e5821132c8032b179f37d2c23 
  plugins/notifications/notificationsplugin.cpp 1387a7e05a892797c83d85831078096b3a111697 
  plugins/pausemusic/CMakeLists.txt 337e952460bc8b9ed6dff9729df2555b4d72f3dd 
  plugins/pausemusic/pausemusic_config.cpp dc24b271514c9ac0b795f0869088368e37ca0b13 
  plugins/pausemusic/pausemusicplugin.h aba9eb5ce423f966ef8c7bcba3660d5c41e40524 
  plugins/pausemusic/pausemusicplugin.cpp c0e1859dde59b7013d55cdc4f0165fe418566efa 
  plugins/mousepad/mousepadplugin.h 2135123f860431b2ba73273e648d19b8fa4e3390 
  plugins/mousepad/fixx11h.h PRE-CREATION 
  tests/networkpackagetests.cpp 8f6f8ac7b57ff08162d882e8238b9125dab5873e 
  plugins/clipboard/clipboardplugin.h c02859abcd376b35ba8b75b655940b5dc8267d1a 
  plugins/mousepad/CMakeLists.txt 02f36ab72e48232e172698f54b624ba0ae17cdfd 

Diff: https://git.reviewboard.kde.org/r/122174/diff/


Testing (updated)
-------

KDE Connect runs, and the bluetooth service gets published in the SDP (service discovery protocol), which other devices use to determine what services are available.

Android as client and KDE as server: My Android (4.1.2) sees the KDE connect service and tries to connect to it, but fails most of the time. Sometimes, it succeeds and creates a connection. I haven't been able to find out why it's failing the rest of the time. Newer versions of Android (4.2 and higher) might have better luck, since the Bluetooth code was changed.

When it does connect, one time, I was able to pair the devices together (from my Android), and was able to send a ping, use the touchpad, and control my media player from my Android. The pairing data doesn't seem to be stored, as Android isn't remembering the KDE (or vice-versa), which may mean I'm missing something in the code.

For me, sending a pair request from KDE to Android results in KDE Connect crashing on Android. It seems it's because the VIBRATE permission is necessary, which I've added on the Android side.

Android as server and KDE as client: I was able to successfully connect to the Android and use it.


Thanks,

Saikrishna Arcot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150126/0633c4d8/attachment-0001.html>


More information about the KDEConnect mailing list