Skip to content

Instantly share code, notes, and snippets.

@darksidelemm
Last active August 25, 2017 10:02
Show Gist options
  • Save darksidelemm/61649608da4e96b8a966a679bc31d14f to your computer and use it in GitHub Desktop.
Save darksidelemm/61649608da4e96b8a966a679bc31d14f to your computer and use it in GitHub Desktop.
SatNOGS APRS SatGate
Running a 2m SatNOGS Ground Station? How about turning it into an APRS SatGate!
The idea is we tap off audio received by the fm_demod.grc flowgraph (compiled to satnogs_fm_demod.py) and feed this into Direwolf (an AFSK soundmodem). Direwolf runs constantly, and attempts to process received data whenever the FM demod flowgraph runs (which is basically for all observations except BPSK, APT, and CW). The CPU overhead of direwolf is minimal - I've been able to run it on a RPi3 without overruns.
MODIFICATIONS TO fm_demod.grc
-----------------------------
Edit fm_demod.grc in gnuradio-companion. If you're feeling masochistic, you can X-forward this from the ground station machine.
Add in a Float-to-Short Block, and a UDP sink.
Set the Float-to-Short block to have a scaling factor of 32767.
Set the UDP sink to have:
- Input type: Short
- Destination IP Address: 127.0.0.1
- Destination Port: 7355
- Send Null Packet as EOF: False
See http://imgur.com/SiMAXzJ for a reference.
Generate the python file (satnogs_fm_demod.py) and copy this to /usr/local/bin/, overwriting the existing file.
Now whenever the fm demod flowgraph is run, the audio samples will be streamed to UDP port 7355 on localhost, with a 48kHz sample rate and 16-bit signed int samples - exactly what direwolf wants :-)
DIREWOLF SETUP
--------------
Install direwolf, either from source or a package manager.
Create a config file direwolf.conf with the following contents:
ADEVICE UDP:7355 null
ACHANNELS 1
CHANNEL 0
MYCALL YOURCALL-3
MODEM 1200
AGWPORT 8000
KISSPORT 8001
IGSERVER aunz.aprs2.net
IGLOGIN YOURCALL YOURAPRSISPASS
PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=34^43.24S long=138^41.57E comment="SatNOGS Scheduled SatGate"
IGFILTER m/5
IGTXLIMIT 6 10
Update the callsign/aprs-is-pass/lat-long etc as appropriate. Please don't use my stations lat/long :-)
Create a script to start up direwolf, maybe satgate.sh, containing:
#!/bin/bash
direwolf -r 48000 udp:7355 -c /home/youruser/direwolf.conf -t 0
(I realise specifying the source info on the command line is kind of redundant, but meh.)
You can then run this at startup in a screen session by adding the following to /etc/rc.local:
su - youruser -c "screen -dm -S direwolf /home/youruser/satgate.sh"
If all is working, you should see packets appear during the next ISS pass, which will be automatically gated into APRS-IS!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment