Spectrum signature from a Software Defined Radio, directly in the REPL !
This small package intends to render in the terminal the output spectrum from a Software Defined Radio.
It is very similar to the GnuRadio tool
rx_ascii_art_dft and has a similar API
Simply add the package from the Julia Package Manager
] add AbstractSDRs_rx_ascii_art_dft
The package relies on both AbstractSDRs for SDR management and UnicodePlots for the REPL rendering. No functions are exported and the spectrum can be obtained with the following command
The following parameters are supported
sdr: SDR type supported by AbstractSDRs (for instance :uhd). A symbol is expected
carrierFreq: Carrier Freq in Hz (e.g 2400e6)
samplingRate: Radio sampling rate in Hz (e.g 2e6)
gain: gain in normalized scale (e.g 20)
nFFT: Size of the FFT/DFT as an
avg: averaging factor for PSD computation as an
canvas: Canvas used to display. Can be AsciiCanvas, DotCanvas or BlockCanvas (see UnicodePlots.jl documentation)
heigthto control the size of the plot.
❗️These parameters can help to have a proper visualisation but be sure that the terminal you are working on is larger than setup size (otherwise graphic issues will occur)
kwargs...: All arguments supported by AbstractSDRs to open configure and monitor radio devices
It is possible to change the magnitude axis during acquisition to zoom in/out and to shift the center magnitude. By default the plot is centered around 0dB and have 120dB dynamic. By pressing different keys we can:
UP arrowto shit the center limit up
DOWN arrowto shift the center down
LEFT arrowto zoom out (increase range)
RIGHT arrowto decrease range of ylims (zoom in)
Note that it is not possible to change radio parameters during runtime such as carrier frequency of sampling Rate.
Any PR are welcome
Assuming we have an SDR from Ettus research (known as
:uhd in AbstractSDRs), with the IP address "192.168.10.11" and we want to compute the PSD with some averaging ratio (256) and we want to inspect the spectrum @ 780MHz to see any communications
and we can observe the following result