We are going to use a Raspberry Pi as a transmitter and our RTL-SDR setup to decode the signal.
Here is a video showing ascii @ 9600bps and 1200bps
- Find a Raspberry Pi and set up a Pifm transmitter as described on the Imperial College Robotics Society Wiki page
Install minimodem with alsa support on your RTL-SDR (receiver) and minimodem 0.8.1 with wav file support on your Raspberry Pi (transmitter) :
- sudo apt-get update
- sudo apt-get install minimodem
In a nutshell :
- minimodem will do the encoding in a flac or in a wav format
- we send the audio file with Pifm.
- On the reciever we send the audio to minimodem for decoding
Here is a pseudo blockdiagram
Here are the principales commandes
- pi$ minimodem –tx -f test.wav 1200
- pi$ sudo ./pifm test.wav
- receiver$ multimode.py ; # use the recording check box for saving the audio to test.wav
- receiver$ minimodem –rx -f test.wav 1200
Putting it all together on the transmitter (raspeberry pi)
we will send the value hello afsk world with the current date, here are the setting for sending the 48k wav file from minimodem as a 1200bps 8b AFSK signal on 80 MHz:
pi$ echo -e “hello afsk world : `date +%c`” | minimodem –tx -f -8 1200 -f send.wav && sudo ./pifm send.wav 80.0 48000
for sending the data every 4sec :
pi$ while true ; do echo -e “hello afsk world : `date +%c`” | minimodem –tx -f -8 1200 -f send.wav && sudo ./pifm send.wav 80.0 48000 ; sleep 4;done
Put it all together on the receiver side :
Fire up you best FM receiver software (you can use sdr#, gqrx , multimode , etc … see RTL-SDR Receiving) and tune to the frequencies previously set on the Raspberry Pi i.e. 80 MHz) :
All eyes all ears , you can monitor the signal on the receiver.
Now , we have to decode the audio.
we can save the audio file .. or we can make a clever use of pulseaudio : just set the default capture device to the monitor of your output device from the fm reciever , i.e. : minimodem is capturing the sound that is played trough a specific sound card
Start minimodem with the alsa  flag ‘-A’ and the same setting used on the transmitter
receiver$ minimodem -A -8 1200
Start pavucontrol to connect the audio of minimodem and watch the AFSK being decoded by minimodem.
You can also use rtl_fm (no gui for a lower cpu overhead) to decode the fm sample to the default alsa device.
receiver$ rtl_fm -f 80.0e6 -W -s 200000 -r 48000 -o 6 | aplay -r 48k -f S16_LE
Remember to always turn off the pifm transmitter after usage :
pi$ touch /tmp/empty && sudo ./pifm /tmp/empty
1 : just use the ‘default’ alsa hook with pulseaudio, no need to set a specific hdw , https://wiki.debian.org/en/PulseAudio#Installing_PulseAudio. You may want to increase the default value when using pulesaudio and gnuradio , ex :
period_time = 0.020 # in seconds
nperiods = 30 # total buffering = period_time * nperiods
verbose = true