# Raspberry Pi to Pixhawk 6X USB question

**URL:** <https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272>\
**Category:** Companion (Retired)\
**Created:** [November 27, 2022, 10:34pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272 "2022-11-27T22:34:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 27, 2022, 10:34pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/1 "2022-11-27T22:34:22Z")

</div>

I have upgraded my Pixhawk to a 6X running PX4 while using the original raspberry pi companion. I was looking how to make sure the mavlink bi directional forwarding still works. It appears as:

/dev/serial/by-id/usb-Auterion\_PX4\_FMU\_v6X.x\_0-if00

I see a list of supported devices under tools/query-udevadm.py. Is this the appropriate place to add the new autopilot?

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 27, 2022, 11:18pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/2 "2022-11-27T23:18:08Z")

</div>

Hi @rdehart,

> [@rdehart](#):
>
> … running PX4 …

Interesting, I wasn’t even aware that [PX4 has (some) underwater vehicle support](https://docs.px4.io/main/en/frames_sub/). Out of interest, why have you chosen PX4 over ArduSub? 🙂

> [@rdehart](#):
>
> I have upgraded my Pixhawk to a 6X … while using the original raspberry pi companion.

It’s been a while since I looked around in our old Companion Software codebase - do you have a particular reason not to use BlueOS? Granted it also [doesn’t currently have Pixhawk 6X detection](https://github.com/bluerobotics/BlueOS-docker/blob/master/core/services/ardupilot_manager/flight_controller_detector/board_identification.py#L20-L29), but that’s something we could add if you can [provide us with the relevant information](https://discuss.bluerobotics.com/t/cube-orange-blueos-support/12407/5), or you could submit a pull request with the relevant changes 🙂

> [@rdehart](#):
>
> I see a list of supported devices under tools/query-udevadm.py. Is this the appropriate place to add the new autopilot?

I believe `query-udevadm.py` is only used for showing the Detected Devices on the web interface. You can add the information there if you want, but it won’t enable the MAVLink connection.

By default the MAVLink connection is [configured to `/dev/autopilot`](https://github.com/bluerobotics/companion/blob/master/params/mavproxy.param.default#L1). If you’re ok with it being manual, you should be able to just put your own device path there if you want - the MAVProxy settings are accessible [via the web interface](https://www.ardusub.com/reference/companion-web-ui.html).

If you’d prefer to have it automatically detected then you can add a line to [the udev rules](https://github.com/bluerobotics/companion/blob/master/params/100.autopilot.rules), and then copy the file over ([like is done in `setup.sh`](https://github.com/bluerobotics/companion/blob/master/scripts/setup.sh#L92)).

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 29, 2022, 1:37am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/3 "2022-11-29T01:37:24Z")

</div>

Thanks, the mavlink connection change did the trick. Were there any other items I needed to change?

> Interesting, I wasn’t even aware that [PX4 has (some) underwater vehicle support](https://docs.px4.io/main/en/frames_sub/). Out of interest, why have you chosen PX4 over ArduSub?

Direct control of each thruster, ROS compatibility and use of the PXFlow camera

> if you can [provide us with the relevant information](https://discuss.bluerobotics.com/t/cube-orange-blueos-support/12407/5)

To complicate matters, it only starts communicating when I have it both connected through a regular USB AND a USB to JST-GH coming out of Telem1 on the 6X. It wont work without both. See attached screenshot…

 ![Screenshot from 2022-11-28 20-36-16](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/e/e8166d7bc5db5c8daf4d3a4ebceb13c0e0b68a56.png)

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 29, 2022, 1:41am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/4 "2022-11-29T01:41:02Z")

</div>

Physical setup for clarification:

 ![PXL_20221129_013900907](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/e/e3eec4875c258c931b14ffc6e8a1400da779d06a.jpeg)

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 29, 2022, 1:41am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/5 "2022-11-29T01:41:26Z")

</div>

Otherwise, QGC seems to not see it

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 29, 2022, 1:57am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/6 "2022-11-29T01:57:52Z")

</div>

My main concern here is that I dont want to create some sort of weird network loop due to having in plugged in twice

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 29, 2022, 2:02am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/7 "2022-11-29T02:02:58Z")

</div>

> [@rdehart](#):
>
> Thanks, the mavlink connection change did the trick.

Great to hear 🙂

> [@rdehart](#):
>
> Were there any other items I needed to change?

It should work fine as is, but as mentioned if you want the name to show up nicely in the “Detected Devices” on the web interface then you could also add it to the `query_udevadm.py` file 🙂

> [@rdehart](#):
>
> Direct control of each thruster, ROS compatibility and use of the PXFlow camera

Are you controlling the individual thrusters via MAVLink messages then? I’m curious how that’s handled.

In case it’s relevant, it’s [_technically_ possible](https://discuss.bluerobotics.com/t/how-to-control-thrusters-independently/9870/11) to control individual thrusters in ArduSub as well, just generally not recommended because doing so is somewhat hacky at the moment, and because control generally works best with high frequency sensor data and minimal latency, which is only really possible within the autopilot firmware. That said, not every situation requires precise/minimal-latency control, and if you’re testing custom control algorithms then that can be a bit simpler to do in a higher level language program that then talks to the vehicle.

> [@rdehart](#):
>
> ROS compatibility

I’m told ArduSub has ROS support, via [the mavlink package](http://wiki.ros.org/mavlink).

> [@rdehart](#):
>
> use of the PXFlow camera

That [seems to be supported in ArduPilot firmwares](https://ardupilot.org/copter/docs/common-px4flow-overview.html), although I don’t believe we’ve tried it with ArduSub.

Regardless, thanks for the info 🙂

> [@rdehart](#):
>
> To complicate matters, it only starts communicating when I have it both connected through a regular USB AND a USB to JST-GH coming out of Telem1 on the 6X. It wont work without both. See attached screenshot…
> 
> ![PXL_20221129_013900907](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/e/e3eec4875c258c931b14ffc6e8a1400da779d06a.jpeg)

Huh, interesting… Any chance one of your USB cables is power only?

> [@rdehart](#):
>
> ![Screenshot from 2022-11-28 20-36-16](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/e/e8166d7bc5db5c8daf4d3a4ebceb13c0e0b68a56.png)

Thanks for the info! I’ve [raised an issue](https://github.com/bluerobotics/BlueOS-docker/issues/1240) for it 🙂

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [November 30, 2022, 7:12pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/8 "2022-11-30T19:12:00Z")

</div>

> Huh, interesting… Any chance one of your USB cables is power only?

Definitely not, I was plugging it in via the same USB-C cable to my computer earlier to upload firmware. I might ask the PX4 side of the house if they have ever seen something similar.

---

<div class="post-metadata">

**Author:** ![rafael.lehmkuhl](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rafael.lehmkuhl/32/6630_2.png) [@rafael.lehmkuhl](https://discuss.bluerobotics.com/u/rafael.lehmkuhl)\
**Post date:** [December 1, 2022, 7:24pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/9 "2022-12-01T19:24:28Z")

</div>

@rdehart, @EliotBR reached out to me, and [I’ve added Pixhawk 6X support in BlueOS](https://github.com/bluerobotics/BlueOS-docker/pull/1249). It should be merged in the next hours.

Since I don’t have this board on hands, could you test BlueOS with it to see if it works? Thanks in advance!

edit: Roddy, you can test the integration before merging going to Version Chooser, setting `rafaellehmkuhl/blueos-core` on the remote-repository field and downloading the `add-support-pixhawk-6x` image.

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 6, 2022, 12:43am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/10 "2022-12-06T00:43:30Z")

</div>

I fear I am not running BlueOS.

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 6, 2022, 12:45am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/11 "2022-12-06T00:45:09Z")

</div>

Follow up question:  
If I were to create a custom Mavlink message, would I need to recompile and reupload a new version of mavproxy on to the raspberry pi?

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [December 12, 2022, 5:59am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/12 "2022-12-12T05:59:18Z")

</div>

> [@rdehart](#):
>
> If I were to create a custom Mavlink message, would I need to recompile and reupload a new version of mavproxy on to the raspberry pi?

From the [ArduPilot “Adding a MAVLink message” docs](https://ardupilot.org/dev/docs/code-overview-adding-a-new-mavlink-message.html) it seems like you can add a new MAVLink message to mavproxy by re-installing pymavlink using the setup script (once you’ve added the new message to the relevant xml file), which presumably you should be able to do via terminal access to the Raspberry Pi.

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 13, 2022, 12:58am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/13 "2022-12-13T00:58:02Z")

</div>

So telemetry is forwarded by the Pi fine, but Ive still been having issues with the actuators using the actuator test. I bypassed the Pi and it worked. There must be some issue in either the current version of mavproxy on the Pi or something else. Additionally, QGC had very different actuator configurations when using the companion and when it is bypassed. I would still like to use the Pi for video, additional sensors, but can you verify whether an old version of mavproxy would affect QGC in this way?

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 13, 2022, 2:43am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/14 "2022-12-13T02:43:02Z")

</div>

OK, so I updated the companion to the latest (0.0.31, I was at 0.0.15) and now QGC doesnt see anything. I used wireshark to look for traffic on udp:14550 and dont see anything either. Any suggestions?

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 13, 2022, 2:43am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/15 "2022-12-13T02:43:43Z")

</div>

Current mavproxy settings  
 ![Screenshot from 2022-12-12 21-40-44](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/3/3c043d621b76431fd3862c0f08a1a7a33d4c7da8.png)

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [December 13, 2022, 3:05am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/16 "2022-12-13T03:05:29Z")

</div>

> [@rdehart](#):
>
> So telemetry is forwarded by the Pi fine …

That’s a positive start 🙂

> [@rdehart](#):
>
> … but Ive still been having issues with the actuators using the actuator test. I bypassed the Pi and it worked. … Additionally, QGC had very different actuator configurations when using the companion and when it is bypassed.

I’m not particularly sure what’s likely to be going wrong there.

> [@rdehart](#):
>
> There must be some issue in either the current version of mavproxy on the Pi or something else.  
> … can you verify whether an old version of mavproxy would affect QGC in this way?

I don’t really know, but given [the MAVProxy version in Companion was seemingly last updated 5 years ago](https://github.com/bluerobotics/companion/tree/master/submodules), and the Pixhawk 6X was released this year, it wouldn’t be overly surprising to me if there’s some kind of incompatibility there, especially given you’re using PX4 firmware (which I don’t believe we would have had reason to test with).

Our old Companion software is no longer being developed, and we don’t actively support it other than for customers who need to use the limited set of features that are not yet available in BlueOS (which I believe is about to be negligible), so there’s only so much digging around for information I can do here before it ends up in the “too hard” basket.

That’s further complicated by Companion only being designed and tested to work with the Pixhawk 1, and a single H264-encoded video stream, etc, so information about how to do custom modifications and integrations may not even be known by our software team.

> [@rdehart](#):
>
> OK, so I updated the companion to the latest (0.0.31, I was at 0.0.15) and now QGC doesnt see anything. I used wireshark to look for traffic on udp:14550 and dont see anything either. Any suggestions?

I don’t see anything obviously wrong with your mavproxy settings (although maybe there shouldn’t be an extra newline at the end, if that’s what your cursor is indicating?), so if it was making a connection before then it’s somewhat surprising that it isn’t after the update.

Did you update via the web interface, or just flash the new version onto the SD card? It may be worth flashing a fresh version if you haven’t already, just to rule out any potential issues with the updating process.

It may also be worth checking that the autopilot is still showing up the same way - maybe it’s showing up differently after the update, or maybe there’s a different service that’s trying to connect to it before mavproxy is able to.

You can join running services with `screen -r session_name` (e.g. `screen -r mavproxy`) to see the logs, in case there are any errors showing up (then press `ctrl-a` then `ctrl-d` to detach from the session without quitting it, or `ctrl+c` to quit it - quit sessions will restart when the vehicle does). It may be relevant to try commenting out the `ping` services in `.companion.rc`, especially if you’re not using any Ping sonar devices.

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 13, 2022, 1:49pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/17 "2022-12-13T13:49:30Z")

</div>

Thanks for the suggestions. I understand about the level of support you can provide. I re-imaged the flash drive itself rather than going via the website. Do you have an archive of previous companion images? perhaps an in-between one will partially work and give me more information.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [December 14, 2022, 12:29am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/18 "2022-12-14T00:29:01Z")

</div>

> [@rdehart](#):
>
> Do you have an archive of previous companion images?

Yep - the download URL structure is described [here](https://www.ardusub.com/resources/downloads.html#companion-computer-images) 🙂

It may be worth referring to the [release notes](https://github.com/bluerobotics/companion/blob/master/release-notes.txt) for what was supposed to be included/changed in each version.

---

<div class="post-metadata">

**Author:** ![rdehart](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rdehart](https://discuss.bluerobotics.com/u/rdehart)\
**Post date:** [December 20, 2022, 2:27pm UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/19 "2022-12-20T14:27:24Z")

</div>

So I got telemetry for the newest version working again (stupid mistake) and I attempted to upgrade mavproxy. It had trouble updating numpy because the lastest mavproxy wants 1.24 but the highest supported for python 2.7 is 1.16.

I noticed that it says here that the companion image can support a newer Raspberry Pi (v3B). Is that true?

[https://www.ardusub.com/resources/downloads.html#companion-computer-images](https://www.ardusub.com/resources/downloads.html#companion-computer-images)

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [December 21, 2022, 6:04am UTC](https://discuss.bluerobotics.com/t/raspberry-pi-to-pixhawk-6x-usb-question/13272/20 "2022-12-21T06:04:07Z")

</div>

> [@rdehart](#):
>
> So I got telemetry for the newest version working again

Good to hear 🙂

> [@rdehart](#):
>
> … I attempted to upgrade mavproxy. It had trouble updating numpy because the lastest mavproxy wants 1.24 but the highest supported for python 2.7 is 1.16.

If I’m remembering correctly, the latest Companion Software images should have Python 2.7 and 3.4 available by default. If you’re wanting to install a more recent Python version there are some instructions [here](https://discuss.bluerobotics.com/t/updating-python-in-companion/10398/2). That said, adapting existing services/programs to successfully use a different Python version may not be trivial, especially if they were written without Python 3 compatibility in mind.

> [@rdehart](#):
>
> I noticed that it says here that the companion image can support a newer Raspberry Pi (v3B). Is that true?
> 
> [https://www.ardusub.com/resources/downloads.html#companion-computer-images](https://www.ardusub.com/resources/downloads.html#companion-computer-images)

The Companion Software supports Raspberry Pi 3B hardware, yes - I wasn’t even aware there had been earlier hardware versions supported previously.

* * *

If it’s relevant, BlueOS is supported on Raspberry Pi 3B, 3B+, and 4B, and the base operating system for the images we build is Raspberry Pi OS Bullseye, which comes with Python 3.9 by default. The BlueOS-core docker image (which most of the services run in) also currently uses Python 3.9, although that may be upgraded soon.
