Luaradio SDR toolchain

Інсталяція JIT LUA

Компіляція

git clone https://github.com/vsergeev/luaradio.git
cd luaradio/embed
sudo make install-lmod

Залежності

sudo apt-get install luajit libluajit-5.1-dev pkg-config
sudo apt-get install -y gnuplot
sudo apt-get install libliquid-dev libvolk2-dev libfftw3-dev

Запуск

luaradio ./rtlsdr_ssb.lua 14.225e6 usb

Запуск luaradio через pipeline до свистка

rtl_sdr -g 44.5 -f 103000000 - | /usr/local/bin/luaradio /home/admin/luaradio/examples/stdin_wbfm_mono.lua

local radio = require('radio')



--local tune_offset = -250e3
local tune_offset = 0

-- Blocks
local source = radio.IQFileSource(io.stdin, 's8', 2048000)
local tuner = radio.TunerBlock(tune_offset, 200e3, 5)
local fm_demod = radio.FrequencyDiscriminatorBlock(1.25)
local af_filter = radio.LowpassFilterBlock(128, 15e3)
local af_deemphasis = radio.FMDeemphasisFilterBlock(75e-6)
local af_downsampler = radio.DownsamplerBlock(5)
local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('wbfm_mono.wav', 1)

-- Plotting sinks
local plot1 = radio.GnuplotSpectrumSink(2048, 'Demodulated FM Spectrum', {yrange = {-120, -40}})

-- Connections
local top = radio.CompositeBlock()
top:connect(source, tuner, fm_demod, af_filter, af_deemphasis, af_downsampler, sink)
if os.getenv('DISPLAY') then
    --top:connect(fm_demod, plot1)
    
end

top:run()