RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno


John Freeman
 

Hi All,

I have been running my RSPdx with SDR Console 3.1 with no problem, after installing SDRUno 1.40, API 3.07,  and creating the definition by searching SDRPlay V3.   

Now when I install SDRUno 1.41 beta, with its new API 3.08, the instruction is to use V2 for now as the new code, I assume API 3.08, is not compatible with SDR Console V3 yet.   However, when I search to create a new definition using SDRPlay V2, my RSPdx is detected, but it comes up as an SDRDuo and the controls in SDR Console are wrong.   If I search using V3, the RSPdx is detected, but the radio will not start.

I reinstalled SDRUno 1.40 and everything works as it did again with the V3 definition, but I find that a search using V2 also results in an SDRDuo definition, so this is not directly related to the SDRUno 1.41 beta.  

I have reinstalled SDR Console, but the problem still occurs.   The info in the definition screen (attached) implies that the dll being used is for 2.13 which does not support RSPdx?    Do I have the wrong dll somehow?   Any other ideas or things to check?   



Thanks,
John


Simon Brown
 

Easy (I think),

 

The SDRUno 1.41 beta is not compatible with SDR Console. I’ll maybe install it tomorrow and see what needs doing, not I think I read somewhere that the 1.41 beta may change in the future.

 

Anyway, all I can suggest is restoring SDRUno 1.40.

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of John Freeman
Sent: 14 August 2021 15:17
To: main@SDR-Radio.groups.io
Subject: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

Hi All,

I have been running my RSPdx with SDR Console 3.1 with no problem, after installing SDRUno 1.40, API 3.07,  and creating the definition by searching SDRPlay V3.   

Now when I install SDRUno 1.41 beta, with its new API 3.08, the instruction is to use V2 for now as the new code, I assume API 3.08, is not compatible with SDR Console V3 yet.   However, when I search to create a new definition using SDRPlay V2, my RSPdx is detected, but it comes up as an SDRDuo and the controls in SDR Console are wrong.   If I search using V3, the RSPdx is detected, but the radio will not start.

I reinstalled SDRUno 1.40 and everything works as it did again with the V3 definition, but I find that a search using V2 also results in an SDRDuo definition, so this is not directly related to the SDRUno 1.41 beta.  

I have reinstalled SDR Console, but the problem still occurs.   The info in the definition screen (attached) implies that the dll being used is for 2.13 which does not support RSPdx?    Do I have the wrong dll somehow?   Any other ideas or things to check?   



Thanks,
John


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


Barney Breet
 

Hi,

Install SDRUno 1.42, works fine then with SDR Console 3.1 - 64bit.

Regards,

Barney - M1ABV

On 14/08/2021 15:16, John Freeman wrote:
Hi All,

I have been running my RSPdx with SDR Console 3.1 with no problem, after installing SDRUno 1.40, API 3.07,  and creating the definition by searching SDRPlay V3.   

Now when I install SDRUno 1.41 beta, with its new API 3.08, the instruction is to use V2 for now as the new code, I assume API 3.08, is not compatible with SDR Console V3 yet.   However, when I search to create a new definition using SDRPlay V2, my RSPdx is detected, but it comes up as an SDRDuo and the controls in SDR Console are wrong.   If I search using V3, the RSPdx is detected, but the radio will not start.

I reinstalled SDRUno 1.40 and everything works as it did again with the V3 definition, but I find that a search using V2 also results in an SDRDuo definition, so this is not directly related to the SDRUno 1.41 beta.  

I have reinstalled SDR Console, but the problem still occurs.   The info in the definition screen (attached) implies that the dll being used is for 2.13 which does not support RSPdx?    Do I have the wrong dll somehow?   Any other ideas or things to check?   



Thanks,
John


Simon Brown
 

And,

 

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of Barney Breet
Sent: 14 August 2021 18:05
To: main@SDR-Radio.groups.io
Subject: Re: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

Hi,

Install SDRUno 1.42, works fine then with SDR Console 3.1 - 64bit.

Regards,

Barney - M1ABV

On 14/08/2021 15:16, John Freeman wrote:

Hi All,

I have been running my RSPdx with SDR Console 3.1 with no problem, after installing SDRUno 1.40, API 3.07,  and creating the definition by searching SDRPlay V3.   

