Pebble Protocol Implementation in QML and SkippingStones UI for #SailfishOS

This is somewhat an announcement as well as a call for participation. Some time ago, I treated myself to a Pebble smart watch. As my primary phone is a Jolla smart phone, apparently, the next “logical” step was to get both, Pebble and Jolla, work together.

Thereby, I had two aims. Firstly, the implementation of the Pebble protocol should be in “as pure as possible” plain QML. Secondly, of course, I wanted to have at least basic interaction with my smart phone like getting notifications about calls and SMS or controlling the music player.

I put the emphasis on plain QML for the protocol implementation for two reasons. On the one hand, plain QML, due to its interpreted nature, enables pretty quick hack and test cycles. On the other hand, plain QML also promises to be quite platform independent, as in, “Runs on all platforms supported by Qt.”.

I used the very helpful libpebble Python implementation of the protocol as reference. Thanks to libpebble the protocol implementation was actually very much straight forward.

The current result of my experiments is “SkippingStones”. SkippingStones consists of a “backend”, i.e., the Pebble protocol implementation and a “frontend”, that is currently only available for SailfishOS and provides the connection to the platform dependent interfaces such as DBUS as well as a user interface.

SkippingStones is still in a very strong work-in-progress state. However, basic functionality like controlling the music player and getting notifications already works. I even succeeded in uploading watchfaces to my Pebbe via SkippingStones. SkippingStones is released under the same license terms as libpebble and is hosted on github: https://github.com/ruedigergad/SkippingStones I uploaded an .rpm of the current state as well: https://github.com/ruedigergad/SkippingStones/raw/master/dist/harbour-skippingstones-0.1-1.armv7hl.rpm In order to use the media player control, you need to also apply another patch to the installed media player QML files (in “/usr/lib/qt5/qml/com/jolla/mediaplayer/AudioPlayer.qml”): https://github.com/ruedigergad/SkippingStones/blob/master/audioplayer_dbus.patch (See also: https://together.jolla.com/question/313/add-dbus-interface-to-stock-music-player/).

Please be aware that this is not an “end-user-ready” product right now. The UI as well as possibly many other parts are still pretty much unfinished and in a rough state. So please don’t be disappointed if there are many things that still need to be improved or if things fail. Generally, you use SkippingStones on your own responsibility.

All participation/help for further improving SkippingStones is highly appreciated. There are many places that need some love, in the backend as well as in the frontend. Furthermore, so far there is only a SailfishOS based UI while it might be worthwhile to support more platforms as well.

PS: Just to clarify, some parts of the backend are implemented in Qt/C++. However, I tried to limit the amount of Qt/C++. The only parts written in Qt/C++ are simple adapters to allow the usage of Bluetooth and QByteArray in QML. These parts are also written without any platform dependent APIs. Thus, in general, SkippingStones should work on all platforms for which Qt5 is available.

Furthermore, backporting SkippingStones to Qt4 should also be possible without much effort. I didn’t try it myself, but, off the top of my head, it might even suffice to adjust the version of the QtQuick import in the QML part.

This entry was posted in Announcements, Libs., My Applications, SkippingStones and tagged , , , , , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.