Send Mavros StatusText to QGC

Hey guys,

I want to send strings to QGC. I am using a companion computer that is running MAVROS connected to TELM2 of Pixhawk. QGC is connected over Telemetry (TELM1 on pixhawk) on a different computer. I would like to send messages (best would be short srings) from my companion computer over Telemetry to the ground station.

I found the mavros_msgs::StatusText would be a good choice. However, I dont receive statustext messages in GQC. What am I might doing wrong?

Is mavros/statustext/send the right message in order to send the message? However, I also tried mavros/statustext/recv but it didnt work either.

_pub_statusText = nodeHandle.advertise<mavros_msgs::StatusText> ("/mavros/statustext/send", 10);

This is my send function:

void UAV_controller:: send_statusText(std::string status_)
{
  mavros_msgs::StatusText send_status;

  send_status.header.stamp = ros::Time::now();

  send_status.severity = send_status.CRITICAL;
  send_status.text = status_;
  

  _pub_statusText.publish(send_status);
}

On the companion computer I do:
roslaunch mavros px4.launch fcu_url:="/dev/ttyUSB0:921600"
and afterwards I start my code.

Please help! Any hints are highly appreciated.

I did find the solution by myself. I had to set the MAV_X_FORWARD parameter. Now it is working properly.

We are trying to do the same thing but we are having issues in HITL. Can you share more details. Do you remember which MAV_X_FORWARD did you enable, was it TELM2?

Hi Did you find answer for this question ? Which parameter should I enable for communication ? Is it MAV_X_FORWARD ? where x represents the port at which companion computer is connected ?

If I am using HITL, what is X here ? ( please note in HITL no radio on TELEM 1, the companion PC is on TELEM 2 . I have connected the PX using USB port)