Review Request 122174: Add initial bluetooth backend implementation.

Saikrishna Arcot saiarcot895 at gmail.com
Sat Feb 14 15:48:23 UTC 2015


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

(Updated Feb. 14, 2015, 3:48 p.m.)


Review request for kdeconnect.


Changes
-------

Added support for Qt 5.4 and BlueZ 5.


Repository: kdeconnect-kde


Description (updated)
-------

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.


Diffs (updated)
-----

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

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.

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. In addition, the pairing data doesn't seem to be stored on the KDE side. Not sure if I'm missing something or not.

# Android as client and KDE as server

## BlueZ 4 and Qt 5.3

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.

## BlueZ 4 and Qt 5.4

Not tested.

## BlueZ 5 and Qt 5.4

My Android sees and at least tries to connect to the KDE connect service. Sometimes, it's successful, sometimes, it fails.

# Android as server and KDE as client (all versions)

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/20150214/08d39eb1/attachment-0001.html>


More information about the KDEConnect mailing list