SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
These are all Python scripts using python-requests so you have to install this package as a prerequisite either with your package manager or pip. Some scripts work with Python 3 while others are still with Python 2.7.
Adds a channel to a device set specifying device set index and channel type.
devicesetChannelPost
/sdrangel/deviceset/{deviceSetIndex}/channel
POST
Configure a SDRangel instance with a sequence of API calls defined as a list in a JSON file. See test.json
for an example.
It uses the following APIs:
devicesetDevicePut
/sdrangel/deviceset/{deviceSetIndex}/device
PUT
instancePresetPatch
/sdrangel/preset
PATCH
instanceDeviceSetPost
/sdrangel/deviceset
POST
instanceDVSerialPatch
/sdrangel/dvserial
PATCH
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST
Create a Tx device set with a LimeSDR Tx device and a NFM modulator channel configured to send some beacon Morse code. Then starts the Tx.
It uses the following APIs:
instanceDeviceSetPost
/sdrangel/deviceset
POST
devicesetDevicePut
/sdrangel/deviceset/{deviceSetIndex}/device
PUT
devicesetChannelPost
/sdrangel/deviceset/{deviceSetIndex}/channel
POST
devicesetChannelSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
PATCH
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST
Example of creating NFM channels (demodulator and modulator) and changing the settings
It uses the following APIs:
devicesetChannelPost
/sdrangel/deviceset/{deviceSetIndex}/channel
POST
instanceDeviceSetsPost
/sdrangel/devicesets
POST
devicesetChannelSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
PATCH
Handles the switchover between two arbitrary device sets
Depends on flask
and requests
: to install do pip install flask requests
in your virtual environment.
Implements a basic push to talk (PTT) feature. Verifies that devise set #0 is a Rx and that #1 is a Tx. Stops streaming on one device and start streaming on the other depending on the PTT move (Rx to Tx or Tx to Rx).
It uses the following APIs:
instanceDeviceSetsGet
/sdrangel/devicesets
GET
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST
devicesetDeviceRunDelete
/sdrangel/deviceset/{deviceSetIndex}/device/run
DELETE
Randomize channel colors for a specified device set
It uses the following APIs:
devicesetGet
/sdrangel/deviceset/{deviceSetIndex}
GET
devicesetChannelSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
GET
devicesetChannelSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
PATCH
This script runs continuously to act as the server side of SDRangel reverse API feature. It will respond with a copy of the settings when forwarding channel or device settings which is a valid reply and will also send back a valid reply when forwarding the device start/stop actions. The reverse API feature was implemented in version 4.3.2 and you can learn more about it in the Wiki.
It uses Python flask package for the server so you will need to either install it system wide or better create your own virtual environment and use the pip install flask
command once your virtual environment is activated. If you know Python then you know what a virtual environment is about.
Then in the virtual environment do:
By default the server will listen on port 5000. It was used to conveniently test the reverse API but actually does not do much. It can serve as a base to implement more complex scenarios to control other devices or software or other instances of SDRangel.
Make sure a RTLSDR device is selected on device set #0. Get and change the settings of this RTLSDR device.
It uses the following APIs:
devicesetGet
/sdrangel/deviceset/{deviceSetIndex}
GET
devicesetDevicePut
/sdrangel/deviceset/{deviceSetIndex}/device
PUT
devicesetDeviceSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/device/settings
GET
devicesetDeviceSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/device/settings
PATCH
Sets specified Rx in existing source device set or create a new source device set with this Rx. Adds an NFM demodulator channel.
It uses the following APIs:
devicesetPost
/sdrangel/deviceset
POST
devicesetGet
/sdrangel/deviceset/{deviceSetIndex}
GET
devicesetDevicePut
/sdrangel/deviceset/{deviceSetIndex}/device
PUT
devicesetDeviceSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/device/settings
GET
devicesetDeviceSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/device/settings
PATCH
devicesetChannelPost
/sdrangel/deviceset/{deviceSetIndex}/channel
POST
devicesetChannelSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
GET
devicesetChannelSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
PATCH
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST
Combines rx_test
and tx_test
to create a pair of source and sink device sets. The APIs used are the same as in rx_test
or tx_test
.
Simple AM and NFM scanner with multiple equally spaced channels. Stops whenever any of the channels squelch opens. At the moment the following sampling devices can be used:
Check ./scanner.py --help
for the options.
Requires numpy
☞ Try to first run with the -m
(mock) option to see what the scanner parameters will be. In particular pay attention to the computed sample rate that should be within range for your hardware. For devices with fixed or discrete rates make sure the computed sample rate does not exceed the unique device sample rate or the highest possible sample rate.
In addition to some APIs being used in other script it uses:
devicesetChannelsReportGet
/sdrangel/deviceset/{deviceSetIndex}/channels/report
GET
Starts or stops a device in the specified device set
It uses the following APIs:
instanceDeviceSetsGet
/sdrangel/devicesets
GET
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST
devicesetDeviceRunDelete
/sdrangel/deviceset/{deviceSetIndex}/device/run
DELETE
This works with a server instance only i.e. sdrangelsrv
. It will shutdown the instance nicely as you would do with the exit menu or Ctl-Q in the GUI application.
It uses this API:
instanceDelete
/sdrangel
DELETE
Sets specified Tx in existing sink device set or create a new sink device set with this Tx. Adds an NFM modulator channel.
It uses the following APIs:
devicesetPost
/sdrangel/deviceset
POST
devicesetGet
/sdrangel/deviceset/{deviceSetIndex}
GET
devicesetDevicePut
/sdrangel/deviceset/{deviceSetIndex}/device
PUT
devicesetDeviceSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/device/settings
GET
devicesetDeviceSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/device/settings
PATCH
devicesetChannelPost
/sdrangel/deviceset/{deviceSetIndex}/channel
POST
devicesetChannelSettingsGet
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
GET
devicesetChannelSettingsPatch
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings
PATCH
devicesetDeviceRunPost
/sdrangel/deviceset/{deviceSetIndex}/device/run
POST