Playback using Webapi

vabanque
 

Hi,
 
I installed SDRangel 4.13.0 on Mac running Catanina using Mac ports.
I'm using a LimeSDR mini.
Everything works very well.
I did not found a way to save a session and restore it at next restart.
I found in a post webapi is the best choice.

I would like to playback a .sdriq file using the webapi.

I use a modified version of the example script limesdr_tx.py.
It creates a TX deviceset at device index 1,
configures it, creates a channel of type FileSource and configures
it setting fileName to the existing and accessible file 
/Users/SDR/SDRAngel/Samples/KeyFinder/KeyFinder-B.sdriq.
 
Here the debug output of the script:
 
url=http://127.0.0.1:8091/sdrangel/deviceset
method=POST
Add Tx device set succeeded
{
    "message": "Message to add a new device set (MsgAddDeviceSet) was submitted successfully"
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/device
method=PUT
setup LimeSDR on Tx device set succeeded
{
    "deviceNbStreams": 1,
    "deviceSetIndex": 1,
    "deviceStreamIndex": 0,
    "direction": 1,
    "displayedName": "LimeSDR[0:0] XXXXXXXXXXXXXX",
    "hwType": "LimeSDR",
    "index": 1,
    "sequence": 0,
    "serial": "LimeSDR Mini, media=USB 3.0, module=FT601, addr=24607:1027, serial=XXXXXXXXXXXXXX"
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/device/settings
method=GET
Get LimeSDR Tx settings succeeded
{
    "deviceHwType": "LimeSDR",
    "direction": 1,
    "limeSdrOutputSettings": {
        "antennaPath": 0,
        "centerFrequency": 435000000,
        "devSampleRate": 5000000,
        "extClock": 0,
        "extClockFreq": 10000000,
        "gain": 4,
        "gpioDir": 0,
        "gpioPins": 0,
        "log2HardInterp": 3,
        "log2SoftInterp": 0,
        "lpfBW": 5500000,
        "lpfFIRBW": 2500000,
        "lpfFIREnable": 0,
        "ncoEnable": 0,
        "ncoFrequency": 0,
        "reverseAPIAddress": "127.0.0.1",
        "reverseAPIDeviceIndex": 0,
        "reverseAPIPort": 8888,
        "transverterDeltaFrequency": 0,
        "transverterMode": 0,
        "useReverseAPI": 0
    }
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/device/settings
method=PATCH
Patch LimeSDR Tx settings succeeded
{
    "deviceHwType": "LimeSDR",
    "direction": 1,
    "limeSdrOutputSettings": {
        "antennaPath": 2,
        "centerFrequency": 433850000,
        "devSampleRate": 2500000,
        "extClock": 0,
        "extClockFreq": 10000000,
        "gain": 42,
        "gpioDir": 0,
        "gpioPins": 0,
        "log2HardInterp": 3,
        "log2SoftInterp": 0,
        "lpfBW": 5500000,
        "lpfFIRBW": 2500000,
        "lpfFIREnable": 0,
        "ncoEnable": 0,
        "ncoFrequency": 0,
        "reverseAPIAddress": "127.0.0.1",
        "reverseAPIDeviceIndex": 0,
        "reverseAPIPort": 8888,
        "transverterDeltaFrequency": 0,
        "transverterMode": 0,
        "useReverseAPI": 0
    }
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/channel
method=POST
Create FileSource succeeded
{
    "message": "Message to add a channel (MsgAddChannel) was submitted successfully"
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings
method=GET
Get FileSource settings succeeded
{
    "FileSourceSettings": {
        "fileName": "test.sdriq",
        "filterChainHash": 0,
        "gainDB": 0,
        "log2Interp": 0,
        "reverseAPIAddress": "127.0.0.1",
        "reverseAPIChannelIndex": 0,
        "reverseAPIDeviceIndex": 0,
        "reverseAPIPort": 8888,
        "rgbColor": -7601148,
        "title": "File source",
        "useReverseAPI": 0
    },
    "channelType": "FileSource",
    "direction": 1
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings
method=PATCH
Change FileSource succeeded
{
    "FileSourceSettings": {
        "fileName": "/Users/SDR/SDRAngel/Samples/KeyFinder/KeyFinder-B.sdriq",
        "filterChainHash": 0,
        "gainDB": 0,
        "log2Interp": 0,
        "reverseAPIAddress": "127.0.0.1",
        "reverseAPIChannelIndex": 0,
        "reverseAPIDeviceIndex": 0,
        "reverseAPIPort": 8091,
        "rgbColor": -7601148,
        "title": "KeyFinder-A",
        "useReverseAPI": 0
    },
    "channelType": "FileSource",
    "direction": 1
}
-------------------
url=http://127.0.0.1:8091/sdrangel/deviceset/1/device/run
method=POST
Start device on deviceset R1 succeeded
{
    "state": "idle"
}
-------------------
 
This creates the T1 deviceset and the input source, they appear in the GUI.
The problem is that the created input source has no input file.
I still have to use the GUI and set the input file manually.
 
My questions:
- Is this the sane way to do playback a recorded file?
- What am I missing? How do I manage the file source to load the input file?
 
Any ideas?


 

Join sdrangel@groups.io to automatically receive all group messages.