Making a custom QGC like application

I am trying to build a custom mission control software to be deployed on the herelink.
I am building it using QtAndroid 5.15.0.
Using the SDL library I want to access the joystick and other buttons.
SDL initializes properly but I am somehow not able to fetch the controller using SDL_GameController().
I am also not able to get the joysticks using SDL_NumJoysticks().
By reading about herelink, I guess there hardware can only be accessed by QGC or Solex or the proprietary herelink app.
But as I am not sure, I want to know if it is possible to access the joystick and other buttons on the device?

Hi Sahil, I’m also playing around with the herelink to develop a custom app. This is my first go at Android (Kotlin using Android Studio), and wanted to see if I could interact with the Herelink’s peripherals before investing time to learn android app development. With some research and ‘luck’ I managed to interact with the joystick and buttons (except the power button) in my custom app using these methods:


import android.util.Log
import android.view.KeyEvent
import android.view.MotionEvent
import android.widget.Toast


override fun onGenericMotionEvent(event: MotionEvent) : Boolean {
        var joystick_2X = event.getAxisValue(MotionEvent.AXIS_X)
        var joystick_2Y = event.getAxisValue(MotionEvent.AXIS_Y)
        var joystick_1X = event.getAxisValue(MotionEvent.AXIS_Z)
        var joystick_1Y = event.getAxisValue(MotionEvent.AXIS_RZ)
        var joystick_wheel = event.getAxisValue(MotionEvent.AXIS_WHEEL)

        Log.d("joystick_1X : ", joystick_1X.toString())
        Log.d("joystick_1Y : ", joystick_1Y.toString())
        Log.d("joystick_2X : ", joystick_2X.toString())
        Log.d("joystick_2Y : ", joystick_2Y.toString())
        Log.d("joystick_wheel : ", joystick_wheel.toString())

        return super.onGenericMotionEvent(event);


override fun dispatchKeyEvent(event: KeyEvent): Boolean {
        Toast.makeText(this, "Key dispatch : " + event.keyCode.toString(), Toast.LENGTH_SHORT).show()
        return super.dispatchKeyEvent(event)

The keycode for each button is shown as an alert in the app as you press the buttons.
Hope this helps.

If you manage to use the telemetry within your custom app, please let me know how.

1 Like

Hi @kasparjj,
Thanks for your reply.
However I am building the app on Qt and am currently using QGamepad.
Although the joysticks work fine, there is some tweaking required in java to get the buttons to work

Till now I am trying to get the basics right and then move on to telemetry, but I will definitely let you know when I get there.


hi @kasparjj and @Sahil_Singh ;

I know this post is quite old, but I am also trying to get telemetry data from qgc to another application on the herelink device; did you manage to do something concerning that?


Hi @kasparjj and @Antoine,
Herelink comes with a pair of air and ground radio. From what I understand QGC is able to get the telemetry data from air-vehicle using these radios.
In my application I was not using these radios. Instead I was using 2 microhard radios. One was placed in the air vehicle and other was connected to herelink using RJ-45 cable. Once both radios were paired, I was able to get the telemetry data from the ground radio using simple socket connection.