A BeagleBone Blue Setup Guide

this is by final setup list of commands to get the latest ardupilot working with 4 serial ports, canbus, SBUS, LUA external I2c, ADC and 6v servo power.

Using bone-debian-10.13-console-armhf-2023-04-06-1gb.img.xz

echo "debian ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/debian >/dev/null
connmanctl services | grep 'YOUR_SSID' | grep -Po 'wifi_[^ ]+'
connmanctl services <OUTPUT-FROM-CONNMANCTL-COMMAND>`
sudo nano /var/lib/connman/wifi.config
[service_<OUTPUT-FROM-CONNMANCTL-COMMAND>]
 Type = wifi
 Security = wps
 Name = YOUR_SSID
 Passphrase = password
sudo chmod 0600 /var/lib/connman/wifi.config
sudo sed -i '/init-eMMC-flasher/s/^#//' /boot/uEnv.txt
sudo reboot

the leds will strobe when its copying don’t touch it until all the lights go off.

sudo apt update
sudo apt -y dist-upgrade
sudo apt install -y git cpufrequtils locales lsb-release
sudo dpkg-reconfigure locales

en_US.UTF-8
cd /opt/scripts && git pull && cd ~
sudo /opt/scripts/tools/update_kernel.sh --kernel 4.19.94-bone-rt-r43
sudo nano /boot/uEnv.txt

dtb=am335x-boneblue.dtb
dtb_overlay=/lib/firmware/BB-I2C1-00A0.dtbo

#uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

sudo sed -i 's/GOVERNOR="ondemand"/GOVERNOR="performance"/g' /etc/init.d/cpufrequtils
sudo nano /etc/default/ardurover

Setting the UDP IP to 255.255.255.255 lets any computer connect from any ip.

# WiFi Telemetry
SERIAL0="-A udp:255.255.255.255:14550"

# Radio Telemetry1 (UART1 - "UT1")
SERIAL1="-C /dev/ttyS1"

# GPS1 (UART2 - "GPS")
SERIAL3="-B /dev/ttyS2"

# Radio Telemetry2 (UART0 - "UT0")
SERIAL2="-D /dev/ttyS0"

# Radio Telemetry3 (UART5 - "UT5")
SERIAL4="-E /dev/ttyS5"
sudo nano /lib/systemd/system/ardurover.service
[Unit]
Description=ArduRover Service
BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
StartLimitIntervalSec=0
Conflicts=arducopter.service arduplane.service antennatracker.service

[Service]

ExecStartPre=-/usr/bin/ardupilot/aphw
EnvironmentFile=/etc/default/ardurover
ExecStart=/usr/bin/ardupilot/ardurover $SERIAL0 $SERIAL1 $SERIAL3  $SERIAL2  $SERIAL4
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target
sudo mkdir -p /usr/bin/ardupilot

sudo wget -O /usr/bin/ardupilot/ardurover https://firmware.ardupilot.org/Rover/stable/blue/ardurover
OR
sudo wget -O /usr/bin/ardupilot/ardurover https://firmware.ardupilot.org/Rover/latest/blue/ardurover

sudo chmod 0755 /usr/bin/ardupilot/ardurover
sudo systemctl enable ardurover.service
cd ~
mkdir scripts
sudo ln -s /home/debian/scripts /scripts

sudo nano /usr/bin/ardupilot/aphw

#!/bin/bash
# aphw
# ArduPilot hardware configuration.

/bin/echo 80 >/sys/class/gpio/export
/bin/echo out >/sys/class/gpio/gpio80/direction
/bin/echo 1 >/sys/class/gpio/gpio80/value
/bin/echo pruecapin_pu >/sys/devices/platform/ocp/ocp:P8_15_pinmux/state

/sbin/ip link set up can0 type can bitrate 1000000
sudo chmod 0755 /usr/bin/ardupilot/aphw
sudo systemctl mask serial-getty@ttyO0.service
sudo systemctl mask serial-getty@ttyS0.service

sudo reboot

once you have everything working run this and reboot to cpy it to the SD card as a backup

sudo opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh

I wish i bought one of these years ago…

also discovered since its a linux flight controller its compatible with all the cool networking features being added.