I have been working on this for a while now. Long story short, I am unable to use a custom qgroundcontrol app on your remote.
In detail.
I was able to compile both herelink version and stock qgroundcontrol from github.
Used the information on your docs about overriding the stock qgroundcontrol app by flashing a custom oem partition.
Tried both. Stock app gives me a udp bind error and herelink qground shows nothing but a white screen.
By investigating further the stock app that came with the firmware keeps running and its not overridden.
Now is there a way to completely uninstall the app? I guess it would need a rooted filesystem but thats not the case i guess.
I even tried uninstalling it via adb but then it was still running under another (? root maybe) user and not letting me reinstall my version again.
Having a custom qgroundcontrol is crucial to us. We are thinking of making herelink controller our stock option with our drones. Our company makes marine drones and a flying drone app doesnt make sense. We also want to connect qgroundcontrol to our backend for data collection so we need to find a solution. We are a potentially big buyer so please respond. You could email me for a faster respond.
Yes. First I compiled this version which when installed and executed gives me a white screen.
Then I compiled the mavlink version which runs successfully but at start it gives me an udp port bind error and doesn’t connect to telemetry but video feed works .
Both of them were compiled with no source code modifications whatsoever and Both are placed in the oem partition and flashed, not at the same time of course, but the stock app that comes preinstalled seems to be there and still running.
I followed the instructions to the letter.
I modified the oem.img accordingly and flashed it.
I tried both versions of qgroundcontrol. Reflashed firmware to stock and retried.Same outcome. Reflashed and upgrded to beta. Still nothing.
I know because i tried to uninstall the app via adb , I cant remember the exact command I gave i am on my phone, and the app is still there , in settings apps is there and says that is installed but not for this user. If i try to reinstall at that point the app via qtcreator it fails saying this app cannot be installed.
I finally found a way to disable qgc that came with the controller. Now the compiled app works as expected. Version is 388aa2aaa 2020-04-19 17:41:03 +0530.
Can you run your application using Android Studio? Do you have any way to debug it?
I’m developing a custom app that also communicates using mavlink, but it is not developed from QGroundControl. However, I’m having problems sending commands to the drone (ex: sending SET MODE), and for that reason I wanted to debug the QGC source code in Android Studio, to better understand how that communication is done.
On the other hand, if you know how the QGC application is sending the modes I would appreciate it. I’ve already managed to create the buffer data correctly, and when sending that buffer via serial to pixhawk it works correctly. I’m just not understanding how I can send the same information via HereLink (I’ve tried via UDP via port 14551)
Same boat. How can one stop the process bound to the 14550 UPD port? I can see that a process owned by root is listening on that port even when the stock QGC is not running in the foreground. All attempts to dig deeper so I can kill the process seem to run into the same issue - I need root access.
Thanks, Alvin. I suspected that maybe the case. Can you please explain how I can load a custom build of QGC onto a HereLink with regard to the UDP port issue? What port can I listen on with my own app, so as to communicate with the air unit?
It seems that mavlink-router is running in the background. Does that route to port 14552? I see that port is also in use. Should I use mavlink-router to route to another port e.g. 14553?
I’ve read that I can modify the OEM and reflash the controller, but is there a way I can run some proof of concepts tests before getting into a whole process with replacing the entire rootfs? Looking at the CubePilot repo, it looks like I need to merge changes from that to get full support for the HereLink hardware, which seems like another “major” task in this process, and again I’m looking to skip all that for the moment at least and just prove I can link to a real world vehicle, from the real world controller, via a fork from the mainline QGC.
14551 is the mavlink router for internal QGC communication. If you disable Herelink QGC, this will be freed and can be used by your custom QGC.
Also, if you are building from other versions of QGC (like official QGC), you will need to merge our commits. Those are the support for Herelink hardware.
I discovered the file /system/etc/mavlink-router.optimus.conf and saw how it was routing to 14551 for the stock QGC. I found I could leverage that by doing exactly as you describe (i.e. listening on that port myself while the stock app is not running). I also found the exact commit on the CubePilot QGC repo that aligns with the controller I’m working on, so I can merge those changes into my source. I’m now in good shape on all this!
Thanks for the help! I’ll be back to bug you again about something else before long.
yes I have disabled it through adb shell - adb shell pm disable-user --user 0 org.mavlink.qgroundcntrol
I changed the name of the app a bit and adb installed a debug version and also a signed release version using this instruction - Installing a custom app - CubePilot