Now when I install SDRUno 1.41 beta, with its new API 3.08, the instruction is to use V2 for now as the new code, I assume API 3.08, is not compatible with SDR Console V3 yet.   However, when I search to create a new definition using SDRPlay V2, my RSPdx is detected, but it comes up as an SDRDuo and the controls in SDR Console are wrong.   If I search using V3, the RSPdx is detected, but the radio will not start.

I reinstalled SDRUno 1.40 and everything works as it did again with the V3 definition, but I find that a search using V2 also results in an SDRDuo definition, so this is not directly related to the SDRUno 1.41 beta.  

I have reinstalled SDR Console, but the problem still occurs.   The info in the definition screen (attached) implies that the dll being used is for 2.13 which does not support RSPdx?    Do I have the wrong dll somehow?   Any other ideas or things to check?   



Thanks,
John


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


John Freeman
 

Thanks for checking!   I'll stick with SDRUno 1.40/API 3.07 for now.   

My interpretation so far, for the RSPdx, is that the V3 dll will not work with API 3.08, and the V2 dll does not support RSPdx in any case, it needs the V3 dll.   (or maybe will be V4 dll when 1.41/3.08 is released  :)) 

Barney, not sure if you were serious about SDRUno 1.42, I think that is still a fuzzy roadmap line item for SDRPlay at this point.   

John


Simon Brown
 

Just FWIW,

 

Working with Andy @SDRplay to get support for 3.08 working, currently very close.

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of John Freeman
Sent: 14 August 2021 21:42
To: main@SDR-Radio.groups.io
Subject: Re: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

Thanks for checking!   I'll stick with SDRUno 1.40/API 3.07 for now.   

My interpretation so far, for the RSPdx, is that the V3 dll will not work with API 3.08, and the V2 dll does not support RSPdx in any case, it needs the V3 dll.   (or maybe will be V4 dll when 1.41/3.08 is released  :)) 

Barney, not sure if you were serious about SDRUno 1.42, I think that is still a fuzzy roadmap line item for SDRPlay at this point.   

John


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


Gisle Vanem
 

On Sat, Aug 14, 2021 at 07:06 PM, Simon Brown wrote:

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

I also hit a problem with this SDRPlay 3.08 ABI breakage. AFAICS, the important change is in the sdrplay_api.h header.
Comparing to v3.07, the diffs are:

diff -u3 SDRplay-1.4.2/API/inc/sdrplay_api.h SDRplay-1.41-beta2/API/inc/sdrplay_api.h
--- SDRplay-1.4.2/API/inc/sdrplay_api.h       2019-12-18 10:59:18
+++ SDRplay-1.41-beta2/API/inc/sdrplay_api.h  2021-08-21 10:51:16
@@ -21,7 +21,7 @@

 // Application code should check that it is compiled against the same API version
 // sdrplay_api_ApiVersion() returns the API version
-#define SDRPLAY_API_VERSION                   (float)(3.07)
+#define SDRPLAY_API_VERSION                   (float)(3.08)

 // API Constants
 #define SDRPLAY_MAX_DEVICES                   (16)
@@ -145,6 +145,7 @@
     unsigned char hwVer;
     sdrplay_api_TunerSelectT tuner;
     sdrplay_api_RspDuoModeT rspDuoMode;
+    unsigned char valid;
     double rspDuoSampleFreq;
     HANDLE dev;
 } sdrplay_api_DeviceT;
@@ -186,7 +187,7 @@
 typedef sdrplay_api_ErrT        (*sdrplay_api_Uninit_t)(HANDLE dev);
 typedef sdrplay_api_ErrT        (*sdrplay_api_Update_t)(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoActiveTuner_t)(HANDLE dev, sdrplay_api_TunerSelectT *tuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate);
+typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate, double newSampleRate);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoMode_t)(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                 sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                 sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
@@ -217,7 +218,7 @@
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Uninit(HANDLE dev);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Update(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoActiveTuner(HANDLE dev, sdrplay_api_TunerSelectT *currentTuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate);
+    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate, double newSampleRate);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoMode(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                               sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                               sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);

Increasing the sdrplay_api_DeviceT structure by 1. OMG! What were they thinking.
And the Duo problems could be related to how sdrplay_api_SwapRspDuoDualTunerModeSampleRate() was changed.

Simon, how did you fix this at runtime? Simply testing for SDRPLAY_API_VERSION I guess.


Simon Brown
 

Hi,

 

I test the version at runtime and pick up the DLL via registry keys.

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of Gisle Vanem
Sent: 26 August 2021 09:24
To: main@SDR-Radio.groups.io
Subject: Re: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

On Sat, Aug 14, 2021 at 07:06 PM, Simon Brown wrote:

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

I also hit a problem with this SDRPlay 3.08 ABI breakage. AFAICS, the important change is in the sdrplay_api.h header.
Comparing to v3.07, the diffs are:

diff -u3 SDRplay-1.4.2/API/inc/sdrplay_api.h SDRplay-1.41-beta2/API/inc/sdrplay_api.h
--- SDRplay-1.4.2/API/inc/sdrplay_api.h       2019-12-18 10:59:18
+++ SDRplay-1.41-beta2/API/inc/sdrplay_api.h  2021-08-21 10:51:16
@@ -21,7 +21,7 @@
 
 // Application code should check that it is compiled against the same API version
 // sdrplay_api_ApiVersion() returns the API version
-#define SDRPLAY_API_VERSION                   (float)(3.07)
+#define SDRPLAY_API_VERSION                   (float)(3.08)
 
 // API Constants
 #define SDRPLAY_MAX_DEVICES                   (16)
@@ -145,6 +145,7 @@
     unsigned char hwVer;
     sdrplay_api_TunerSelectT tuner;
     sdrplay_api_RspDuoModeT rspDuoMode;
+    unsigned char valid;
     double rspDuoSampleFreq;
     HANDLE dev;
 } sdrplay_api_DeviceT;
@@ -186,7 +187,7 @@
 typedef sdrplay_api_ErrT        (*sdrplay_api_Uninit_t)(HANDLE dev);
 typedef sdrplay_api_ErrT        (*sdrplay_api_Update_t)(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoActiveTuner_t)(HANDLE dev, sdrplay_api_TunerSelectT *tuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate);
+typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate, double newSampleRate);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoMode_t)(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                 sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                 sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
@@ -217,7 +218,7 @@
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Uninit(HANDLE dev);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Update(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoActiveTuner(HANDLE dev, sdrplay_api_TunerSelectT *currentTuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate);
+    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate, double newSampleRate);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoMode(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                               sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                               sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);

Increasing the sdrplay_api_DeviceT structure by 1. OMG! What were they thinking.
And the Duo problems could be related to how sdrplay_api_SwapRspDuoDualTunerModeSampleRate() was changed.

Simon, how did you fix this at runtime? Simply testing for SDRPLAY_API_VERSION I guess.


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


jdow
 

Increasing by 1 is not a problem. It increased it by sizeof( HANDLE) most likely. And they did it in a manner as to guarantee problems. Worse yet, this can depend on the compiler. It should have been tacked on after "HANDLE dev". Then there is a reasonable chance there will be some backwards compatibility.

{^_^}

On 20210826 01:23:56, Gisle Vanem wrote:

On Sat, Aug 14, 2021 at 07:06 PM, Simon Brown wrote:

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

I also hit a problem with this SDRPlay 3.08 ABI breakage. AFAICS, the important change is in the sdrplay_api.h header.
Comparing to v3.07, the diffs are:

diff -u3 SDRplay-1.4.2/API/inc/sdrplay_api.h SDRplay-1.41-beta2/API/inc/sdrplay_api.h
--- SDRplay-1.4.2/API/inc/sdrplay_api.h       2019-12-18 10:59:18
+++ SDRplay-1.41-beta2/API/inc/sdrplay_api.h  2021-08-21 10:51:16
@@ -21,7 +21,7 @@

 // Application code should check that it is compiled against the same API version
 // sdrplay_api_ApiVersion() returns the API version
-#define SDRPLAY_API_VERSION                   (float)(3.07)
+#define SDRPLAY_API_VERSION                   (float)(3.08)

 // API Constants
 #define SDRPLAY_MAX_DEVICES                   (16)
@@ -145,6 +145,7 @@
     unsigned char hwVer;
     sdrplay_api_TunerSelectT tuner;
     sdrplay_api_RspDuoModeT rspDuoMode;
+    unsigned char valid;
     double rspDuoSampleFreq;
     HANDLE dev;
 } sdrplay_api_DeviceT;
@@ -186,7 +187,7 @@
 typedef sdrplay_api_ErrT        (*sdrplay_api_Uninit_t)(HANDLE dev);
 typedef sdrplay_api_ErrT        (*sdrplay_api_Update_t)(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoActiveTuner_t)(HANDLE dev, sdrplay_api_TunerSelectT *tuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate);
+typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate, double newSampleRate);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoMode_t)(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                 sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                 sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
@@ -217,7 +218,7 @@
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Uninit(HANDLE dev);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Update(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoActiveTuner(HANDLE dev, sdrplay_api_TunerSelectT *currentTuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate);
+    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate, double newSampleRate);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoMode(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                               sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                               sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);

Increasing the sdrplay_api_DeviceT structure by 1. OMG! What were they thinking.
And the Duo problems could be related to how sdrplay_api_SwapRspDuoDualTunerModeSampleRate() was changed.

Simon, how did you fix this at runtime? Simply testing for SDRPLAY_API_VERSION I guess.



Simon Brown
 

Hi,

 

For this we use #pragma push(4) etc.

 

I don’t this SDRplay writes the API, it comes from elsewhere, maybe MIRICS?

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of jdow
Sent: 26 August 2021 12:42
To: main@SDR-Radio.groups.io
Subject: Re: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

Increasing by 1 is not a problem. It increased it by sizeof( HANDLE) most likely. And they did it in a manner as to guarantee problems. Worse yet, this can depend on the compiler. It should have been tacked on after "HANDLE dev". Then there is a reasonable chance there will be some backwards compatibility.

{^_^}


On 20210826 01:23:56, Gisle Vanem wrote:

On Sat, Aug 14, 2021 at 07:06 PM, Simon Brown wrote:

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

I also hit a problem with this SDRPlay 3.08 ABI breakage. AFAICS, the important change is in the sdrplay_api.h header.
Comparing to v3.07, the diffs are:

diff -u3 SDRplay-1.4.2/API/inc/sdrplay_api.h SDRplay-1.41-beta2/API/inc/sdrplay_api.h
--- SDRplay-1.4.2/API/inc/sdrplay_api.h       2019-12-18 10:59:18
+++ SDRplay-1.41-beta2/API/inc/sdrplay_api.h  2021-08-21 10:51:16
@@ -21,7 +21,7 @@
 
 // Application code should check that it is compiled against the same API version
 // sdrplay_api_ApiVersion() returns the API version
-#define SDRPLAY_API_VERSION                   (float)(3.07)
+#define SDRPLAY_API_VERSION                   (float)(3.08)
 
 // API Constants
 #define SDRPLAY_MAX_DEVICES                   (16)
@@ -145,6 +145,7 @@
     unsigned char hwVer;
     sdrplay_api_TunerSelectT tuner;
     sdrplay_api_RspDuoModeT rspDuoMode;
+    unsigned char valid;
     double rspDuoSampleFreq;
     HANDLE dev;
 } sdrplay_api_DeviceT;
@@ -186,7 +187,7 @@
 typedef sdrplay_api_ErrT        (*sdrplay_api_Uninit_t)(HANDLE dev);
 typedef sdrplay_api_ErrT        (*sdrplay_api_Update_t)(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoActiveTuner_t)(HANDLE dev, sdrplay_api_TunerSelectT *tuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate);
+typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate, double newSampleRate);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoMode_t)(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                 sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                 sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
@@ -217,7 +218,7 @@
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Uninit(HANDLE dev);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Update(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoActiveTuner(HANDLE dev, sdrplay_api_TunerSelectT *currentTuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate);
+    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate, double newSampleRate);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoMode(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                               sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                               sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);

Increasing the sdrplay_api_DeviceT structure by 1. OMG! What were they thinking.
And the Duo problems could be related to how sdrplay_api_SwapRspDuoDualTunerModeSampleRate() was changed.

Simon, how did you fix this at runtime? Simply testing for SDRPLAY_API_VERSION I guess.

 


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


John Freeman
 

SDR Console 3.1 build 2340 is working fine for me so far with SDRPlay 1.41 Beta 2.     I installed SDRPlay B2, then SDR Console 2340, then deleted and recreated the definition for my RSPdx using V3, and everything comes up and runs.

Thanks, Simon!


jdow
 

Well, either SDRPlay or somebody up-stream of them. The pragmas are a nice saving factor; but, they are SO easy to forget and can be puzzling to troubleshoot.

{^_-}

On 20210826 05:00:06, Simon Brown wrote:

Hi,

 

For this we use #pragma push(4) etc.

 

I don’t this SDRplay writes the API, it comes from elsewhere, maybe MIRICS?

 

Simon Brown, G4ELI

https://www.sdr-radio.com

 

From: main@SDR-Radio.groups.io <main@SDR-Radio.groups.io> On Behalf Of jdow
Sent: 26 August 2021 12:42
To: main@SDR-Radio.groups.io
Subject: Re: [SDR-Radio] RSPdx with SDRPlay 1.41 beta code #sdrplay #sdruno

 

Increasing by 1 is not a problem. It increased it by sizeof( HANDLE) most likely. And they did it in a manner as to guarantee problems. Worse yet, this can depend on the compiler. It should have been tacked on after "HANDLE dev". Then there is a reasonable chance there will be some backwards compatibility.

{^_^}


On 20210826 01:23:56, Gisle Vanem wrote:

On Sat, Aug 14, 2021 at 07:06 PM, Simon Brown wrote:

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

I also hit a problem with this SDRPlay 3.08 ABI breakage. AFAICS, the important change is in the sdrplay_api.h header.
Comparing to v3.07, the diffs are:

diff -u3 SDRplay-1.4.2/API/inc/sdrplay_api.h SDRplay-1.41-beta2/API/inc/sdrplay_api.h
--- SDRplay-1.4.2/API/inc/sdrplay_api.h       2019-12-18 10:59:18
+++ SDRplay-1.41-beta2/API/inc/sdrplay_api.h  2021-08-21 10:51:16
@@ -21,7 +21,7 @@
 
 // Application code should check that it is compiled against the same API version
 // sdrplay_api_ApiVersion() returns the API version
-#define SDRPLAY_API_VERSION                   (float)(3.07)
+#define SDRPLAY_API_VERSION                   (float)(3.08)
 
 // API Constants
 #define SDRPLAY_MAX_DEVICES                   (16)
@@ -145,6 +145,7 @@
     unsigned char hwVer;
     sdrplay_api_TunerSelectT tuner;
     sdrplay_api_RspDuoModeT rspDuoMode;
+    unsigned char valid;
     double rspDuoSampleFreq;
     HANDLE dev;
 } sdrplay_api_DeviceT;
@@ -186,7 +187,7 @@
 typedef sdrplay_api_ErrT        (*sdrplay_api_Uninit_t)(HANDLE dev);
 typedef sdrplay_api_ErrT        (*sdrplay_api_Update_t)(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoActiveTuner_t)(HANDLE dev, sdrplay_api_TunerSelectT *tuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate);
+typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoDualTunerModeSampleRate_t)(double *currentSampleRate, double newSampleRate);
 typedef sdrplay_api_ErrT        (*sdrplay_api_SwapRspDuoMode_t)(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                 sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                 sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
@@ -217,7 +218,7 @@
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Uninit(HANDLE dev);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_Update(HANDLE dev, sdrplay_api_TunerSelectT tuner, sdrplay_api_ReasonForUpdateT reasonForUpdate, sdrplay_api_ReasonForUpdateExtension1T reasonForUpdateExt1);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoActiveTuner(HANDLE dev, sdrplay_api_TunerSelectT *currentTuner, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);
-    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate);
+    _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoDualTunerModeSampleRate(HANDLE dev, double *currentSampleRate, double newSampleRate);
     _SDRPLAY_DLL_QUALIFIER sdrplay_api_ErrT        sdrplay_api_SwapRspDuoMode(sdrplay_api_DeviceT *currDevice, sdrplay_api_DeviceParamsT **deviceParams,
                                                                               sdrplay_api_RspDuoModeT rspDuoMode, double sampleRate, sdrplay_api_TunerSelectT tuner,
                                                                               sdrplay_api_Bw_MHzT bwType, sdrplay_api_If_kHzT ifType, sdrplay_api_RspDuo_AmPortSelectT tuner1AmPortSel);

Increasing the sdrplay_api_DeviceT structure by 1. OMG! What were they thinking.
And the Duo problems could be related to how sdrplay_api_SwapRspDuoDualTunerModeSampleRate() was changed.

Simon, how did you fix this at runtime? Simply testing for SDRPLAY_API_VERSION I guess.

 


--
- + - + -
Please use https://forum.sdr-radio.com:4499/ when posting questions or problems.


Roger Need
 

On Sat, Aug 14, 2021 at 10:06 AM, Simon Brown wrote:

And,

 

As far as I can tell, the documentation for the 3.08 API is not yet available, so I can’t even start on tentative support. When all is published it’ll only take a day or so.

 

Simon Brown, G4ELI

 

Documentation for 3.08 API now available.  https://www.sdrplay.com/docs/SDRplay_API_Specification_v3.08.pdf

Roger