SDRplay / RSPTCPServer

RSP TCP Server
GNU General Public License v3.0
98 stars 16 forks source link

IQ spectrum mirrored on Duo #9

Open srcejon opened 1 year ago

srcejon commented 1 year ago

I'm trying to use RSPTCPServer with a Duo (h/w reported as version 3). However, I'm seeing the real part of the spectrum mirrored on to the imaginary part of the spectrum:

image

This doesn't happen with other versions of rsp_tcp (https://github.com/ON5HB/rsp_tcp https://github.com/f4fhh/rsp_tcp) that use the older API (so I don't think it's a client problem).

image

I've tried multiple clients and see the same problem. Have tried the server on both Linux and Windows. Also, it doesn't matter if running in enhanced mode or whether 8 or 16-bit data is used.

Also, the LNA control doesn't seem to work. I can only get something that changes gain by adding some code to disable IQ correction (chParams->ctrlParams.dcOffset.IQenable = 1)

Any ideas what might be wrong?

srcejon commented 1 year ago

Interesting, this problem doesn't appear on Android, using the SDRplay driver.

(However, that doesn't seem to work the same as RSPTCPServer, as I don't see to get the RTL0/RSP0 magic bytes.)

SDRplay commented 1 year ago

It's important to note that in order to use the server in enhanced mode (-E) you need a client that is configured for it - as far as I know only the ExtIO TCP panel we provide actually supports it. If you are not using -E then the server should behave like a RTL TCP server. What command line options are you using on the server and have you tried the ExtIO TCP panel? (that's the only client we have tested with) Again, with the LNA specific control - that is only available using -E otherwise there is a prebuilt gain table converting RTL gain steps to RSP gain steps.

srcejon commented 1 year ago

I'm writing a client (SDRangel). Obviously thought it could be my code that was wrong, but I see the same problem using ExtIO (and my code does work with the Android driver and the other versions of rsp_tcp).

Here's HDSDR with ExtIO:

image

And SDRUno

image

I see the problem both with and without the -E option (Ext IO seems to require the latter).

I used the pre-built binary on Windows and built from source on Linux - both with the same result.

I only have a Duo I can test with.

SDRplay commented 1 year ago

How do you have the ExtIO panel configured - can you show it please

srcejon commented 1 year ago

image

Or

image

Doesn't make a difference what the AGC / gain index is in terms of the mirroring.

SDRplay commented 1 year ago

Looks like it comes up in an odd mode - I've just tried it here and if I switch antenna ports and go back to the original antenna port, then it all displays correctly. That then survives a restart of the client, so looks like it's in the server duo startup code. I don't have the resource to investigate this right now I'm afraid. I just tried an RSPdx and it's ok, so just specific to the duo by the looks of it.

srcejon commented 1 year ago

Ok, thanks. I've just put a little hack in to rsp_tcp to cycle through the antennas at start-up and now get a more reasonable spectrum.