diff --git a/cmake/ci/build_sdrplay.sh b/cmake/ci/build_sdrplay.sh index b47531146..1a8b45a25 100644 --- a/cmake/ci/build_sdrplay.sh +++ b/cmake/ci/build_sdrplay.sh @@ -4,4 +4,4 @@ mkdir -p sdrplayapi && cd sdrplayapi git clone https://github.com/srcejon/sdrplayapi.git cd sdrplayapi -sudo yes | sh install_lib.sh +sudo yes | bash install_lib.sh diff --git a/plugins/channelrx/remotetcpsink/remotetcpprotocol.h b/plugins/channelrx/remotetcpsink/remotetcpprotocol.h index 817aab639..9c2abc754 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpprotocol.h +++ b/plugins/channelrx/remotetcpsink/remotetcpprotocol.h @@ -61,7 +61,8 @@ public: SOAPY_SDR, TEST_SOURCE, USRP, - XTRX + XTRX, + SDRPLAY_V3_RSP1B }; enum Command { diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp b/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp index 81a255b2c..391f86348 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp +++ b/plugins/channelrx/remotetcpsink/remotetcpsinksink.cpp @@ -359,6 +359,7 @@ RemoteTCPProtocol::Device RemoteTCPSinkSink::getDevice() QHash sdrplayMap = { {"RSP1", RemoteTCPProtocol::SDRPLAY_V3_RSP1}, {"RSP1A", RemoteTCPProtocol::SDRPLAY_V3_RSP1A}, + {"RSP1B", RemoteTCPProtocol::SDRPLAY_V3_RSP1B}, {"RSP2", RemoteTCPProtocol::SDRPLAY_V3_RSP2}, {"RSPduo", RemoteTCPProtocol::SDRPLAY_V3_RSPDUO}, {"RSPdx", RemoteTCPProtocol::SDRPLAY_V3_RSPDX}, diff --git a/plugins/samplesource/androidsdrdriverinput/androidsdrdriverinputgui.cpp b/plugins/samplesource/androidsdrdriverinput/androidsdrdriverinputgui.cpp index 971aa1213..aff8505ea 100644 --- a/plugins/samplesource/androidsdrdriverinput/androidsdrdriverinputgui.cpp +++ b/plugins/samplesource/androidsdrdriverinput/androidsdrdriverinputgui.cpp @@ -312,6 +312,7 @@ const QHash R {RemoteTCPProtocol::LIME_SDR, &m_limeGains}, {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrplayV3Gains}, {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrplayV3Gains}, + {RemoteTCPProtocol::SDRPLAY_V3_RSP1B, &m_sdrplayV3Gains}, {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrplayV3Gains}, {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrplayV3Gains}, {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrplayV3Gains}, diff --git a/plugins/samplesource/sdrplayv3/readme.md b/plugins/samplesource/sdrplayv3/readme.md index a5d70f232..85401bfc4 100644 --- a/plugins/samplesource/sdrplayv3/readme.md +++ b/plugins/samplesource/sdrplayv3/readme.md @@ -6,7 +6,7 @@ This plugin supports input from SDRplay RSP devices using V3 of SDRplay's API, i

Driver Prerequisites

-This plugin requires the SDRplay API V3.07 to have been installed and for the service to be running. It can be downloaded for Windows, Linux and Mac from: https://www.sdrplay.com/softwarehome/ +This plugin requires the SDRplay API V3.14 to have been installed and for the service to be running. It can be downloaded for Windows, Linux and Mac from: https://www.sdrplay.com/softwarehome/

Interface

diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp index a1df4ec8d..8f62cc751 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp +++ b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp @@ -87,6 +87,7 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) : ui->extRef->setVisible(false); break; case SDRPLAY_RSP1A_ID: + case SDRPLAY_RSP1B_ID: ui->tuner->addItem("1"); ui->antenna->addItem("50Ohm"); ui->amNotch->setVisible(false); diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3input.cpp b/plugins/samplesource/sdrplayv3/sdrplayv3input.cpp index ef1aec12e..9468e418e 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3input.cpp +++ b/plugins/samplesource/sdrplayv3/sdrplayv3input.cpp @@ -513,6 +513,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis switch (getDeviceId()) { case SDRPLAY_RSP1A_ID: + case SDRPLAY_RSP1B_ID: m_devParams->rxChannelA->rsp1aTunerParams.biasTEnable = settings.m_biasTee; update = sdrplay_api_Update_Rsp1a_BiasTControl; break; @@ -574,6 +575,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis switch (getDeviceId()) { case SDRPLAY_RSP1A_ID: + case SDRPLAY_RSP1B_ID: m_devParams->devParams->rsp1aParams.rfNotchEnable = settings.m_fmNotch; update = sdrplay_api_Update_Rsp1a_RfNotchControl; break; @@ -610,6 +612,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis switch (getDeviceId()) { case SDRPLAY_RSP1A_ID: + case SDRPLAY_RSP1B_ID: m_devParams->devParams->rsp1aParams.rfDabNotchEnable = settings.m_dabNotch; update = sdrplay_api_Update_Rsp1a_RfDabNotchControl; break; @@ -658,7 +661,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis updateExt = sdrplay_api_Update_RspDx_AntennaControl; break; default: - // SDRPLAY_RSP1_ID and SDRPLAY_RSP1A_ID only have one antenna + // SDRPLAY_RSP1_ID, SDRPLAY_RSP1A_ID, SDRPLAY_RSP1B_ID only have one antenna break; } if ((err = sdrplay_api_Update(m_dev->dev, m_dev->tuner, update, updateExt)) != sdrplay_api_Success) @@ -1335,6 +1338,15 @@ const int SDRPlayV3LNA::rsp1AAttenuation[4][11] = { 9, 0, 6, 12, 20, 26, 32, 38, 43, 62} }; +const int SDRPlayV3LNA::rsp1BAttenuation[5][11] = +{ + {7, 0, 6, 12, 18, 37, 42, 61}, + {10, 0, 6, 12, 18, 20, 26, 32, 38, 57, 62}, + {10, 0, 6, 12, 18, 20, 26, 32, 38, 57, 62}, + {10, 0, 7, 13, 19, 20, 27, 33, 39, 45, 64}, + { 9, 0, 6, 12, 20, 26, 32, 38, 43, 62} +}; + const int SDRPlayV3LNA::rsp2Attenuation[3][10] = { {9, 0, 10, 15, 21, 24, 34, 39, 45, 64}, @@ -1389,6 +1401,19 @@ const int *SDRPlayV3LNA::getAttenuations(int deviceId, qint64 frequency) row = 3; lnaAttenuation = &rsp1AAttenuation[row][0]; break; + case SDRPLAY_RSP1B_ID: + if (frequency < 50000000) + row = 0; + else if (frequency < 60000000) + row = 1; + else if (frequency < 420000000) + row = 2; + else if (frequency < 1000000000) + row = 3; + else + row = 4; + lnaAttenuation = &rsp1BAttenuation[row][0]; + break; case SDRPLAY_RSP2_ID: if (frequency < 420000000) row = 0; diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3input.h b/plugins/samplesource/sdrplayv3/sdrplayv3input.h index ad84651a6..743e82d89 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3input.h +++ b/plugins/samplesource/sdrplayv3/sdrplayv3input.h @@ -217,6 +217,7 @@ public: private: static const int rsp1Attenuation[3][5]; static const int rsp1AAttenuation[4][11]; + static const int rsp1BAttenuation[5][11]; static const int rsp2Attenuation[3][10]; static const int rspDuoAttenuation[5][11]; static const int rspDxAttenuation[7][29]; diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index d13a80921..ba5d19681 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -13460,7 +13460,7 @@ margin-bottom: 20px; "properties" : { "deviceType" : { "type" : "string", - "description" : "SDRplay device type. Can be RSP1, RSP1A, RSP2, RSPduo, RSPdx, Unknown" + "description" : "SDRplay device type. Can be RSP1, RSP1A, RSP1B, RSP2, RSPduo, RSPdx, Unknown" }, "bandwidths" : { "type" : "array", diff --git a/sdrbase/resources/webapi/doc/swagger/include/SDRPlayV3.yaml b/sdrbase/resources/webapi/doc/swagger/include/SDRPlayV3.yaml index b383ae214..099997714 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/SDRPlayV3.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/SDRPlayV3.yaml @@ -73,7 +73,7 @@ SDRPlayV3Report: properties: deviceType: type: string - description: SDRplay device type. Can be RSP1, RSP1A, RSP2, RSPduo, RSPdx, Unknown + description: SDRplay device type. Can be RSP1, RSP1A, RSP1B, RSP2, RSPduo, RSPdx, Unknown bandwidths: type: array items: diff --git a/swagger/sdrangel/api/swagger/include/SDRPlayV3.yaml b/swagger/sdrangel/api/swagger/include/SDRPlayV3.yaml index 38f2fcce1..3a2b73814 100644 --- a/swagger/sdrangel/api/swagger/include/SDRPlayV3.yaml +++ b/swagger/sdrangel/api/swagger/include/SDRPlayV3.yaml @@ -73,7 +73,7 @@ SDRPlayV3Report: properties: deviceType: type: string - description: SDRplay device type. Can be RSP1, RSP1A, RSP2, RSPduo, RSPdx, Unknown + description: SDRplay device type. Can be RSP1, RSP1A, RSP1B, RSP2, RSPduo, RSPdx, Unknown bandwidths: type: array items: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index d13a80921..ba5d19681 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -13460,7 +13460,7 @@ margin-bottom: 20px; "properties" : { "deviceType" : { "type" : "string", - "description" : "SDRplay device type. Can be RSP1, RSP1A, RSP2, RSPduo, RSPdx, Unknown" + "description" : "SDRplay device type. Can be RSP1, RSP1A, RSP1B, RSP2, RSPduo, RSPdx, Unknown" }, "bandwidths" : { "type" : "array",