The community websdr-plus-github can be found here: https://github.com/ny4qphil/PhantomSDR-Plus ..it is compatible with the normal version, but enhanced.

The problem of FM modulation

Started by Andy R3MAV, Apr 24, 2025, 03:07 PM

Previous topic - Next topic

Andy R3MAV

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

And yes, F5 reboot, restores the sound

Bas ON5HB

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?
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Andy R3MAV

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.

Bas ON5HB

Same problem here....click a few times and sound is gone.

I'm testing to see if I can track the issue.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

#4
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;
    }
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

#5
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)
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

Also set your Samplerate higher in the TOML, to e.g. 19200 instead of 12000.

FM seem to fail at low samplerates.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Bas ON5HB

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.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Andy R3MAV

#8
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...

Bas ON5HB

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.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Andy R3MAV

And I have Debian 12. Thanks, I'm going to try Ubuntu 22 today, I hope it helps...

Andy R3MAV

Yes, Ubuntu-server 12.04 is fine, it's working.
But it's weird...

Bas ON5HB

#12
We do not know why it happens.

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

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Powered by EzPortal