Skip to content

Commit

Permalink
Better start script name
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmckelvie committed Jul 9, 2020
1 parent 930c73e commit 983951a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ packer_cache
.DS_Store
wpa_supplicant.conf
sdr.conf
*.zip
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
GIT_HASH := $(shell git rev-parse --short HEAD)

all: clean build

clean:
Expand All @@ -15,4 +17,8 @@ build: docker
-v ${PWD}/output-arm-image:/build/output-arm-image \
-e PACKER_CACHE_DIR=/build/packer_cache \
docker.pkg.github.com/solo-io/packer-builder-arm-image/packer-builder-arm build packer/aprs-pigate.json
mv output-arm-image/image output-arm-image/aprs-pigate.img
mv output-arm-image/image aprs-pigate.img


archive:
zip -jrX9 aprs-pigate-${GIT_HASH}.zip output-arm-image/aprs-pigate.img
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# aprs-pigate
Prebuilt Raspberry Pi image for running a HAM radio APRS Internet Gateway using [direwolf] and [rtl-sdr]

## Feature List
:star: Pre-compiled `direwolf` and `rtl-sdr` library

:star: Pre-configured cron job runs every minute to make sure direwolf is running

:star: Logrotate keeps text file logs for the last 14 days and auto deletes older logs

:star: Works out-of-the-box receive-only igate with the [rtl-sdr] v3 kit.

:star: Easily configured for digipeater operation with a usb sound card connected to a radio

## Getting Started

### Installation
Expand All @@ -11,12 +22,12 @@ Prebuilt Raspberry Pi image for running a HAM radio APRS Internet Gateway using
Once the pi is running, it should be available on your network with hostname `aprs-pigate` and accessible via SSH `pi@aprs-pigate` using the default raspberry password. It is a good idea to change this once logged in, or disable passwords altogether and use SSH keys, which you can do by modifying the `user-data` file accessible on the boot partition after flashing.

### Viewing Dire Wolf Output
The startup script creates a `screen` and executes the startup script [`rtl-dw-start.sh`]. If at any time you want to explore the logs, you can ssh into your pigate and run the command `screen -r direwolf`. CTRL+C to leave the screen.
The startup script creates a `screen` and executes the startup script [`pigate-start.sh`]. If at any time you want to explore the logs, you can ssh into your pigate and run the command `screen -r direwolf`. CTRL+C to leave the screen.

Logs are also written to `/home/pi/aprslogs/aprs.log`. You can view these with commands like `less` or `tail`, and generally may be easier to work with than the direwolf screen.

### Customizing the Start Script
If you are setting up a digipeater, you can disable the Software Defined Radio by creating an empty file `DISABLE_SDR` and placing it into the boot folder of your SD card along with `direwolf.conf`. See the [`rtl-dw-start.sh`] startup script for more details.
If you are setting up a digipeater, you can disable the Software Defined Radio by creating an empty file `DISABLE_SDR` and placing it into the boot folder of your SD card along with `direwolf.conf`. See the [`pigate-start.sh`] startup script for more details.

## Contributing & Development
This project uses the following dependencies:
Expand All @@ -29,7 +40,7 @@ Run `make build` to start building your first image.
[aprs.fi]: https://aprs.fi
[direwolf]: https://github.com/wb2osz/direwolf
[`flash`]: https://github.com/hypriot/flash
[`pigate-start.sh`]: files/home/pi/pigate-start.sh
[`packer-build-arm-image`]: https://github.com/solo-io/packer-builder-arm-image/
[rtl-sdr]: https://www.rtl-sdr.com/
[`rtl-dw-start.sh`]: files/home/pi/rtl-dw-start.sh
[wpa_supplicant.conf]: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
2 changes: 1 addition & 1 deletion files/home/pi/dw-start-cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# e.g. DIREWOLF="/usr/local/bin/direwolf"
DIREWOLF="direwolf"

DWCMD="/home/pi/rtl-dw-start.sh"
DWCMD="/home/pi/pigate-start.sh"

# Where will logs go - needs to be writable by non-root users
LOGFILE=/var/tmp/dw-start.log
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions packer/aprs-pigate.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
},
{
"type": "file",
"source": "files/home/pi/rtl-dw-start.sh",
"destination": "/home/pi/rtl-dw-start.sh"
"source": "files/home/pi/pigate-start.sh",
"destination": "/home/pi/pigate-start.sh"
},
{
"type": "file",
Expand All @@ -54,7 +54,7 @@
"type": "shell",
"inline": [
"chmod +x /home/pi/dw-start-cron.sh",
"chmod +x /home/pi/rtl-dw-start.sh",
"chmod +x /home/pi/pigate-start.sh",
"chown -R pi:pi /home/pi"
]
},
Expand Down

0 comments on commit 983951a

Please sign in to comment.