kopia lustrzana https://github.com/w2bro/aprs-pigate
Optionally disable SDR. Direwolf Logs & logrotate
rodzic
3aeeec8746
commit
326217fb8a
15
README.md
15
README.md
|
@ -1,11 +1,23 @@
|
|||
# aprs-pigate
|
||||
Prebuilt Raspberry Pi image for running a HAM radio APRS Internet Gateway using [direwolf] and [rtl-sdr]
|
||||
|
||||
## Usage
|
||||
## Getting Started
|
||||
|
||||
### Installation
|
||||
1. Download & Flash the image to an SD card
|
||||
2. Insert SD card into a computer and load your wpa_supplicant.conf into boot if you are using wifi, and drop in a [pigate.conf](files/boot/pigate.conf) with your Callsign and password. You can use any custom direwolf config file here, enabling many different hardware configurations!
|
||||
3. Insert into a raspberry pi with RTL-SDR plugged into USB, and power up! If everything was configured correctly, in about 5 minutes you should see it pop up on [aprs.fi].
|
||||
|
||||
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.
|
||||
|
||||
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 `pigate.conf`. See the [`rtl-dw-start.sh`] startup script for more details.
|
||||
|
||||
## Contributing & Development
|
||||
This project uses the following dependencies:
|
||||
- Docker for Mac >= 2.3.2.0 (currently in edge)
|
||||
|
@ -19,3 +31,4 @@ Run `make build` to start building your first image.
|
|||
[`flash`]: https://github.com/hypriot/flash
|
||||
[`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
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# We might not have an audio output device so set to null.
|
||||
# We will override the input half on the command line.
|
||||
# We might not have an audio output device so set second param to null.
|
||||
# null input will be overwritten on the command line if not disabling SDR
|
||||
ADEVICE null null
|
||||
ARATE 24000
|
||||
CHANNEL 0
|
||||
|
||||
# Set your callsign here
|
||||
# Set your callsign here with its appropriate APRS SSID
|
||||
# I use SSID 10 for igate
|
||||
MYCALL XXXXXX-10
|
||||
|
||||
|
@ -18,10 +19,7 @@ IGSERVER noam.aprs2.net
|
|||
|
||||
# You also need to specify your login name and passcode.
|
||||
# http://apps.magicbug.co.uk/passcode/
|
||||
IGLOGIN XXXXXX-10 1234
|
||||
IGLOGIN XXXXXX-10 0123
|
||||
|
||||
# Set your GPS coordinates for the igate to show up on the map
|
||||
PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R at=42^37.14N long=071^20.83W comment="RPi SDR DireWolf I-Gate https://pigate.dev"
|
||||
|
||||
# That's all you need for a receive only IGate which relays
|
||||
# messages from the local radio channel to the global servers.
|
||||
PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=42^37.14N long=071^20.83W comment="RaspberryPi RTL-SDR IGate https://pigate.dev"
|
||||
|
|
|
@ -34,6 +34,5 @@ timezone: "America/Chicago"
|
|||
final_message: "The system is finally up, after $UPTIME seconds"
|
||||
|
||||
runcmd:
|
||||
# Copy over user's predefined pigate conf to autostart
|
||||
- [ mv, "/boot/pigate.conf", "/home/pi/pigate.conf"]
|
||||
- [ chown, "pi:pi", "/home/pi/pigate.conf"]
|
||||
- "cp /boot/pigate.conf /home/pi/pigate.conf"
|
||||
- "chown pi:pi /home/pi/pigate.conf"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/home/pi/aprslogs/aprs.log {
|
||||
daily
|
||||
dateext
|
||||
copytruncate
|
||||
rotate 14
|
||||
compress
|
||||
missingok
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
rtl_fm -f 144.39M - | direwolf -c /home/pi/direwolf/sdr.conf -r 24000 -D 1 -
|
||||
if test -f "/boot/DISABLE_SDR"; then
|
||||
direwolf -c /home/pi/pigate.conf -L /home/pi/aprslogs/aprs.log
|
||||
else
|
||||
rtl_fm -f 144.39M | direwolf -c /home/pi/pigate.conf -L /home/pi/aprslogs/aprs.log
|
||||
fi
|
||||
|
|
|
@ -13,9 +13,15 @@
|
|||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"touch /boot/ssh"
|
||||
"touch /boot/ssh",
|
||||
"mkdir -p /home/pi/aprslogs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "files/etc/logrotate.d/direwolf",
|
||||
"destination": "/etc/logrotate.d/direwolf"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "packer/base.sh"
|
||||
|
@ -56,6 +62,11 @@
|
|||
"type": "file",
|
||||
"source": "files/boot/user-data.yaml",
|
||||
"destination": "/boot/user-data"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "files/boot/meta-data",
|
||||
"destination": "/boot/meta-data"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue