Home        Store        Docs        Blog

Send text from Rpi to QGC

Hi,
i want to send text messages from Rpi to QGC. Which mavlink command should i use? can you share any documents related to it?

Hi,

Take a look in the mavlink message STATUSTEXT.

My best regards,

thanks for your reply Patrick
i have tried it , it shows no error, but QGC not showing any text.
the code i run on my RPi is given

from pymavlink import mavutil
master = mavutil.mavlink_connection(‘udpout:0.0.0.0:9000’)
text=“hello”
master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_CRITICAL,text,0)

i was trying to send a text to pixhawk and i expect that should reflect on my QGC . please guide me if there any mistake in my concept.

thanks and regards
-sudheesh

Hi,

You should add source_system=1 parameter in mavlink_connection to send “vehicle” information to QGC, by default the “source_system” value is 255, that’s the one used in ground control stations.

A minimal example:

# Import mavutil
from pymavlink import mavutil

# Create the connection
master = mavutil.mavlink_connection('udpout:0.0.0.0:14550', source_system=1)

# Send message
master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_CRITICAL, b"This is just a message.")

1 Like

Hi,
I have made s small change in the code to run it in RPi

#Import mavutil
from pymavlink import mavutil

# Create the connection
master = mavutil.mavlink_connection(‘udpout:192.168.2.1:14550’, source_system=1)

# Send message
master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_CRITICAL, b"This is just a message.")

issue solved, thanks for your help patrick
-sudheesh

This topic was automatically closed after 3 days. New replies are no longer allowed.