Skip to content

hg2ecz/smallrx

 
 

Repository files navigation

smallrx

This is an amateur radio receiver in no more than 100 lines of code.
(If we only count code, not the comments that make it easily understandable.)

It can receive AM/NFM/SSB transmissions with an RTL-SDR.

📺 Presentation:

For more insight, you can watch the talk I gave on this project at SDRA-2018.

🔠 The block diagram of its internals:

   IQ samples from SDR HW -> [U8->float conversion] -> [Frequency translation] ----------+
                                                                                         |
   audio output <- [float->S16 conversion] <+- [FM demod] <-+ [Decimating FIR filter]  <-+
                                            +- [AM demod] <-+
                                            +- [SSB demod] <+

By default, it requires a 240 ksps complex U8 input signal, and generates a 48 ksps S16 output audio signal.

🔨 To build:

git clone https://github.com/ha7ilm/smallrx
cd smallrx
make

#️⃣ Command line parameters:

./rx <centeri_frequency_in_hz> <receiver_frequency_in_hz> <l[sb]|u[sb]|a[m]|f[m]>

🎧 To demodulate NFM at 145.325 MHz using an RTL-SDR:

rtl_sdr -f145300000 - | ./rx 145300000 145325000 f | aplay -c1 -fS16_LE -r48000

🎧 To demodulate AM at 0.873 MHz using a HackRF:

hackrf_transfer -s 2400000 -f 893000 -a1 -r- | csdr convert_s8_f | csdr fir_decimate_cc 10 | csdr gain_ff 30 | csdr convert_f_u8 | ./rx 893000 873000 a | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio -

🚀 To test throughput:

cat /dev/urandom | ./rx 145300000 145325000 f | csdr through > /dev/null

📘 Notes:


Contributors

About

📻 amateur radio receiver in 64 lines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 52.5%
  • Rust 41.4%
  • Shell 5.0%
  • Makefile 1.1%