I am looking at adapting my system to an ArduPilot base drone.
I have a companion computer running a software that communicates with a GCS using quite a large communication protocol.
That protocol is very specific and only relevant to that computer and the GSC, the FC does not need to do anything about it.
I want to create a MAVLink dialect on top of ardu to add everything so a custom GroundControl can use my dialect to communicate back and forth with the companion computer.
In this situation, the FC only need to route those custom message and does not need to have them installed inside the firmware.
The reason for this is, i want to take any drone with an Ardu FC inside, install my hardware and have it work out of the box without any specific FC software update.
I may not even have access to the FC in the first place making it impossible to change it.
Now i am trying to understand how it would it possible to do that.
I am very confused about the requirements of a custom dialect and mavlink routing.
The page MAVLink Routing in ArduPilot — Dev documentation does not mention about message being discared because they are unknown.
I tried running ardu SITL using
sim_vehicle.py -v ArduCopter -m "--mav20" --console
Then i have 2 small C++ program using MAVSDK (with my dialect included)
The program acting as the GCS connect on TCP 5763 and listen for my custom command.
The program acting as the Companion Computer connect on TCP 5762 and send the custom command (including target_system and target_component)
At this stage, sitl starts fine, both program connects and discovery works.
My message is also sent but … nothing happens on the other side and i have no clue how i can debug this.
Of course i could try updating the firmware as well to see if it works that way but i don’t really understand how to do it.
The page Adding a new MAVLink Message — Dev documentation leaves me more confused than anything else.
How can i add a new xml or already generated code and have ardu use it?
But again i don’t see why i would need to do this.
On summary :
- Can i have a custom dialect routed without FC know about them, and if yes how can it be done?
- If not possible, how to add my xml to the firmware?
- If not working, how can i debug why my messages get lost somewhere?
Thank you for any help.