mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	
						commit
						6c4789dbad
					
				@ -4,4 +4,4 @@ mkdir -p sdrplayapi && cd sdrplayapi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
git clone https://github.com/srcejon/sdrplayapi.git
 | 
					git clone https://github.com/srcejon/sdrplayapi.git
 | 
				
			||||||
cd sdrplayapi
 | 
					cd sdrplayapi
 | 
				
			||||||
sudo yes | sh install_lib.sh
 | 
					sudo yes | bash install_lib.sh
 | 
				
			||||||
 | 
				
			|||||||
@ -61,7 +61,8 @@ public:
 | 
				
			|||||||
        SOAPY_SDR,
 | 
					        SOAPY_SDR,
 | 
				
			||||||
        TEST_SOURCE,
 | 
					        TEST_SOURCE,
 | 
				
			||||||
        USRP,
 | 
					        USRP,
 | 
				
			||||||
        XTRX
 | 
					        XTRX,
 | 
				
			||||||
 | 
					        SDRPLAY_V3_RSP1B
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    enum Command {
 | 
					    enum Command {
 | 
				
			||||||
 | 
				
			|||||||
@ -359,6 +359,7 @@ RemoteTCPProtocol::Device RemoteTCPSinkSink::getDevice()
 | 
				
			|||||||
                QHash<QString, RemoteTCPProtocol::Device> sdrplayMap = {
 | 
					                QHash<QString, RemoteTCPProtocol::Device> sdrplayMap = {
 | 
				
			||||||
                    {"RSP1", RemoteTCPProtocol::SDRPLAY_V3_RSP1},
 | 
					                    {"RSP1", RemoteTCPProtocol::SDRPLAY_V3_RSP1},
 | 
				
			||||||
                    {"RSP1A", RemoteTCPProtocol::SDRPLAY_V3_RSP1A},
 | 
					                    {"RSP1A", RemoteTCPProtocol::SDRPLAY_V3_RSP1A},
 | 
				
			||||||
 | 
					                    {"RSP1B", RemoteTCPProtocol::SDRPLAY_V3_RSP1B},
 | 
				
			||||||
                    {"RSP2", RemoteTCPProtocol::SDRPLAY_V3_RSP2},
 | 
					                    {"RSP2", RemoteTCPProtocol::SDRPLAY_V3_RSP2},
 | 
				
			||||||
                    {"RSPduo", RemoteTCPProtocol::SDRPLAY_V3_RSPDUO},
 | 
					                    {"RSPduo", RemoteTCPProtocol::SDRPLAY_V3_RSPDUO},
 | 
				
			||||||
                    {"RSPdx", RemoteTCPProtocol::SDRPLAY_V3_RSPDX},
 | 
					                    {"RSPdx", RemoteTCPProtocol::SDRPLAY_V3_RSPDX},
 | 
				
			||||||
 | 
				
			|||||||
@ -312,6 +312,7 @@ const QHash<RemoteTCPProtocol::Device, const AndroidSDRDriverInputGui::DeviceGai
 | 
				
			|||||||
    {RemoteTCPProtocol::HACK_RF, &m_hackRFGains},
 | 
					    {RemoteTCPProtocol::HACK_RF, &m_hackRFGains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrplayV3Gains},
 | 
				
			||||||
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1B, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrplayV3Gains},
 | 
				
			||||||
 | 
				
			|||||||
@ -207,6 +207,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
 | 
				
			|||||||
             {RemoteTCPProtocol::SDRPLAY_1, "SDRplay1"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_1, "SDRplay1"},
 | 
				
			||||||
             {RemoteTCPProtocol::SDRPLAY_V3_RSP1, "SDRplayV3 RSP1"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSP1, "SDRplayV3 RSP1"},
 | 
				
			||||||
             {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, "SDRplayV3 RSP1A"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, "SDRplayV3 RSP1A"},
 | 
				
			||||||
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSP1B, "SDRplayV3 RSP1B"},
 | 
				
			||||||
             {RemoteTCPProtocol::SDRPLAY_V3_RSP2, "SDRplayV3 RSP2"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSP2, "SDRplayV3 RSP2"},
 | 
				
			||||||
             {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, "SDRplayV3 RSPduo"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, "SDRplayV3 RSPduo"},
 | 
				
			||||||
             {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, "SDRplayV3 RSPdx"},
 | 
					             {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, "SDRplayV3 RSPdx"},
 | 
				
			||||||
@ -408,6 +409,7 @@ const QHash<RemoteTCPProtocol::Device, const RemoteTCPInputGui::SampleRateRange
 | 
				
			|||||||
    {RemoteTCPProtocol::LIME_SDR, &m_limeSampleRateRange},
 | 
					    {RemoteTCPProtocol::LIME_SDR, &m_limeSampleRateRange},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrPlaySampleRateRange},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrPlaySampleRateRange},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1B, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrPlaySampleRateRange},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrPlaySampleRateRange},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrPlaySampleRateRange},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrPlaySampleRateRange},
 | 
				
			||||||
