This project generates a Raspberry Pi Image for the Software TNC / AX.25 packet modem Direwolf using the Buildroot embedded firmware toolchain.
The goal project is to create a rock solid, ready to use and easy to upgrade firmware image containing all required components for Direwolf-based applications.
This is unpolished, unfinished work in progress, prebuild images are not yet available. Use Buildroot to build the firmware (see instructions below).
You'll need:
- Raspberry Pi 3 / 3+
- USB audio interface (Signalink, cheap C-Media adapter ...) to the TRX
- Optional: USB control interface for your TRX (e.g. USB-RS232 cable)
- Optional: GPS board or USB GPS
The main design goals are robustness and tight integration of all included components. The device can be switched off / lose power without filesystem corruption.
- The SD card image only contains a FAT32 partition.
- The root filesystem is run from initramfs and will be reset after each reboot.
- All mutable configuration resides on the Raspberry Pi FAT32 partition (mounted on
/boot/
). The mount point is managed by automount and unmounted after 5 seconds of inactivity.
- Chrony: Local timekeeping using GPS and NTP (if available)
- OpenSSH: Remote access
- systemd-networkd: Network setup
- iwd: Wifi setup
- systemd-journald: In-memory logging
- rngd: Hardware RNG support
- watchdog: Support for bcm2835 wachdog
- BlueZ 5: Bluetooth stack
Please read the excellent Buildroot user manual and install all requirements listed there.
git clone -b 2019.02 https://git.busybox.net/buildroot
git clone https://github.com/markuslindenberg/aprspi.git
cd buildroot
make BR2_EXTERNAL=../aprspi aprspi_raspberrypi3_64_defconfig
make
This will bootstrap and compile a cross compilation toolchain and build all software including the Linux kernel from source and generate a SD card image in output/images
.
- The root password for console access is
aprspi
and currently it's hardcoded 😱. - To enable SSH access put a authorized_keys file on the SD card. It will be used for the root account.
It is planned to eventually implement a web interface but for now the TNC has to be set up manually using SSH or console access.
All persistent configuration files are placed on the SD card's FAT32 filesystem and can also be copied from/to the SD card manually.
aprspi will use DHCP to configure the ethernet and wifi interfaces.
Wifi is managed by iwd
, See iwctl help
for iwctl's usage.
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl connect "some network"
Reboot aprspi using reboot
or use systemctl restart iwd-restore.service
to save all known wifi networks on the SD card.
If rigctld
should be used by Direwolf for PTT, place a file rigctld.txt
on the SD card (/boot/rigctld.txt
):
OPTIONS=-m 234 -r /dev/ttyUSB0 -s 9600
See rigctld -h
and rigctld -L
for help. By default rigctld is running on 127.0.0.1:4532
in dummy mode.
Use arecord
to monitor audio level from the TRX to the TNC:
arecord -f s16 -r 44100 -V mono /dev/null
Press Ctrl+C
to interrupt.
The audio level can be adjusted using pactl
:
pactl set-source-volume @DEFAULT_SOURCE@ 16384
pactl set-sink-volume @DEFAULT_SINK@ 32768
Both values can be put into volume.txt
on the SD card to automatically adjust the volume:
# Set audio levels for input and output between 0-65536
OUTPUT=32000
INPUT=22000
Create a file direwolf.conf
on the SD card.
See the Dire Wolf User Guide on how to configure beaconing etc.
ADEVICE default
CHANNEL 0
#PTT /dev/ttyUSB0 RTS
#GPSD
The TNC can be accessed over the network on port 8000 (AGW) or 8001 (KISS).
Bluetooth is enabled, any device can pair with aprspi
without PIN.
APRSdroid works using TNC (KISS)
with Bluetooth SPP
connection on channel 1.
Bluetooth pairings are saved in bluetooth.tgz
on the SD card on reboot
or by using systemctl restart bluetooth-restore.service
.
Replace the Image
file on the SD card and reboot.
- Automated builds
- Webinterface for configuration/monitoring/upgrading
- Other applications that use a soundcard