The Zeemote JS1 is a small bluetooth joystick remote control. In the past, I already created some apps that allow the usage of the Zeemote JS1, like QZeeControl (for Harmattan/MeeGo on the N9 and N950) and Zeecontrol (for Fremantle on the N900). In this post, I write about QZeeControl 2 which is a Qt5 port/re-write of QZeeControl.
Below are a screenshot and a video of QZeeControl 2 in action:
The dark gray area with the red square is used for testing the movement in general. The blue letter “A” to “D” indicate the four buttons on the remote control. The four blue text labels “Up” to “Right” indicate the triggering of the “digital joystick emulation” in QZeeControl 2. This emulation, in a nutshell, triggers a key press of a configurable key-code when certain threshold values are exceeded respectively underrun for the corresponding analog joystick axes. Additionally, as can be seen in the video, it is possible to control the mouse with the joystick remote control.
Generally, QZeeControl 2 supports an arbitrary number of remote controls and has configurable key-codes. However, as the current state is a very early prototype, there is no key-code configuration UI yet. At the time of writing, some configuration options can only be set via configuration text files.
The QZeeControl 2 source code can be found at github. I will also upload a tarball with a readily built version. The build will be for Fedora 20.
One of the problems that I encountered while writing QZeeControl 2 in Qt5 was that Bluetooth on Linux in Qt5 is currently only officially supported in combination with Bluez 4. See also another discussions about this topic. Generally, the Bluez API seems to be a source of some confusion.
Fortunately, it seems that the RFCOMM API which is used in QZeeControl for receiving data from the remote control works as-is with Qt5 and Bluez 4 as well as Bluez 5. The only part that had to be taken care of for getting QZeeControl 2 working with Qt5 and Bluez 5 was to re-implement the scanning/discovery part of the app using the new Bluez 5 DBUS API.
In the previous implementations, Xtst was used for interacting with the UI, like triggering key-presses etc. Perspectively, the plan is to port QZeeControl 2 to SailfishOS/Nemomobile as well. As these OS use Wayland, using Xtst is not an option anymore. Thus, in QZeeControl 2, uinput is used instead. Via uinput, QZeeControl, in a nutshell, behaves like a real joystick input device in the system and thus can be used accordingly.