# How connect to cube orange to raspberrypi 4 model b

**URL:** <https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800>\
**Category:** Uncategorized\
**Created:** [11 July 2021 02:18 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800 "2021-07-11T02:18:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [11 July 2021 02:18 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/1 "2021-07-11T02:18:05Z")

</div>

hello everyone, I’m trying to run dronekit codes with raspberry pi, but I can’t connect cube orange, it says no heartbeat. What’s the solution?

---

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [12 July 2021 03:54 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/2 "2021-07-12T03:54:56Z")

</div>

Are you using gpio uart or usb uart?

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [12 July 2021 16:13 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/3 "2021-07-12T16:13:44Z")

</div>

Hi!

This video is very straighforward of how to do it.

[![](https://img.youtube.com/vi/kB9YyG2V-nA/maxresdefault.jpg "Make Your Own Pixhawk Raspberry Pi Drone in 36 Minutes (2020) | The Ultimate Project Drone") ](https://www.youtube.com/watch?v=kB9YyG2V-nA)

Works for me.  
bye

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [13 July 2021 10:10 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/4 "2021-07-13T10:10:54Z")

</div>

I’m connecting to uart via telem2

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [13 July 2021 10:15 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/5 "2021-07-13T10:15:54Z")

</div>

thanks for the feedback, i did the same but still getting the error so did you use cube orange

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [13 July 2021 10:39 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/6 "2021-07-13T10:39:54Z")

</div>

now i am getting this error ERROR:dronekit:Exception in message handler for HEARTBEAT  
Traceback (most recent call last):  
File “/usr/local/lib/python3.7/dist-packages/dronekit/ **init**.py”, line 1531, in notify\_message\_listeners  
fn(self, name, msg)  
File “/usr/local/lib/python3.7/dist-packages/dronekit/ **init**.py”, line 1223, in listener  
raise APIException(“mode (%s, %s) not available on mavlink definition” % (m.custom\_mode, m.base\_mode))  
dronekit.APIException: mode (0, 4) not available on mavlink definition  
.  
I can give orders to cube via mavproxy.

---

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [14 July 2021 06:31 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/7 "2021-07-14T06:31:58Z")

</div>

If you are using gpio for connection for 3b or newer, you have to disable the bluetooth because it occupies the gpio tx/rx.

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [14 July 2021 15:17 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/8 "2021-07-14T15:17:07Z")

</div>

this is my links.

 ![400206600620_265589](https://discuss.cubepilot.org/uploads/default/original/2X/3/3318eb752ad472362667ea7cdf215e20ea9e20df.jpeg)  
this is the code i use:  
{  
from dronekit import connect

vehicle = connect(‘/dev/ttyAMA0’, baud=57600, wait\_ready=True)

print(“I’m connected”)  
}

I can connect with mavproxy.

 ![20210714_175406](https://discuss.cubepilot.org/uploads/default/original/2X/4/4d74eed84531dd141b7868cc0c6c4a8219030958.jpeg)

the error i got:

 ![IMG-20210714-WA0005](https://discuss.cubepilot.org/uploads/default/original/2X/e/e548c23dace2d7db5ba68e5c9141b2d63ac20371.jpeg)

my reference is [https://youtu.be/kB9YyG2V-nA](https://youtu.be/kB9YyG2V-nA) .Thank you for your interest

---

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [15 July 2021 02:58 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/9 "2021-07-15T02:58:53Z")

</div>

Can you try on telem1 and see if you would get the same error?

---

<div class="post-metadata">

**Author:** ![saumyaranjan\_mohanty](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/saumyaranjan_mohanty/32/2437_2.png) [@saumyaranjan\_mohanty](https://discuss.cubepilot.org/u/saumyaranjan_mohanty)\
**Post date:** [15 July 2021 09:19 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/10 "2021-07-15T09:19:02Z")

</div>

> [@Bayram\_Sabanci](#):
>
> ?

which firmware are you using? ardupilot or px4?

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [15 July 2021 09:48 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/11 "2021-07-15T09:48:14Z")

</div>

arducopter v 4.0.7

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [15 July 2021 09:52 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/12 "2021-07-15T09:52:58Z")

</div>

unfortunately still same error, i will change another parameter from mission planner serial2.

---

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [19 July 2021 03:10 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/13 "2021-07-19T03:10:40Z")

</div>

It’s weird that Cube Orange can be connected through mavlink but not dronekit.  
Can you confirm there’s no other problem/service occupying the connection?

---

<div class="post-metadata">

**Author:** ![Bayram\_Sabanci](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/bayram_sabanci/32/4180_2.png) [@Bayram\_Sabanci](https://discuss.cubepilot.org/u/Bayram_Sabanci)\
**Post date:** [19 July 2021 09:28 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/14 "2021-07-19T09:28:32Z")

</div>

we have some experience in these works. is there any resource you can recommend? We actually built everything from scratch. I used the [Communicating with Raspberry Pi via MAVLink — Dev documentation](https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html) and [https://youtu.be/kB9YyG2V-nA](https://youtu.be/kB9YyG2V-nA) this link. thank you

---

<div class="post-metadata">

**Author:** ![Alvin](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/alvin/32/1000_2.png) [@Alvin](https://discuss.cubepilot.org/u/Alvin)\
**Post date:** [20 July 2021 08:20 UTC](https://discuss.cubepilot.org/t/how-connect-to-cube-orange-to-raspberrypi-4-model-b/6800/15 "2021-07-20T08:20:01Z")

</div>

Yes. I made a few companion raspberry pi setups.

> [@Indoor Autonomous Flight with Cube, ROS and Aruco Board (Ongoing)](https://discuss.cubepilot.org/t/indoor-autonomous-flight-with-cube-ros-and-aruco-board-ongoing/351/2):
>
> Install ROS on Raspberry Pi This tutorial is referenced to the [ardupilot.org](http://ardupilot.org/dev/docs/ros-install.html) Setup is as shown below: Components FMU The Cube Black Companion Computer Raspberry Pi 3B System Ubuntu Mate 16.04 Camera Pi Camera v2 SD card At least 8 GB Power Source for Companion Computer 5000mAh Portable USB Power Bank You will need a keyboard, a mouse, and a HDMI monitor to setup your pi. Prepare the Operation System on Pi You can find the detailed installation procedure [here](https://www.raspberrypi.org/forums/viewtopic.php?t=225763) but it is tr…

And the same way works on my pi 4b.
