I am building a GCS with C# and VS 2022. I am communicating with the ArduPilot over UDP. I am having an issue where the ArduPilot will not respond to messages until it receives a heartbeat from the GCS. I have been comparing this behavior to how MavProxy or MissionPlanner interacts with ArduPilot, but they do not seem to be having the same issue where they need to send a heartbeat to receive a response. Any solution or configuration that I could be missing?
You’ll need to send the data stream request in order to get the full telemetry.
See MAVProxy/mavproxy.py at 80716f7fc507fbc792fce6b6bb9e4848c01cf207 · ArduPilot/MAVProxy · GitHub for how MAVProxy does it.
I am able to receive telemetry from the simulator. My issue is that the simulator is not sending solicited responses in a timely manner. For instance, if I send it a MISSION_COUNT
message to start a mission upload, the expected message response is a MISSION_REQUEST
. The simulator will not respond with the MISSION_REQUEST
until the GCS sends the next heartbeat which could be a whole second. This causes an entire mission upload to take 40 seconds for a 40 mission item file at a heartbeat of 1 Hz. Why is the simulator requiring me to send a HEARTBEAT before it will send the solicited response?
The MISSION_REQUEST
message is definitely sent independently of the HEARTBEAT
. There’s no waiting.
Are you able to post your MAVLink code? It sounds like your code might only be processing some messages, but not all of them.
I’m running the simulator on a virtual machine, and I used wireshark to track the messages. From wireshark itself, it looks like this is the pattern I am seeing, so I’m having this problem independent of processing the code. Is their a configuration setting or something that I may need to update on the simulator? Here is a copy of the wireshark as a txt file
MissionUpload_txt.txt (18.8 KB)
I’ve also checked this theory by making the heartbeat frequency higher. This wireshark has heartbeats sending from GCS → simulator every 100 ms, and the mission upload is much faster and you can still see the same pattern of waiting for the heartbeat to be received before sending a response
MissionUpload100ms_txt.txt (24.2 KB)
Could it be related to signatures?
Resolved! I had the signing bit set to true but wasn’t adding a signature. Setting the signing flag to false fixed my issue