Skip to content

Instantly share code, notes, and snippets.

@moorer2k
Last active January 29, 2024 01:35
Show Gist options
  • Save moorer2k/b29fa54948a19f6e70df30cb8b3fd6cc to your computer and use it in GitHub Desktop.
Save moorer2k/b29fa54948a19f6e70df30cb8b3fd6cc to your computer and use it in GitHub Desktop.
Automated setup created for DietPi on an RPI2 for RTL-SDR pager decoding using mutlimon-ng and pagermon. Uses version managers for node and python to keep it isolated + correctly compiled.
#DietPi setup script for RTL-SDR/Multimon-ng/Pagermon for decoding pager messages(FLEX/POCSAG etc.)
cat <<EOF >no-rtl.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
EOF
mv no-rtl.conf /etc/modprobe.d/
apt install -y git-core git wget curl cmake libusb-1.0-0-dev build-essential libpulse-dev libx11-dev
#requred for pyenv python 2.7 building
apt install -y make build-essential libssl1.0-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev
mkdir SDR
cd SDR/
git clone https://github.com/osmocom/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build/
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
make
make install
ldconfig
cp /root/SDR/rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
cd ~/SDR/
git clone https://github.com/EliasOenal/multimon-ng.git
cd multimon-ng/
mkdir build
cd build/
cmake ..
make
make install
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
source ~/.bashrc
nvm install 8.9.3
nvm use 8.9.3
nvm alias default 8.9.3
npm install pm2 -g
export NODE_ENV=production
pm2 install pm2-logrotate
pm2 logrotate -u user
cd ~
#Python version management system
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
#rm -fr ~/.pyenv # removes pyenv
#locate openssl lib to prevent build errors
CFLAGS=-I/usr/include/openssl LDFLAGS=-L/usr/lib pyenv install -v 2.7
pyenv global 2.7
cd ~/SDR/
git clone https://github.com/davidmckenzie/pagermon.git
cd pagermon/server/
npm install
cd ../client/
npm install
@b0bje
Copy link

b0bje commented May 1, 2018

thanks for sharing! this is awesome, got me decoding pocsag2400 in no time

@howtophil
Copy link

Pagermon never seems to get any messages. The README has no real instructions on getting it up and running...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment