a software controller for radio repeaters on raspberry pi
tested with:
- Raspberry GNU/Linux 12 (bookworm)
- serial interface board from gmrstwowayradio.com
- FTDI USB -> Serial cable
- Retevis 97S
-
Install Raspberry Pi OS 13
-
Install sox (audio) with
sudo apt install sox -
Blacklist the HDMI drivers
sudo vim /etc/boot/firmware/config.txtand comment the following lines:# Enable DRM VC4 V3D driver #dtoverlay=vc4-kms-v3d #max_framebuffers=2
-
Blacklist the headphone driver
sudo vim /etc/modprobe.d/blacklist-alsa.confand add the lineblacklist snd_bcm2835 -
Reboot
-
Clone the repository into
~/src/ -
Install Python 3.11 & pipenv
sudo apt install pipenv -
Change to
~/src/pyrepeater/pyrepeater/ -
Run
pipenv install
- Replace the files in the
soundsdirectory with WAV files crafted for your repeater. - Copy
pyrepeater/.env.exampletopyrepeater/.envand edit the settings to reflect your preferences (see settings below).
- Change to
pyrepeater/pyrepeater - Run
pipenv shell - Run
python __init__.py
the following ENV variables should be set in the .env file prior to entering the pipenv virtual environment
-
SERIAL_PORT=/dev/ttyUSB0- the location of your serial device
-
PRE_TX_DELAY=1.0- the number of seconds (float) to wait between enabling the serial pins and beginning the transmission audio
-
POST_TX_DELAY=1.0- the number of seconds (float) to wait between ending the transmission and disabling the serial pins
-
FCC_ID=WRXC682- currently unused (future: CW ID generation)
-
SCHEDULE_TOH=False- currently unused (future: timed periods relative to top of hour or start time)
-
ID_MINS=15- period of CW ID announcements in minutes (int)
-
RPT_INFO_MINS=60- period of repeater info announcements in minutes (int)
-
ID_WHEN_ASLEEP=False- send CW IDs when repeater is idle for a prolonged period
-
RPT_INFO_WHEN_ASLEEP=False- send repeater info messages when repeater is idle for a prolonged period
-
SLEEP_AFTER_MINS=10- after this many minutes of inactivity, put the repeater in sleep mode
-
WAKE_AFTER_SEC=2- if repeater is asleep and becomes busy, wait this many seconds (int) before transitioning back to active state (prevents short key ups from disrupting sleep)
-
MIN_REC_SEC=2- minimum seconds for a valid recording (WAV file will be deleted if it does not exceed this length)
- repeater modes (day/night/net)
- ansible
- systemd service
- blacklist headphone jack modules
- single command install (ie. homebrew/ohmyzsh curl .....)
