Issues with RX-888 MK II
AlexandroRP99 opened this issue · comments
I'm trying to prepare a Python script that takes some samples with an RX-888 MK II and then perform an FFT to obtain the frequency components of the captured signal.
To do this, I have used cozycactus's librx888, SoapyRX888 and rx888_test to load the firmware he provides into the SDR.
I'm feeding the HF input with a tone of 50 MHz to check whether it's working. But when I perform the FFT, I obtain the same result regardless of whether the tone generator is connected to the input or not: a flat spectrum without any trace of the 50 MHz peak. It seems as if the SDR is retrieving only noise data from the ADC. Like it's not able to obtain data from any of the inputs.
Checking the signal captured by the SDR, I've noticed that its only retrieving real samples with zero imaginary component.
Also, I've tried to call "sdr.setFrequency(SOAPY_SDR_RX, 0, 50e6)" and then "sdr.getFrequency(SOAPY_SDR_RX, 0)". But the frequency returned is equal to 0 Hz, something strange.
When executing SoapySDRUtil --probe="driver=rx888" in Bash, I obtained the following:
If you notice, in the lowest part of the output, it says "Full freq range: MHz". It's not retrieving any frequency range.
Do you have any idea of what could be happening with this? Making this work is part of my master's thesis, so any help is really appreciated.
If you need to take a look at my code, it is basically the example for python in this repository slightly modified:
Threre is mention (#386) that the Mk II support (cozycactus/SoapyRX888#1) was not finished and a patch is needed (https://pastebin.com/zjRz62sf) -- did you apply that?
Also it looks like the Frequency-API is not implemented at all (https://github.com/cozycactus/SoapyRX888/blob/main/Settings.cpp) -- getFrequency/setFrequency/listFrequencies/getFrequencyRange won't work.
The librx888 has no mention of any frequency settings (https://github.com/cozycactus/librx888/blob/main/src/librx888.c).
Is there an active user community for the RX-888 MK II anywhere, is it still a supported product?
Otherwise, and if the hardware is not part of your thesis, you are better off with a Pluto, HackRF, LimeSDR, SDRplay, …
It seems one person that played with the RX888 is @fventuri, among other things he maintains SoapySDRPlay and might know more about the state of the RX888.
The RX888 can operate in two modes:
- as a direct sampling receiver (https://www.ni.com/en/solutions/aerospace-defense/radar-electronic-warfare-sigint/advantages-of-direct-rf-sampling-architectures.html). This is when you connect your antenna/signal generator to the HF port. It is the mode of operation most people use and the one I am familiar with
- as a VHF/UHF receiver; this is when you use the VHF antenna port, and in this case there's a RT828D tuner that mixes an LO (whose frequency can be changed). I honestly don't know much about this part, and I don't know of many people who use the VHF/UHF section of the RX888.
I see that you mention the HF input and 50MHz so in this case (the first one above) the RX888 is a direct sampling receiver; quoting from the article above:
A direct RF sampling receiver architecture, however, consists of just a low-noise amplifier, the appropriate filters, and the ADC. The receiver in Figure 2 does not use mixers and LOs; the ADC digitizes the RF signal directly and sends it to a processor.
In this architecture all samples are real values because they basically are the real voltage samples read directly from the ADC (i.e. there's no imaginary part by definition). Also there's no local oscillator (LO), and therefore no concept of 'center frequency' to tune.
I run a group about the RX888 and other similar SDRs called 'NextGenSDRs': https://groups.io/g/NextGenSDRs - there are several people there familiar with the RX888; you are welcome to join it and ask questions.
Also I thought you may want to read Tatu Peltola Master thesis "Design of a software defined radio spectrometer for space applications" (https://aaltodoc.aalto.fi/server/api/core/bitstreams/33b1ff2f-508c-4b55-9d0f-7b012e84515f/content) since he used an RX888 to build a spectrometer.
The source code of his application is on GitHub: https://github.com/tejeez/spektri
Franco
Thank you very much, both of you. Applying the suggested patch solved the problem. Now I'm able to obtain the input tone on the FFT.
The RX-888 MK II is a key part of my master's thesis. Previous students made some developments for the HackRF and SDRPlay, but for our application (detection of solar radio bursts) , they turned out to be too noisy. The RX-888 MK II seems promising in that aspect.
My band of interest is under 65 MHz, so using the HF input is perfect for me. If it shows good results in that band, maybe in a future it could be considered to expand its range looking for a way to use the VHF.
It's really likely that later in my work I'll have more doubts, so I'm sure that i will ask some questions in 'NextGenSDRs'. @fventuri, thank you for sharing it.
@AlexandroRabadanParra - happy to hear that you were able to solve the problem!
There are at least a couple of people in that group using their RX888's for radioastronomy and detection of solar bursts.
One of them (Nathan Towne) wrote a program called 'rx2fits' (https://sourceforge.net/projects/rx2fits/) that can be used to monitor solar bursts (see here for instance: https://groups.io/g/NextGenSDRs/message/2107).
Franco
Thank you @fventuri. Some time ago, I looked inside the code of rx2fits to check if I could adapt it to the specs of an analog receiver that I want to emulate. But it's written in C# and Visual Basic .NET, two languages that I'm not used to. But now that my Python code is working, I can stick with it for now.
The thing is, now, with the Python code, I'm getting some error codes telling me that some overflows are being produced in the internal buffer. I just need to retrieve from the SDR 1024 samples every 0.25s, which my Python code is able to do. The problem comes from the fact that despite that, the internal buffer keeps getting filled and Python is not fast enough to take the unused samples and discard them. Therefore I'm getting overflow error codes.
The only workaround that I've found id deactivating and reactivating the streaming of data to clean the buffer every 0.25s. But it consumes some computing time that I use to retrieve more samples in each iteration.
Is there any way to clear the internal buffer without deactivating and activating the streaming?
@AlexandroRabadanParra - these days you can use one of those AIs like ChatGPT or CoPilot, feed it the rx2fits source code, and I think they would do a decent job in converting that to Python.
On the other hand, I am not sure Python would be the best choice to handle samples at a rate of about 100M/s (or even higher); you may want to try something like Cython (https://cython.org/), numba (https://numba.pydata.org/), or PyPy (https://pypy.org/) to see if they are able to handle that volume of data.
Franco


