RX888 and VHF

41 views
Skip to first unread message

N1GP

unread,
Dec 13, 2025, 8:10:13 AM12/13/25
to ka9q-radio
Hi Folks,

I've been successful using ka9q-radio and my RX888Mk2 on HF, grabbing
the IQ data for processing using a 64m8 clock.

However, when I try to set things up for VHF, I'm not getting any IQ data.
I've lowered the sample rate to 6m48 and use the 'V' antenna port.

Does ka9q-radio support using the RX888 V port?

-Rick / N1GP

Franco Venturi

unread,
Dec 14, 2025, 1:10:49 PM12/14/25
to ka9q-radio
Rick,
back in July of 2024, Phil merged some initial code I wrote to support VHF mode for the RX888 with this commit: https://github.com/fventuri/ka9q-radio/commit/8c2ff93c302b1b7aca887f7161d31ed505821ddd
As Phil's commit message says and as far as I know, this code has never been tested, so I am not surprised you are not getting I/Q data.

Most of that code comes from 'rx888-stream' (https://github.com/fventuri/rx888_stream).
One approach to debug this problem could be to first make sure that 'rx888-stream' reads I/Q values in VHF mode, and then compare the differences between what 'rx888-stream' does and what my code in 'ka9q-radio' does.

73,
Franco K4VZ

N1GP

unread,
Dec 14, 2025, 3:56:26 PM12/14/25
to ka9q-radio
Hi Frank,

Tnx for getting back to me. I tried your rx888-stream with the following changes to
(I think) enable VHF and it did stream IQ data.

    gpio |= VHF_EN;
    usleep(5000);
    command_send(dev_handle, GPIOFX3, gpio);
    usleep(5000);
    argument_send(dev_handle, DAT31_ATT, att);
    usleep(5000);
    argument_send(dev_handle, AD8340_VGA, gain);
    usleep(5000);
    argument_send(dev_handle, VHF_ATTENUATOR, 0);
    usleep(5000);
    command_send(dev_handle, STARTADC, samplerate);
    usleep(5000);
    command_send(dev_handle, STARTFX3, 0);
    usleep(5000);
    //command_send(dev_handle, TUNERSTDBY, 0);
    command_send(dev_handle, TUNERSTDBY, 1);

That code and the ka9q-radio/rx888.c code look quite a bit different, but I'll look closer
at your pull request, maybe that will simplify things.

Also, to note, sdrpp works fine in VHF/UHF with your SoapySDDC code, so that may be another
comparison point to make (I had to re-enable the Soapy plugin in the sdrpp build).

Is there a maximum sample rate that is lower than HF when running the tuner in VHF?
It seems that the SoapySDDC plugin is set at a 64000000 sample rate, then using a remixing filter
and downsampling when retuning? Is that what ka9q-radio does?

-Rick / N1GP

Phil Karn

unread,
Dec 14, 2025, 7:38:46 PM12/14/25
to ka9q-...@googlegroups.com

I've never gotten it to work, but I also haven't tried very hard. I am having too much fun with my rx888 on HF, and I use Airspy R2s on VHF/UHF. Also a Rigexpert Fobos.

Phil

--
You received this message because you are subscribed to the Google Groups "ka9q-radio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ka9q-radio+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ka9q-radio/06f5ef99-ad55-4257-af2c-0fbcb7ddb883n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Karn

unread,
Dec 14, 2025, 7:42:28 PM12/14/25
to ka9q-...@googlegroups.com

The tuner is similar to those used in other VHF/UHF SDRs like the Airspy and RTLSDR, designed as a TV tuner with a 6 or 8 MHz IF bandwidth. So the RX888 is limited to that bandwidth in tuner mode. If you sample much faster than that you're just wasting bits. I'd suggest trying 20 MHz, which is the sample rate that the Airspy R2 uses. Hopefully the filter is good enough to block any aliases.

Phil

--
You received this message because you are subscribed to the Google Groups "ka9q-radio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ka9q-radio+...@googlegroups.com.

Franco Venturi

unread,
Dec 14, 2025, 8:26:10 PM12/14/25
to ka9q-radio
Since it looks like the IF carrier for the R828D is at about 4.57MHz (https://github.com/ka9q/ka9q-radio/blob/main/src/rx888.c#L61), I think even a 10MHz sample rate (2 * 4.57MHz + some wiggle room) should be enough.

Franco

glenn.e...@gmail.com

unread,
Dec 14, 2025, 8:34:58 PM12/14/25
to ka9q-radio

I don't know much about the part but it looks like one could get by with a pretty low sample rate and still keep aliasing at bay.  
Screenshot from 2025-12-14 18-33-17.png

Franco Venturi

unread,
Dec 14, 2025, 8:56:49 PM12/14/25
to ka9q-radio
My bad - Phil is right.

Nyquist requires f_s >= 2 *  f_MAX, and therefore for the case BW=8MHz and Fcenter=4.57MHz, f_MAX = 8.57MHz, and therefore f_s >= 17.14MHz.

Franco

Phil Karn

unread,
Dec 15, 2025, 1:03:57 PM12/15/25
to ka9q-...@googlegroups.com

I was gonna say that. :-)

I have noticed that the tuner in the Airspy R2 as seen through the A/D converter has a bandpass that runs from about 600 kHz to about 9.4 MHz. Thus it has a usable bandwidth of about 8.8 MHz. I think the filter is likely in the tuner itself since this is about what I'd expect for a 8 MHz TV channel. (We use 6 MHz in North America but other parts of the world use 8, so tuners generally support both.)

I don't know if the RX888 has the same tuner but there don't seem to be very many different chips, at least in functionality. They behave as wideband lower sideband receivers, ie., they're downconverters with high side LO injection. You can see all this in my 'control' program for ka9q-radio when using the Airspy R2. The LO is always above the RF carrier frequency, the IF is always negative, and the front end (actually mixer output) filter range is -9.4 MHz to -600 kHz. ka9q-radio radiod will automatically invert the spectrum from a real A/D when high side injection is used, ie when the the IF is negative. I presume that ka9q-radio will treat the RX888 in VHF mode much the same as an Airspy. If you use a sample rate of 20 MHz, you can use the same FFT size as the Airspy R2, a 500,000 point real-to-complex transform. This is a reasonably efficient size for FFTW; no prime factors larger than 5. You'll use a lot less CPU than in HF direct sampling DC-6m mode, but you'll have much less bandwidth too.

Given that the IF reaches down to 600 kHz, I presume the tuner suppresses the image with by complex mixing (ie, the SSB phasing technique), not by actual RF bandpass filtering. Or maybe it uses multiple conversion? Does anybody know?

I haven't measured the tuner image rejection but I've never noticed a serious problem with it. If you do, you can shift the First LO (the one in the tuner) to push an image away from a desired signal.

Phil

N1GP

unread,
Dec 15, 2025, 3:51:44 PM12/15/25
to ka9q-radio
I'm just starting to find my way around rx888.c so I'm not going to provide much insight.
However, I have some interesting results albeit, still seems broke.

I changed the '#if 0' 's to '#if 1' 's for those which seemed to do with the VHF support.
I was able to get IQ data and actually heard some 162.x weather stations up in the
166.9x tuning area. The spectrum seems inverted, tuning up in freq results in IQ
freq going down and visa-versa. I tried negating I and then Q but I wasn't able to solve
that issue. I'm sampling @ 16m

Here's what the control data looks like:

Screenshot from 2025-12-15 15-45-13.png

N1GP

unread,
Dec 15, 2025, 3:55:44 PM12/15/25
to ka9q-radio

Just want to add, I'm using an RX-888MkII, which as I understand uses an R828D -vs- R820T.

Phil Karn

unread,
Dec 15, 2025, 5:03:53 PM12/15/25
to N1GP, ka9q-radio
Oh good, that's real progress! The spectrum is inverted because the tuner uses high-side injection and you haven't told radiod. Make the FE (frontend) filter limits negative. That will force the IF to be negative and put the local oscillator above the radio frequency. My filter code, when working with a real input (as here) automatically inverts the spectrum when you tune to negative IFs.

Mathematically, the Fourier transform of a real signal (ie from one A/D, as in the rx888) has a negative frequency spectrum that's a mirror of the positive spectrum with the imaginary component inverted (the complex conjugate operation). The FFT only computes the positive part but when I'm asked to read the (virtual) negative spectrum I simply read the positive spectrum backwards and it all works.

Phil




Franco Venturi

unread,
Dec 16, 2025, 7:26:43 PM12/16/25
to ka9q-radio
Phil (or anyone else here),
when you have time, can you also try the VHF case like N1GP did to see if you are able to catch some NOAA stations?

N1GP,
did you try with regular FM BC stations? Those should be very easy to see even if the spectrum is reversed.

If we can get more tests, I think we should be able to figure the issue(s) with receiving VHF/UHF faiirly quickly.

Franco

N1GP

unread,
Dec 17, 2025, 6:06:33 AM12/17/25
to ka9q-radio
Hi Franco,

Yes, I am able to see FM BC stations as well. This is a summary of what changes / settings
I have made to at least get this far. I'm mostly poking around here as I'm not sure what I'm doing.

My config is like this:
[rx888]
device = "rx888" # required so it won't be seen as a demod section
description = "rx888 generic" # good to put callsign and antenna description in here
# rest are defaults
#samprate = 64m8
samprate = 8m
frequency = 163525000

I'm not sure what the 'frequency' is for or what it should be, but with it at that value
and the attached patch applied, I can see the mentioned VHF stations.
Note that I had commented out the line 'frontend->lock = true;'
          // VHF/UHF mode
          double actual_frequency = rx888_set_tuner_frequency(sdr,frequency);
          fprintf(stderr,"Actual VHF/UHF tuner frequency %'lf\n",actual_frequency);
          frontend->frequency = actual_frequency;
          rx888_set_att(sdr,att,true);
          rx888_set_gain(sdr,gain,true);
          //frontend->lock = true;

If not, I couldn't find any stations as it looked like the rx888_tune() call returned without
calling rx888_set_tuner_frequency(sdr,freq)
rx888.diff

Franco Venturi

unread,
Dec 17, 2025, 8:55:56 AM12/17/25
to ka9q-radio
N1GP,
thanks for all your findings!

I think the 'frequency' setting selects the frequency of the local oscillator of the VHF/UHF tuner chip, which comes from the second clock generator inside the Si5351.

Based on Phil's comments about the Airspy R2, the LO frequency should be above the desired center frequency, i.e. assuming that you want a center frequency of 100MHz for the FC BC's (i.e. to receive the spectrum from 96MHz to 104MHz), then I would set the LO frequency to f_center + f_IF -> 100 + 4.57 =  104.57MHz

If my assumptions are correct, since the TV tuner uses the LSB, the ADC would then see 100MHz as -4.57MHz, i.e. 4.57MHz but reversed.

Franco

Phil Karn

unread,
Dec 17, 2025, 9:26:09 AM12/17/25
to Franco Venturi, ka9q-radio
That's correct. The frequency parameter in a hardware (not channel) section sets and locks the tuner local oscillator. If you don't specify it, channels will automatically send a tune command to the front end if necessary to bring a specified channel frequency into range. To avoid a tuning war, this only happens at channel startup or when the channel receives a frequency command from a client (eg, control). If some other channel takes the tuner away, the first channel suspends (stops sending output). If the tuner returns, or if the current channel is given a frequency command, the channel automatically resumes. Ie, the last channel to send a tuning command to the front end wins.

Since static channels start up in arbitrary order, and since it's possible to accidentally suspend a whole bunch of channels with an erroneous (or intentional) frequency change to one channel, I provided the "frequency" keyword in the hardware section to avoid these mistakes. If you want to dedicate an Airspy R2 or Hydra SDR to, say, the 2m band and you don't want to allow automatic front end tuning, you could set the tuner to maybe 149.0 MHz. Since the downconverter uses high side injection, this frequency must be far enough above the top of the 2m band so the entire band gets through the tuner's IF filter. It cuts off below 600 kHz on the Airspy, so the tuner LO has to be at least 148.6 MHz; setting it to 149 gives some margin while still easily covering the entire band.

Direct sampling receivers like the RX888 in HF mode don't support the frequency command; the frequency is always set to 0 Hz.

Phil



Glenn Elmore

unread,
Dec 17, 2025, 11:06:01 AM12/17/25
to Franco Venturi, ka9q-radio
Are we sure that frequency from the SI 5351 is not the Master clock for the tuner rather than the frequency for its synthesizer? I haven't looked at the data sheet again

Glenn Elmore

unread,
Dec 17, 2025, 11:32:41 AM12/17/25
to Franco Venturi, ka9q-radio
Just saw Phil's response. Think Franco meant "is referenced by" rather than"comes from". Tuner must have it's own synthesizer.

David McGaw

unread,
Dec 17, 2025, 12:10:30 PM12/17/25
to ka9q-...@googlegroups.com
Master clock for the tuner chip I believe would be 28.8MHz.  It has its own synthesizer.

David N1HAC

On 12/17/25 11:32 AM, Glenn Elmore wrote:

You don't often get email from glenn.e...@gmail.com. Learn why this is important

Franco Venturi

unread,
Dec 17, 2025, 3:23:18 PM12/17/25
to ka9q-radio

Glenn, David,
you are right.

I just looked at the source code for ExtIO_sddc (https://github.com/ik1xpv/ExtIO_sddc), and they initialize the VHF/UHF tuner for the RX-888 here: https://github.com/ik1xpv/ExtIO_sddc/blob/master/Core/radio/RX888R2Radio.cpp#L78-L79

        uint32_t ref = R828D_FREQ;
        return Fx3->Control(TUNERINIT, ref); // Initialize Tuner




    // Enable Tuner reference clock
    uint32_t ref = R828D_FREQ;
    command_send(sdr->dev_handle,TUNERINIT,ref); // Initialize Tuner

It is the next line ('TUNERTUNE') that then sets the LO frequency:

    command_send(sdr->dev_handle,TUNERTUNE,(uint64_t)frequency);


I apologize for the confusion,

Franco

Phil Karn

unread,
Dec 17, 2025, 10:54:34 PM12/17/25
to Franco Venturi, ka9q-radio
What's the allowable range for the tuner reference clock? Are there preferred values? Obviously I'd like to avoid generating spurs in the ham bands. Also, at some point I'd like to verify your function actual_freq() that shadows the firmware synthesizer register calculations to determine where the tuner is actually tuned. When I first got into this I was amazed that so many front end drivers could be so sloppy, but I guess most of them were receiving wideband signals with poor XOs so accuracy just wasn't important. Not so in the HamSCI world.

Phil

Franco Venturi

unread,
Dec 18, 2025, 8:04:16 AM12/18/25
to ka9q-radio
The RX-888 mkII uses the Rafael Micro R828D chip.
There are no datasheets publicly available for the R828D, however it looks like that chip is an improved version of the R820T, for which a preliminary version of the datasheet from 2011 has been leaked (attached to this post).

This is what they write on page 23 in the section called 'Crystal Specifications':

        The default crystal frequency for R820T is 16 MHz. The R820T is well accompanied with traditional DIP package crystal. To reduce component count and font factor, a low profile SMD package crystal is recommended. Please contact Rafael Micro application engineering for other crystal frequencies (12, 20, 20.48, 24, 27, 28.8, 32 MHz) applications.

I also was able to find a programming guide for the R820T from 2016 (attached).

Also these are a few other places with information about the R828D:


Franco
R820T2_Register_Description.pdf
R820T_datasheet-Non_R-20111130_unlocked.pdf
Reply all
Reply to author
Forward
0 new messages