<p>After referring to lot of documents and mavlink message format, I was finally able to send heartbeat to the QGroundControl from the sample code without Ardupilot/PX4. I modified the code</p>
<pre><code>mavlink_msg_heartbeat_pack(1, 1, &amp;msg, MAV_TYPE_HELICOPTER, MAV_AUTOPILOT_GENERIC, 0, 0, 0);
</code></pre>
<p>and was able to receive the data at QGC end. It seems like default system id and component id values was key to communicate with the QGC. Now, since the first step is accomplished would look in transmitting other various parameters to QGC from mavlink RPi.</p>
<p>Thanks</p>

CC BY-SA 4.0
2020-11-25T16:44:06.297Z
2020-11-25T16:44:06.297Z
TheLazy
<p>I am trying to connect Mavlink (installed on RPi) with QGroundControl via 3DR Radio Telemetry as to transmit telemetry data from RPi without dependency of Ardupilot/Px4 flightcontrollers. I want to achieve transmitting data such as GPS or Postion using the message format of mavlink without dependency of ardupilot/PX4.</p>
<p>So far, I have taken the example code from <a href="https://github.com/mavlink/c_uart_interface_example" rel="nofollow noreferrer">mavlink</a> git and have built the code as per instructions. I start the QGroundControl and was able receive the System ID and component ID from QGC. I modified the code to transmit a heartbeat from RPI-mavlink to QGroundControl.</p>
<pre><code>mavlink_msg_heartbeat_pack(system_id, 200, &amp;msg, MAV_TYPE_HELICOPTER, MAV_AUTOPILOT_GENERIC, MAV_MODE_GUIDED_ARMED, 0, MAV_STATE_ACTIVE);

int len_hb = write_message(msg);
</code></pre>
<p>After building and executing this code, I was expecting the QGroundControl to connect/show received message, but nothing was available at the QGroundControl.</p>
<p>I need to understand if what I am doing is the right way to do or if there is predefined method to establish such kind of communication. Kindly, help me out with documentations (if any) available to accomplish message transmission without ardupilot/Px4.  If someone could guide me on this issue, it would be really helpful.</p>
<p>P.S: I have posted the same Question on <a href="https://stackoverflow.com/questions/64981118/connect-mavlink-on-rpi-with-qgroundcontrol">StackOverflow</a></p>
<p>Thanks</p>

<telemetry><raspberry-pi>
Connect mavlink (on RPi) with QGroundControl
TheLazy
# Connect mavlink (on RPi) with QGroundControl

(Asked by: username_0 on 2020-11-24)

I am trying to connect Mavlink (installed on RPi) with QGroundControl via 3DR Radio Telemetry as to transmit telemetry data from RPi without dependency of Ardupilot/Px4 flightcontrollers. I want to achieve transmitting data such as GPS or Postion using the message format of mavlink without dependency of ardupilot/PX4.

So far, I have taken the example code from [mavlink](https://github.com/mavlink/c_uart_interface_example) git and have built the code as per instructions. I start the QGroundControl and was able receive the System ID and component ID from QGC. I modified the code to transmit a heartbeat from RPI-mavlink to QGroundControl.

```
mavlink_msg_heartbeat_pack(system_id, 200, &msg, MAV_TYPE_HELICOPTER, MAV_AUTOPILOT_GENERIC, MAV_MODE_GUIDED_ARMED, 0, MAV_STATE_ACTIVE);

int len_hb = write_message(msg);

```

After building and executing this code, I was expecting the QGroundControl to connect/show received message, but nothing was available at the QGroundControl.

I need to understand if what I am doing is the right way to do or if there is predefined method to establish such kind of communication. Kindly, help me out with documentations (if any) available to accomplish message transmission without ardupilot/Px4. If someone could guide me on this issue, it would be really helpful.

P.S: I have posted the same Question on [StackOverflow](https://stackoverflow.com/questions/64981118/connect-mavlink-on-rpi-with-qgroundcontrol)

Thanks

**Tags:** telemetry, raspberry-pi


---

## 1 answers

### Answer by username_0 on 2020-11-25. Score: 0 | Accepted answer

After referring to lot of documents and mavlink message format, I was finally able to send heartbeat to the QGroundControl from the sample code without Ardupilot/PX4. I modified the code

```
mavlink_msg_heartbeat_pack(1, 1, &msg, MAV_TYPE_HELICOPTER, MAV_AUTOPILOT_GENERIC, 0, 0, 0);

```

and was able to receive the data at QGC end. It seems like default system id and component id values was key to communicate with the QGC. Now, since the first step is accomplished would look in transmitting other various parameters to QGC from mavlink RPi.

Thanks


---

