I am trying to figure out how I can send mavlink commands to my SITL environment.  I have SITL running on my linux mint VM and I have my own python code generated from mavgen.py which decoded the mavlink messages from SITL.

My SITL experiment is just a generic copter in a loop going to 5 different geo points.  I have a separate script that sends out LAND commands or SETMODE commands which does work on my real drone.  I am just trying to get my SITL environment to receive the commands.  I assume this can be done?

If I run netstat I see

tcp        0      0  *               LISTEN      8644/arducopter-qua

tcp        0      0  *               LISTEN      8644/arducopter-qua

tcp        0      0  *               LISTEN      8644/arducopter-qua

tcp        0      0         ESTABLISHED 8644/arducopter-qua

udp        0      0  *                           8644/arducopter-qua

udp        0      0          ESTABLISHED 8644/arducopter-qua

I am hoping I can just send the commands to one of those ports and I have tried UDP port 5501 and TCP port 5760 and none of them seem to work?

Am I doing something wrong, can this be done, I am hoping someone may have some advice for me as all I want to do is send real hand crafted mavlink commands to my SITL environment and it respond?

Thanks in advance,


Views: 615

Reply to This

Replies to This Discussion


Could you get this working?

I am trying to do something similar with PX4 SITL.

Please let me know if it worked for you.

Reply to Discussion


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service