github f4exb/sdrangel v3.10.0
Run external commands from the GUI

latest releases: v7.20.0, v7.19.1, v7.19.0...
6 years ago

Run external commands from the GUI

This is mostly intended to power users.

Added possibility to launch processes from the GUI. This is set up and controlled from the commands view which details are described here This implements issue #49

Using the web REST API you can launch automated processes like the PTT (Push To Talk). In the swagger examples one can find the example of a PTT Python script. This is a working example however since the API does not cover all plugins yet this will work only with HackRF, LimeSDR or RTLSDR.

As an example in order to set this scenario up in the commands view you need to create a pair of commands one supporting the Rx to Tx and the other the Tx to Rx. You can create the first one then duplicate it and modify the copy.

To create the Rx to Tx:

  • click on the "new" icon
  • in the edit box fill the group and description for example:
    • PTT for the group
    • Transmit for the description
  • locate the ptt.py script with the file dialog
  • type in -a %1:%2 -d %3 -t for the arguments
  • click on the "Key" button and type in the key you would like to use for PTT (ex: space bar)
  • click on the checkbox at the left of the "Key" button
  • confirm with OK

To create the Tx to Rx duplicate the first command and edit it:

  • change the description to Receive for example
  • for the arguments remove the -t: -a %1:%2 -d %3
  • click on the release check box
  • confirm with OK

To activate the newly created PTT key click on the button with the keyboard icon at the very right of buttons at the bottom of the commands tree view. Please note that if you do other actions in other windows in the meantime you may loose command control via keyboard in which case the keyboard button is released. You need to click it again to recover control.

The provided PTT script assumes that the Rx and Tx device sets (tabs) are next to each other (like R0 and T1) and that the Rx tab is active at the time the PTT is engaged for transmission.

This was tested successfully in a RTL-SDR (Rx) and HackRF (Tx) configuration. Please note that the ptt.py script will not work with LimeSDR Rx and Tx combination. With LimeSDR you should keep the Tx stream running and use the NFM modulator channel mute to stop transmission.

All commands with the same associated key are launched in parallel. This opens a new range of possibilities. For example you can combine the script that controls Rx/Tx in SDRangel with another one that handles PA control (you need to synchronize it with the Rx/Tx script as all scripts run in parallel). Then you don't need any physical connection between the Rx/Tx hardware and the PA. Everything would run in software. To launch commands in parallel you can also put all related commands in the same group and use the run button while the group is selected in the command tree view.

Other changes and fixes

  • AM, SSB demodulators and SSB modulator: fix sample rate handling. This solves issue #117
  • Enhancements to presets processing and GUI
  • Improved build and system info logging
  • Web API: added function to set device set focus and get focused device set index in the instance summary (GUI only)

Don't miss a new sdrangel release

NewReleases is sending notifications on new releases.