LTE Documentation

Overview

The LTE setup is used to transmit MAVLink data over a cellular connection to a groundstation. The groundstation must also have an internet connection, either via WiFi or wired tethering with a phone. Both the groundstation and Raspberry Pi are configured to connect to the same ZeroTier network, and the Pi sends data over UDP. The Pi connects to the Pixhawk flight controller via a USB A to C cable. It is “plug and play” in theory, and should start sending data headlessly as soon as it is powered, booted, and connected.

Hardware

Connect the hat to the top of the Pi, and use the right angle USB adapter to connect the hat's USB with the one on the Pi. Set the power switch on the hat to “USB”. Insert the SIM card and ensure the antennas are connected before powering on (both the RP-SMA and U.FL connectors).

Software Setup

Best Known Configuration

Ask @Nathan Green for the file. This config should work for a Rogers SIM on a Pi 3 B+. It auto configures the modem, starts ZeroTier and MAVProxy, and starts sending data to @Nathan Green 's laptop. This can be changed by reconfiguring ZeroTier with a new network and MAVProxy.service with a new IP. The boot partition of the SD card is set to read-only to prevent corruption from power loss, this has to be undone before any configuration changes are made.

Fresh Install

This is from memory and might not be entirely correct

Operating System

  • 64-bit Raspberry Pi OS with Desktop

Configuration Steps

ZeroTier
  • Install ZeroTier

curl -s https://install.zerotier.com | sudo bash
  • Join a ZeroTier network

zerotier-cli join [YOUR_NETWORK_ID]
MAVProxy
  • Install MAVProxy

sudo apt-get install python3-dev python3-opencv python3-wxgtk4.0 python3-pip python3-matplotlib python3-lxml python3-pygame pip3 install PyYAML mavproxy --user echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
  • Configure MAVProxy to start as a service on boot

Connect a Pixhawk to the Pi via USB, then check what device it is listed as. It will be something along the lines of /dev/ttyACM0 or /dev/ttyACM1.

Then creatre an empty service with nano:

Paste this in, replacing the username and IP address. The IP address is the one for the groundstation in ZeroTier, the username is local and was set during OS setup.

Enable the service:

Reboot

Modem + Interface
  • Update package lists and reboot

  • Install packages to interface with the modem, a UART interface is required for modem configuration

  • Enable UART

Navigate to “Interfacing Options” → “Serial” → “No” (this makes sense when you see the prompts), then reboot.

Connection can be tested temporarily using the following steps found here, this can be a useful troubleshooting step before continuing.

  • Edit the config file for the “wwan0” interface

Add the text below to the file, replacing the APN, USER, and PASS with the settings for your carrier. The Rogers ones can be found here. Leave the username and password blank if they are not required.

  • Edit the interfaces config file

Add the following line to bring up wwan0 automatically on boot:

Reboot

Check Functionality

After rebooting the Pi, wait a few minutes. Then using the groundstation computer, open Mission Planner. Select UDP and click connect in the top right corner, the port is the default. It should start streaming data from the Pixhawk.

Enable Write Protection

If everything works, write protection should be enabled to avoid SD card corruption and allow maintenance-free operation. The tutorial I used for this is here.