Giter Site home page Giter Site logo

pi-rtlsdr-igate-docker's Introduction

Dockerfile and systemd script for running an APRS IGate (via Direwolf) on a RaspberryPi with an attached RTL-SDR dongle.

I've tested this on a RaspberryPi 3, but it only takes < 20% CPU so I bet it runs on any RaspberryPi.

Usage

Make sure you have Docker installed on the RaspberryPi. You probably want to run

curl -sSL https://get.docker.com | sh

After that, you can easily run the version I have in Docker Hub (no need to even clone this repo). Replace YOURCALLHERE with your HAM callsign (e.g. mine is KK6GIP) and YOURPASSWORDHERE with your APRS password (generate one here) in the below command.

docker pull johnboiles/pi-rtlsdr-igate
docker run --privileged -e MYCALL=YOURCALLHERE -e APRS_PASSWORD=YOURPASSWORDHERE -it

You now have a functioning IGate on your RaspberryPi! If you also want to send a beacon with the position of your IGate you can pass a latitude and longitude via environment variables.

docker run --privileged -e MYCALL=YOURCALLHERE -e APRS_PASSWORD=YOURPASSWORDHERE -e LATITUDE=30.1234 -e LONGITUDE=-90.1234 -e COMMENT="RaspberryPi + RTL-SDR + Direwolf" -it johnboiles/pi-rtlsdr-igate

OR you can use a connected NMEA GPS to send position packets by setting the NMEA_GPS environment variable

docker run --privileged -e MYCALL=YOURCALLHERE -e APRS_PASSWORD=YOURPASSWORDHERE -e NMEA_GPS=/dev/ttyACM0 -e COMMENT="RaspberryPi + RTL-SDR + Direwolf" -it johnboiles/pi-rtlsdr-igate

OR you can use a running gpsd instance by setting the GPSD_HOST (and optional GPSD_PORT) environment variables. You can use dockerhost to point back to the host machine. Note that you must use --net=host to access gpsd at localhost.

docker run --privileged -e MYCALL=YOURCALLHERE -e APRS_PASSWORD=YOURPASSWORDHERE -e GPSD_HOST=localhost --net=host -e COMMENT="RaspberryPi + RTL-SDR + Direwolf" -it johnboiles/pi-rtlsdr-igate

systemd script

I've also included a systemd script which makes it easy to have the RaspberryPi start the IGate. To use it copy the systemd file to the appropriate location.

sudo cp docker-igate.service.example /etc/systemd/system/docker-igate.service

Then edit the file to reflect your callsign, APRS password and (optionally) location.

sudo nano /etc/systemd/system/docker-igate.service

Now start the service for the first time

sudo systemctl daemon-reload
sudo systemctl start docker-igate

Make sure it's running with docker ps and systemctl status

docker ps
sudo systemctl status docker-igate

Then optionally tell systemd to start the service at boot

sudo systemctl enable docker-igate

You can see logs from the container by running

docker logs -f docker-igate

Push a new version to Docker Hub

This is mostly for my own reference. But you might want to run a variation of this command if you fork the Dockerfile and want to push it to Docker Hub (replace the docker hub repo with your repo).

docker build . --tag "johnboiles/pi-rtlsdr-igate:latest"
docker push johnboiles/pi-rtlsdr-igate:latest

TODO

  • Configure logging in a smarter way, probably in the systemd script (right now all logs from the Docker container go to /var/log/syslog)

pi-rtlsdr-igate-docker's People

Contributors

johnboiles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pi-rtlsdr-igate-docker's Issues

docker-igate.service.example problem

Everything works great except: sudo systemctl start docker-igate, which yields this:
pi@raspberrypi:~ $ sudo systemctl start docker-igate
Failed to start docker-igate.service: Unit docker-igate.service has a bad unit file setting.
See system logs and 'systemctl status docker-igate.service' for details.

I added callsign/APRS ID and docker-igate runs fine from command line.

I tried editing docker-igate.service.example to no avail

What logs to look at?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.