Skip to main content
Version: 2.8

Raspberry Pi (Linux)

meshtasticd is supported on all Raspberry Pi models.

armhf 32-bit

ChipsetModels
BCM2835Pi 1, Pi Zero 1
BCM2836Pi 2 v1.0, Pi 2 v1.1

arm64 64-bit

ChipsetModels
BCM2837Pi 3, Pi Zero 2, CM3, Pi 2 v1.2
BCM2711Pi 4, Pi 400, CM4
BCM2712Pi 5, Pi 500, CM5

Configuration

This page provides instructions for configuring a Raspberry Pi to work with Meshtastic, including enabling SPISPI (Serial Peripheral Interface). A bus used between the microcontroller and peripherals such as the LoRa radio and the display., I²CI2CA two-wire bus used to attach peripherals such as sensors and displays to a device., and UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. interfaces.

SPI

Enable SPISPI (Serial Peripheral Interface). A bus used between the microcontroller and peripherals such as the LoRa radio and the display. support for LoRaLoRaA low-power, long-range wireless communication technology used by Meshtastic devices to enable communication over distances of several kilometers without the need for cellular, Wi-Fi, or other traditional network infrastructures. Radio

  • This can be done by running the below commands on a Raspberry Pi (2-5)
sudo raspi-config nonint set_config_var dtparam=spi on /boot/firmware/config.txt # Enable SPI

# Ensure dtoverlay=spi0-0cs is set in /boot/firmware/config.txt without altering dtoverlay=vc4-kms-v3d or dtparam=uart0
sudo sed -i -e '/^\s*#\?\s*dtoverlay\s*=\s*vc4-kms-v3d/! s/^\s*#\?\s*(dtoverlay|dtparam\s*=\s*uart0)\s*=.*/dtoverlay=spi0-0cs/' /boot/firmware/config.txt

# Insert dtoverlay=spi0-0cs after dtparam=spi=on if not already present
if ! sudo grep -q '^\s*dtoverlay=spi0-0cs' /boot/firmware/config.txt; then
sudo sed -i '/^\s*dtparam=spi=on/a dtoverlay=spi0-0cs' /boot/firmware/config.txt
fi
  • Or this can be accomplished by manually enabling SPISPI (Serial Peripheral Interface). A bus used between the microcontroller and peripherals such as the LoRa radio and the display. support in /boot/firmware/config.txt:
dtparam=spi=on
dtoverlay=spi0-0cs

I²C

Enable I²CI2CA two-wire bus used to attach peripherals such as sensors and displays to a device. support

Enabled with:

sudo raspi-config nonint set_config_var dtparam=i2c_arm on /boot/firmware/config.txt # Enable i2c_arm

Or manually enabled in /boot/firmware/config.txt:

dtparam=i2c_arm=on

UART

Enable UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. support for GPSGPS (Global Positioning System). A satellite positioning system. A node with a GPS module determines its own location and can report that position to the mesh.

  • You can enable UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. by running the below commands (which additionally will disable serial console tty)
sudo raspi-config nonint do_serial_hw 0 # Enable Serial Port (enable_uart=1)
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console
  • Or you can manually enable UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. for GPSGPS (Global Positioning System). A satellite positioning system. A node with a GPS module determines its own location and can report that position to the mesh. hats by making modifications in /boot/firmware/config.txt:
# Needed for all Pi device.
enable_uart=1

# Needed for the Pi 5 only.
dtoverlay=uart0
  • The correct port for UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. GPSGPS (Global Positioning System). A satellite positioning system. A node with a GPS module determines its own location and can report that position to the mesh. on the Pi 5 after a reboot is /dev/ttyAMA0.
  • The correct port for UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. GPSGPS (Global Positioning System). A satellite positioning system. A node with a GPS module determines its own location and can report that position to the mesh. on earlier Pi versions after a reboot is /dev/ttyS0.
  • You may need to disable the serial console on a Pi and then reboot
sudo raspi-config nonint do_serial_cons 1 # Disable Serial Console