@ -499,6 +501,7 @@ const QHash<RemoteTCPProtocol::Device, const RemoteTCPInputGui::DeviceGains *> R
 | 
				
			|||||||
    {RemoteTCPProtocol::LIME_SDR, &m_limeGains},
 | 
					    {RemoteTCPProtocol::LIME_SDR, &m_limeGains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1A, &m_sdrplayV3Gains},
 | 
				
			||||||
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP1B, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSP2, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDUO, &m_sdrplayV3Gains},
 | 
				
			||||||
    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrplayV3Gains},
 | 
					    {RemoteTCPProtocol::SDRPLAY_V3_RSPDX, &m_sdrplayV3Gains},
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ This plugin supports input from SDRplay RSP devices using V3 of SDRplay's API, i
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<h2>Driver Prerequisites</h2>
 | 
					<h2>Driver Prerequisites</h2>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h2>Interface</h2>
 | 
					<h2>Interface</h2>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -87,6 +87,7 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) :
 | 
				
			|||||||
        ui->extRef->setVisible(false);
 | 
					        ui->extRef->setVisible(false);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case SDRPLAY_RSP1A_ID:
 | 
					    case SDRPLAY_RSP1A_ID:
 | 
				
			||||||
 | 
					    case SDRPLAY_RSP1B_ID:
 | 
				
			||||||
        ui->tuner->addItem("1");
 | 
					        ui->tuner->addItem("1");
 | 
				
			||||||
        ui->antenna->addItem("50Ohm");
 | 
					        ui->antenna->addItem("50Ohm");
 | 
				
			||||||
        ui->amNotch->setVisible(false);
 | 
					        ui->amNotch->setVisible(false);
 | 
				
			||||||
 | 
				
			|||||||
@ -513,6 +513,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis
 | 
				
			|||||||
            switch (getDeviceId())
 | 
					            switch (getDeviceId())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
            case SDRPLAY_RSP1A_ID:
 | 
					            case SDRPLAY_RSP1A_ID:
 | 
				
			||||||
 | 
					            case SDRPLAY_RSP1B_ID:
 | 
				
			||||||
                m_devParams->rxChannelA->rsp1aTunerParams.biasTEnable = settings.m_biasTee;
 | 
					                m_devParams->rxChannelA->rsp1aTunerParams.biasTEnable = settings.m_biasTee;
 | 
				
			||||||
                update = sdrplay_api_Update_Rsp1a_BiasTControl;
 | 
					                update = sdrplay_api_Update_Rsp1a_BiasTControl;
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
@ -574,6 +575,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis
 | 
				
			|||||||
            switch (getDeviceId())
 | 
					            switch (getDeviceId())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
            case SDRPLAY_RSP1A_ID:
 | 
					            case SDRPLAY_RSP1A_ID:
 | 
				
			||||||
 | 
					            case SDRPLAY_RSP1B_ID:
 | 
				
			||||||
                m_devParams->devParams->rsp1aParams.rfNotchEnable = settings.m_fmNotch;
 | 
					                m_devParams->devParams->rsp1aParams.rfNotchEnable = settings.m_fmNotch;
 | 
				
			||||||
                update = sdrplay_api_Update_Rsp1a_RfNotchControl;
 | 
					                update = sdrplay_api_Update_Rsp1a_RfNotchControl;
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
@ -610,6 +612,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis
 | 
				
			|||||||
            switch (getDeviceId())
 | 
					            switch (getDeviceId())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
            case SDRPLAY_RSP1A_ID:
 | 
					            case SDRPLAY_RSP1A_ID:
 | 
				
			||||||
 | 
					            case SDRPLAY_RSP1B_ID:
 | 
				
			||||||
                m_devParams->devParams->rsp1aParams.rfDabNotchEnable = settings.m_dabNotch;
 | 
					                m_devParams->devParams->rsp1aParams.rfDabNotchEnable = settings.m_dabNotch;
 | 
				
			||||||
                update = sdrplay_api_Update_Rsp1a_RfDabNotchControl;
 | 
					                update = sdrplay_api_Update_Rsp1a_RfDabNotchControl;
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
@ -658,7 +661,7 @@ bool SDRPlayV3Input::applySettings(const SDRPlayV3Settings& settings, const QLis
 | 
				
			|||||||
                updateExt = sdrplay_api_Update_RspDx_AntennaControl;
 | 
					                updateExt = sdrplay_api_Update_RspDx_AntennaControl;
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            default:
 | 
					            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;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if ((err = sdrplay_api_Update(m_dev->dev, m_dev->tuner, update, updateExt)) != sdrplay_api_Success)
 | 
					            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}
 | 
					    { 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] =
 | 
					const int SDRPlayV3LNA::rsp2Attenuation[3][10] =
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    {9, 0, 10, 15, 21, 24, 34, 39, 45, 64},
 | 
					    {9, 0, 10, 15, 21, 24, 34, 39, 45, 64},
 | 
				
			||||||
