AlexandreRouma / SDRPlusPlus

Cross-Platform SDR Software
GNU General Public License v3.0
4.17k stars 577 forks source link

spectran_http_source: Modify mechanism how RTSA Suite Pro is interfaced using the HTTP interface #1354

Open hb9fxq opened 8 months ago

hb9fxq commented 8 months ago

The spectran_http_source should be used to establish a connection to an Aaronia RTSA Suite Pro mission, which provides a combination of an IQ Source, such as the 'Spectran V6,' and an 'IQ Demodulator' block connected to an 'HTTP Server' block.

(RTSA [IQ Source] -> [IQ Demodulator] -> [HTTP Server]) ---------<http>------- (SDR++ [spectran_http_source])

Currently, the spectran_http_source is accessing the '/control' endpoint, which is not intended for this use case. It should instead utilize the more adaptable '/remoteconfig' endpoint offered by the HTTP Server, allowing for remote control of blocks within the mission's block graph.

As a result, the command structure for the ::setCenterFrequency request needs to be updated to:

{
  "receiverName": "Block_IQDemodulator_0",
  "simpleconfig": {
    "main": {
      "centerfreq": 54664,
      "samplerate": 4000000,
      "spanfreq": 4000000
    }
  }
}

The changes proposed in this pull request https://github.com/AlexandreRouma/SDRPlusPlus/pull/1352/files serve as a draft for the required mechanism.

The device parameters in the SDR++ UI 'Source' section should therefore be expanded to include:

When the connect button is initially pressed, the ::setCenterFrequency method should be invoked once, to ensure the selected tuning range is initiated by SDR++ and not the RTSA

Minor corrections:

The disconnect method is currently causing an error because it attempts to unbind 'onCenterFrequencyChanged' twice, instead of unbinding 'onSamplerateChanged':

The disconnect method throws an error, because it tries to unbind the “onCenterFrequencyChanged” twice instead of “onSamplerateChanged”

_this->client->onCenterFrequencyChanged.unbind(_this->onFreqChangedId);
_this->client->onCenterFrequencyChanged.unbind(_this->onSamplerateChangedId);

An example mission is provided at: https://github.com/AlexandreRouma/SDRPlusPlus/files/14535971/example_mission_http_iqdemod.zip

image

hb9fxq commented 8 months ago

example_mission_http_iqdemod.zip