PhantomSDR Support Forum

General Category => PhantomSDR Software => Topic started by: Andy R3MAV on Apr 24, 2025, 03:07 PM

Title: The problem of FM modulation
Post by: Andy R3MAV on Apr 24, 2025, 03:07 PM
I keep trying to run PhantomSDR+ on 2m band using RSP1A. The problem is that the FM modulation mode is not working as it should.
When you adjust to the frequency and turn on the FM, the sound just disappears.
I can't describe the problem correctly in English. Sorry! It will be better to see everything on the server.
http://r3mav.duckdns.org:8085 (http://r3mav.duckdns.org:8085)

And yes, F5 reboot, restores the sound
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 03:46 PM
It only goes wrong INSIDE the 2M section, when you click outside of it, the sound keeps working.

Did you change anything in the code?
Title: Re: The problem of FM modulation
Post by: Andy R3MAV on Apr 24, 2025, 03:55 PM
No, the code has not been changed. I have deleted and compiled the server several times. I have configured CL support, but there is no result. An attempt to switch to FM causes the sound to disappear.
You are right, this problem is also observed on other bands.
I really like the project, but this problem spoils everything.
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 04:01 PM
Same problem here....click a few times and sound is gone.

I'm testing to see if I can track the issue.
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 04:05 PM
Looks to me the off-set is the problem, edit the spectrumserver.cpp and change this part.

I added an offset for AM and changed it for FM. Then run 'meson compile -C build' and restart the webserver, it did the trick for me.

    int offsets_3 = (3000LL) * fft_result_size / sps;
    int offsets_4 = (4500LL) * fft_result_size / sps;
    int offsets_5 = (5000LL) * fft_result_size / sps;
    int offsets_96 = (96000LL) * fft_result_size / sps;

    if (default_mode_str == "LSB") {
        default_mode = LSB;
        default_l = default_m - offsets_3;
        default_r = default_m;
    } else if (default_mode_str == "AM") {
        default_mode = AM;
        default_l = default_m - offsets_4;
        default_r = default_m + offsets_4;
    } else if (default_mode_str == "FM") {
        default_mode = FM;
        default_l = default_m - offsets_5;
        default_r = default_m + offsets_5;
    } else if (default_mode_str == "WBFM") {
        default_mode = FM;
        default_l = default_m - offsets_96;
        default_r = default_m + offsets_96;
    } else {
        default_mode = USB;
        default_l = default_m;
        default_r = default_m + offsets_3;
    }
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 05:47 PM
Also in the frontend audio.js this must be changed:

case 'FM':
        this.bassBoost.gain.value = 50
        this.bandpass.frequency.value = 1800
        this.bandpass.Q.value = 1
        this.bandpass.gain.value = 2
        this.highPass.frequency.value = this.ctcss ? 300 : 100
        this.presenceBoost.gain.value = 3
        this.setLowpass(12000)
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 07:07 PM
Also set your Samplerate higher in the TOML, to e.g. 19200 instead of 12000.

FM seem to fail at low samplerates.
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 24, 2025, 07:14 PM
However, I can not seem to fix it.

Everytime I think it's OK, then listen for minutes and switch, the audio is gone.

It doesn't happen the first clicks anymore, but after listening and then switch to other link.

Looks like the FM-mode command isn't being send or it misses the start of the stream in FM-mode.

Anybody? I can't solve this....I did improve FM for listening....that is good....but for some reason in FM it's loosing contact with the client on audiostream.
Title: Re: The problem of FM modulation
Post by: Andy R3MAV on Apr 25, 2025, 09:26 AM
No. Unfortunately, this change does not help.
I noticed that not only the sound disappears, but reception is established. The S-meter stops responding too.

I keep looking...
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 25, 2025, 06:08 PM
Phil has found that the problem isn't there under Ubuntu 22 but only happens when running Ubuntu 24.

As I updated my systems to 24, I have the same problem as you.

Try to use Ubuntu 22 that we recommend on the github.
Title: Re: The problem of FM modulation
Post by: Andy R3MAV on Apr 26, 2025, 06:43 AM
And I have Debian 12. Thanks, I'm going to try Ubuntu 22 today, I hope it helps...
Title: Re: The problem of FM modulation
Post by: Andy R3MAV on Apr 26, 2025, 04:49 PM
Yes, Ubuntu-server 12.04 is fine, it's working.
But it's weird...
Title: Re: The problem of FM modulation
Post by: Bas ON5HB on Apr 29, 2025, 02:41 PM
We do not know why it happens.

Trust we tested downgrading compilers etc.
Maybe some library changed for it to fail.