@ -1389,6 +1401,19 @@ const int *SDRPlayV3LNA::getAttenuations(int deviceId, qint64 frequency)
 | 
				
			|||||||
            row = 3;
 | 
					            row = 3;
 | 
				
			||||||
        lnaAttenuation = &rsp1AAttenuation[row][0];
 | 
					        lnaAttenuation = &rsp1AAttenuation[row][0];
 | 
				
			||||||
        break;
 | 
					        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:
 | 
					    case SDRPLAY_RSP2_ID:
 | 
				
			||||||
        if (frequency < 420000000)
 | 
					        if (frequency < 420000000)
 | 
				
			||||||
            row = 0;
 | 
					            row = 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -217,6 +217,7 @@ public:
 | 
				
			|||||||
private:
 | 
					private:
 | 
				
			||||||
    static const int rsp1Attenuation[3][5];
 | 
					    static const int rsp1Attenuation[3][5];
 | 
				
			||||||
    static const int rsp1AAttenuation[4][11];
 | 
					    static const int rsp1AAttenuation[4][11];
 | 
				
			||||||
 | 
					    static const int rsp1BAttenuation[5][11];
 | 
				
			||||||
    static const int rsp2Attenuation[3][10];
 | 
					    static const int rsp2Attenuation[3][10];
 | 
				
			||||||
    static const int rspDuoAttenuation[5][11];
 | 
					    static const int rspDuoAttenuation[5][11];
 | 
				
			||||||
    static const int rspDxAttenuation[7][29];
 | 
					    static const int rspDxAttenuation[7][29];
 | 
				
			||||||
 | 
				
			|||||||
@ -13460,7 +13460,7 @@ margin-bottom: 20px;
 | 
				
			|||||||
  "properties" : {
 | 
					  "properties" : {
 | 
				
			||||||
    "deviceType" : {
 | 
					    "deviceType" : {
 | 
				
			||||||
      "type" : "string",
 | 
					      "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" : {
 | 
					    "bandwidths" : {
 | 
				
			||||||
      "type" : "array",
 | 
					      "type" : "array",
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,7 @@ SDRPlayV3Report:
 | 
				
			|||||||
  properties:
 | 
					  properties:
 | 
				
			||||||
    deviceType:
 | 
					    deviceType:
 | 
				
			||||||
      type: string
 | 
					      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:
 | 
					    bandwidths:
 | 
				
			||||||
      type: array
 | 
					      type: array
 | 
				
			||||||
      items:
 | 
					      items:
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,7 @@ SDRPlayV3Report:
 | 
				
			|||||||
  properties:
 | 
					  properties:
 | 
				
			||||||
    deviceType:
 | 
					    deviceType:
 | 
				
			||||||
      type: string
 | 
					      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:
 | 
					    bandwidths:
 | 
				
			||||||
      type: array
 | 
					      type: array
 | 
				
			||||||
      items:
 | 
					      items:
 | 
				
			||||||
 | 
				
			|||||||
@ -13460,7 +13460,7 @@ margin-bottom: 20px;
 | 
				
			|||||||
  "properties" : {
 | 
					  "properties" : {
 | 
				
			||||||
    "deviceType" : {
 | 
					    "deviceType" : {
 | 
				
			||||||
      "type" : "string",
 | 
					      "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" : {
 | 
					    "bandwidths" : {
 | 
				
			||||||
      "type" : "array",
 | 
					      "type" : "array",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user