SDR4space / Examples

Virtual Machine examples
24 stars 7 forks source link

SDRVM Examples on DragonOS

Documentation (commands reference) : http://sdrvm.sdrtechnologies.fr/

To get the latest PC or RPi VMBASE executable, go to our 'Download and Install page' : http://sdrvm.sdrtechnologies.fr/releases/#download-and-test

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.

DragonOS notes

On DragonOS distribution, the application executable and basic examples are located in /usr/src/SDR4space.

DragonOS images download
DragonOS applications upgrade (PC)

Update SDRVM examples

cd ~
git clone https://github.com/SDR4space/Examples/ SDRVM_latest
cd SDRVM_latest
git checkout DragonOS

License

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.

Main config file

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:

Quick start

cd /usr/src/SDR4space/RX
./sdrvm

Running the ./sdrvm executable with no arguments will start the boot.js script by default (if present)

GNUplot considerations

// Define GNUplot path
var gnuplot_app='/usr/bin/gnuplot';

Plots output

You have choice to get your plots on screen or saved to file. Even both. Edit .gnu file and adapt according your needs.

Output to file
#GUI output
#set term x11 size 800,500

# output to file
set term png size 1200,500
set output "/tmp/spectrum.png"
Output to screen
#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 and screen

# 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

Basic use

Note : by using the GPU optimized version of our product (usually on Jetson platforms), you need to run sdrvm as sudo !

Parameters:

---------------------------------------------------------------------------------
 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

Run a script

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 :

IQ file formats

File extension name

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 !

SDR capture devices

Please see the documentation section for more detailed informations. Check SoapySDR
Use SoapySDR

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' });

Examples index

IQ files

IQ operations

DDC

DDCBank examples (2 channels and more) are requiring a registered license.

Sat

GPS