Our thanks to CemaXecuter, author of DragonOS distribution for the time spent testing, experimenting with our tool and ensuring integration into DragonOS. His help is invaluable to us.
On DragonOS distribution, the application executable and basic examples are located in /usr/src/SDR4space
.
cd ~
git clone https://github.com/SDR4space/Examples/ SDRVM_latest
cd SDRVM_latest
git checkout DragonOS
A couple of examples are requiring registered license to enable specific modules ( ZMQ support, WebServer, DDC channels). Feel free to write us at contact@sdr-technologies.fr, providing informations on your project to get more informations on licensing.
The main config file settings.js
stored at the top root of the project is used as a template config file for the sub-folders.
Update this file according to your setup by adapting variables:
var sdr_device='driver=plutosdr';
var sample_rate=5e6;
settings.js
will be copied to sub-directories at first launch (if missing), BUT only once.cd /usr/src/SDR4space/RX
./sdrvm
Running the ./sdrvm executable with no arguments will start the boot.js
script by default (if present)
Scripts are tested using gnuplot-x11 application.
gnuplot-qt works also. Maybe !
For some scripts we are using gnuplot_app
variable defined in main settings.js
file.
Please take a minute to check if path is valid (hint: use 'which gnuplot' to get path to gnuplot).
// Define GNUplot path
var gnuplot_app='/usr/bin/gnuplot';
You have choice to get your plots on screen or saved to file. Even both.
Edit .gnu
file and adapt according your needs.
#GUI output
#set term x11 size 800,500
# output to file
set term png size 1200,500
set output "/tmp/spectrum.png"
#GUI output
set term x11 size 800,500
# output to file
#set term png size 1200,500
#set output "/tmp/spectrum.png"
# output to file
set term png size 1200,500
set output "/tmp/spectrum.png"
plot "/tmp/spectrum.csv" using ($1):2 with lines lt rgb "red" title 'spectrum'
#GUI output
set term x11 size 1200,500
replot
pause -1
Note : by using the GPU optimized version of our product (usually on Jetson platforms), you need to run sdrvm
as sudo !
---------------------------------------------------------------------------------
SDRVM Version v1.0 - Build : 2021xxxx
(c) SDR-Technologies SAS - www.sdrtechnologies.fr
---------------------------------------------------------------------------------
Creating Radio Device factory
Disk free space : 7.6 %
JavaScript SDR/Sat/DSP and more
Usage:
sdrvm [OPTION...]
-a, --autoload Automatic load of license file (default: true)
-r, --request Generate a license request for this machine
-t, --timing Enable timing for each running task
-h, --help Print usage
-f, --file arg Script file name/url/archive
-w, --web Enable Webserver at boot
-p, --port Web server TCP port (overwrite value in
conf/sdrvm.conf)
-d, --workdir arg working directory, default is program location
-v, --verbose Verbose mode (default: true)
-g, --gps arg set GPS NMEA source port input (ex: /dev/ttyACM0),
default baudrate is 9600
-b, --baudrate arg GPS Baudrate (default: 9600)
-s, --service Runs as system daemon
By default SDRVM will try to open boot.js
script in current directory if the script name (-f
switch) is NOT specified
A script can be run from different sources :
./sdrvm -f test.js
./sdrvm -f http://my_server/path/test.js
boot.js
, then launch it : ./sdrvm -f ./test.zip
SDRVM will handle .cf32
, .cs16
and .cs8
extension for filename as IQobject, and .wav
as sound file.
That said, we can open a .cf32 file; read it then save it as different name, using CS16 extension.
CF32 --> CS16 conversion is done !
Please see the documentation section for more detailed informations.
Check SoapySDR
Use SoapySDR
Most of the script are written using the soapySDR driver, for compatibility reason.
Declaring JSradio object.
var rx = Soapy.makeDevice({'query' : 'driver=rtlsdr' }) ;
var rx = Soapy.makeDevice( {'query' : 'driver=bladerf' });
DDCBank examples (2 channels and more) are requiring a registered license.