Any way to send prompt command using mavproxy?

Hi, My setup is Mavproxy with Pymavlink. So I been controlling my drone using my own python script through mavproxy. There is one issue when I want to add a new udp output to another IP and port, I have to either key in manually “output add XXX.XXX.XXX.XXX:14550” If not I would have to use my script to alter the command line to start mavproxy and reboot the system.

Anyway where I can inject the command from a script with the need to reboot or manually key in the commands?

Run MAVProxy in a screen session.
You can send commands actually text inputs to a detached screen session.
Take a look in here:

Thanks. But our mavproxy are run automatically using scripts. Just wonder how can I add additional mavlink destination without rebooting.

By using your scripts, start a screen session that will starts MAVProxy inside it.
Why you’re avoiding starting screen sessions?
This is a way adding another output without rebooting.
screen -S proxy -d -m bash -c "mavproxy.py --master tcp:127.0.0.1:5760 --out 127.0.0.1:14550"
You can send output add ... anytime you want to this session.

Because my the the script i created actually interact with the pilot through another interface, we want to make it seamless so the user do not need to dabble with prompt commands, instead the script can retrieve destination from database and just connect with a click.

The things you said are not an excuse to not use screen sessions.

You can automate screen sessions, as in the links I shared.
I don’t think there is a solution without modifying the source code of mavproxy to add outputs externally without screen sessions.
But modifying it is harder than just running:

screen -S proxy -X stuff 'output add XXX.XXX.XXX.XXX:14550^M';
1 Like