Raspberry Pi 5 compatibility

Hi everyone, I’m trying to establish connection between the Raspberry Pi 5 with the radiolink pixhawk V2 from the raspberry pi 5 but it seems like no serial connection is being detected by the mavproxy.

My goal is to able to run dronekit’s script in the pi and send the flight command to the pixhawk. I have been following instructions and tutorials but all of them are for Rpi4 or earlier model. I’m running the latest pi os on the pi. Did anyone manage to achieve that?

1 Like

Exactly the same issue.

I would start with an FC that’s supported by Ardupilot.

How did you connect the RPi to the FC? GPIO shouldn’t differ between RPi4 and 5, as far as I’m aware.

1 Like

I think its not about the flight controller, because I can easily get the data from flight controller with Raspberry Pi 3 and 4. By the way, I tried both flight controllers I have; Durandal and RadioLink MiniPix. They both can connect to RPi 3 and 4 but not the RPi 5.

Okay, looks like GPIO access did change between RPi4 and 5… read through this: https://forums.raspberrypi.com/viewtopic.php?t=362821

1 Like

Someone had new updates? I have the same problem!!!

As per the documentation at https://www.raspberrypi.com/documentation/computers/configuration.html#raspberry-pi-5, GPIO14/15 map to /dev/ttyAMA0 on the Pi5. It is enabled by putting dtparam=uart0 in /boot/firmware/config.txt

For me dont work. this is my config.txt

For more options and information see

http://rptl.io/configtxt

Some settings may impact device functionality. See link above for details

Uncomment some or all of these to enable the optional hardware interfaces

#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

Enable audio (loads snd_bcm2835)

dtparam=audio=on

Additional overlays and parameters are documented

/boot/firmware/overlays/README

Automatically load overlays for detected cameras

camera_auto_detect=1

Automatically load overlays for detected DSI displays

display_auto_detect=1

Automatically load initramfs files, if found

auto_initramfs=1

Enable DRM VC4 V3D driver

dtoverlay=vc4-kms-v3d
max_framebuffers=2

Don’t have the firmware create an initial video= setting in cmdline.txt.

Use the kernel’s default instead.

disable_fw_kms_setup=1

Run in 64-bit mode

arm_64bit=1

Disable compensation for displays with overscan

disable_overscan=1

Run as fast as firmware / board allows

arm_boost=1

[cm4]

Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.

otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]
dtoverlay=uart0
enable_uart=1
dtoverlay=disable-bt
dtparam=uart0

There are quite a lot of comments, which is NOT commented in your config.

Can you upload the config file directly?

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]
dtoverlay=uart0
dtoverlay=disable-bt
dtparam=uart0

this is my config! You can chat me on discord? matheusrodriguess

and another thing, if i try mavros connect it’s work! Just uxrce no, both are running in a docker container (different containers and not the same time)

Hi, did you manage to figure it out? I am facing the exact same problem.

Here’s what I did for a pi5 and pi4:
Raspberry Pi Serial Port Setup

To setup the serial port on the Raspberry Pi top be able to connect it to the flight controller, you need to do some configuration on the Pi:

  1. Edit /boot/firmware/config.txt
  • On the Raspberry Pi 5 you have to edit /boot/firmware/config.txt and set these two params:
enable_uart=1
dtoverlay=uart0
  • And on a Raspberry Pi 4 you have to edit /boot/firmware/config.txt and set these three params instead:
enable_uart=1
dtoverlay=uart0
dtoverlay=disable-bt
  1. Remove ModemManager, it will conflict with your serial port:

sudo apt remove modemmanager

  1. Ensure permissions are set correctly on /dev/ttyAMA0

sudo chown root:dialout /dev/ttyAMA0 sudo chmod 660 /dev/ttyAMA0

  1. Add user to the dialout group:

sudo usermod -aG dialout ubuntu

  1. Disable agetty on /dev/ttyAMA0 agetty is typically used for serial console access. If you don’t need this, disable it. It is possible it isn’t enabled already, if not then that’s OK:

sudo systemctl stop serial-getty@ttyAMA0.service sudo systemctl disable serial-getty@ttyAMA0.service

  1. Remove serial console access from the boot configuration:

sudo vi /boot/firmware/cmdline.txt

Remove any reference to console=serial0,115200 or console=ttyAMA0. 7. Reboot

sudo reboot

  1. To test if it’s working, you can try to connect with mavproxy:

pip3 install mavproxy mavproxy.py --master=/dev/ttyAMA0 --baudrate=921600

1 Like

Hi, when I try the 3 step I get that “sudo”, “chmod” and “660” files dont exist.
I dont know what to do, help please.

Are you able to share what is the OS you are using?

Hi,

Finally I made a reboot and revised the connections and now it works, thank you for your response!