NBFM Squelch Feature

840 views
Skip to first unread message

sdrtrunk

unread,
Nov 14, 2021, 7:11:19 AM11/14/21
to sdrtrunk
I updated the NBFM decoder to integrate a new squelch feature and added a new 'Channel' tab to the Now Playing window that has a channel power meter (dB).:


This is merged into the master branch and will be available in the next release.

WARNING: this enhancement introduces changes to the playlist format that are not compatible with older versions of the software.  If you want to build/run the latest version from master, create a new playlist so that you don't corrupt your existing playlist.  And, make sure you switch back to your previous playlist before you run an older version of the software.

cheers,
Denny

DaveNF2G

unread,
Nov 14, 2021, 8:03:37 AM11/14/21
to sdrtrunk
Thank you for this!  Been looking forward to it for a long time.

DaveNF2G

unread,
Nov 14, 2021, 9:26:05 AM11/14/21
to sdrtrunk
When I execute the new batch file, the top line of sdrtrunk still says that it is alpha 4 and I see no reference to squelch on the Channels tab.

GTR8000

unread,
Nov 14, 2021, 11:30:42 AM11/14/21
to sdrtrunk
You need to build alpha7 from the latest source files. Sounds like you didn't do that, and are still running a pretty old release (alpha6 has been out for nearly a year).

hans...@gmail.com

unread,
Nov 14, 2021, 12:09:47 PM11/14/21
to sdrtrunk
Denny,

It's been a while since I've built from master, and had to install openjdk-17, but after a successful build I'm getting an exception during launch:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 0
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at io.github.dsheirer.source.tuner.rtl.RTL2832TunerController$Descriptor.getSerial(RTL2832TunerController.java:1416)
    at io.github.dsheirer.source.tuner.rtl.RTL2832TunerController.getUniqueID(RTL2832TunerController.java:320)
    at io.github.dsheirer.source.tuner.rtl.RTL2832TunerController.init(RTL2832TunerController.java:163)
    at io.github.dsheirer.source.tuner.rtl.r820t.R820TTunerController.init(R820TTunerController.java:276)
    at io.github.dsheirer.source.tuner.TunerManager.initRTL2832Tuner(TunerManager.java:508)
    at io.github.dsheirer.source.tuner.TunerManager.initTuner(TunerManager.java:333)
    at io.github.dsheirer.source.tuner.TunerManager.initTuners(TunerManager.java:148)
    at io.github.dsheirer.source.tuner.TunerManager.<init>(TunerManager.java:79)
    at io.github.dsheirer.source.SourceManager.<init>(SourceManager.java:46)
    at io.github.dsheirer.gui.SDRTrunk.<init>(SDRTrunk.java:167)
    at io.github.dsheirer.gui.SDRTrunk.main(SDRTrunk.java:624)


and the program stalls at this point.

Ron Webb

unread,
Nov 14, 2021, 12:55:55 PM11/14/21
to sdrtrunk
I was JUST in the process of starting my own thread on a very similar topic. It too has been quite a time since I have built SDRTrunk from source, but in the past, I have done so countless times on both Windows and Linux. My typical user interface is my WIndows-based laptop, currently running Windows 11. I WAS having difficulty building the latest code. It was frustrating me but somehow I just came across my culprit. It was a little hidden and probably due to the fact I have been using the same laptop for MANY years and have many different versions of JAVA installed. Two of the versions of Java that were installed was Oracle Java 14 and Oracle Java 17. When in a Command Prompt window, if I were to type "java -version", it was listing that I was using Java 17. I was getting build errors, which I wasn't fully understanding, one was:

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: invalid source release: 17

This was puzzling me and I THOUGHT it was somehow saying there was an issue with Java 17. In my process of searching for a solution, I decided to go into Environmental Variables and change my JAVA_HOME to the Oracle Java 14 version. This is when I got really confused because before making a change, it was actually set to Java 14 instead of Java 17... strange. I then went back to my Command Prompt and decided, just for the heck of it, to type in "echo %JAVA_HOME%" and it reported "C:\Program Files\Java\jdk-14". I then typed in "set JAVA_HOME=C:\Program Files\Java\jdk-17", followed by (just for the sake of completeness) "set PATH=%JAVA_HOME%\bin;%PATH%". Now, when I typed in "echo %JAVA_HOME%", it reported that it was now "jdk-17" instead of "jdk-14". I then tried to re-build the source code and it built properly. I'm not exactly sure why Windows was so fouled up. Maybe it had something to do with the upgrade from Windows 10 to Windows 11 or something else, but whatever the case, all is well now.

hans...@gmail.com

unread,
Nov 14, 2021, 1:02:45 PM11/14/21
to sdrtrunk
I'm not sure what I did, but this is no longer a problem for me and am able to load sdrtrunk again.

DaveNF2G

unread,
Nov 14, 2021, 1:35:45 PM11/14/21
to sdrtrunk
I downloaded the x86 zipfile under Assets for alpha six, which is linked to message #1100 about adding NBFM squelch.

Dave Brubeck

unread,
Nov 14, 2021, 3:44:33 PM11/14/21
to sdrtrunk
Very cool! It's working fine on my macOS Monterey.

неділя, 14 листопада 2021 р. о 20:35:45 UTC+2 davidtho...@gmail.com пише:

GTR8000

unread,
Nov 14, 2021, 3:53:19 PM11/14/21
to sdrtrunk
As I stated, you need to build alpha 7 from scratch using the latest source files. NBFM squelch has nothing to do with alpha 6. You need to have OpenJDK 17 installed on your PC in order to build the project. If you're unfamiliar with that process, I suggest either researching how to build a project from GitHub source files, or just wait until the pre-compiled release of alpha 7 comes out.

GTR8000

unread,
Nov 14, 2021, 4:15:47 PM11/14/21
to sdrtrunk
Got these two errors....

14:09:32.739 ERROR i.g.d.d.f.c.o.ChannelOutputProcessor - Error while processing polyphase channel samples  [348MB/400MB 87%]

java.lang.ClassCastException: class io.github.dsheirer.module.decode.mdc1200.identifier.MDC1200Identifier cannot be cast to class java.lang.Comparable (io.github.dsheirer.module.decode.mdc1200.identifier.MDC1200Identifier is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
        at java.base/java.util.TreeMap.compare(Unknown Source)
        at java.base/java.util.TreeMap.addEntryToEmptyMap(Unknown Source)
        at java.base/java.util.TreeMap.put(Unknown Source)
        at java.base/java.util.TreeMap.put(Unknown Source)
        at java.base/java.util.TreeSet.add(Unknown Source)
        at io.github.dsheirer.module.decode.mdc1200.MDCDecoderState.receive(MDCDecoderState.java:89)
        at io.github.dsheirer.module.decode.mdc1200.MDCDecoderState.receive(MDCDecoderState.java:39)
        at io.github.dsheirer.sample.Broadcaster.broadcast(Broadcaster.java:152)
        at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
        at io.github.dsheirer.module.decode.Decoder$MessageDistributor.receive(Decoder.java:96)
        at io.github.dsheirer.module.decode.Decoder$MessageDistributor.receive(Decoder.java:89)
        at io.github.dsheirer.sample.Broadcaster.broadcast(Broadcaster.java:152)
        at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
        at io.github.dsheirer.module.decode.mdc1200.MDCMessageProcessor.receive(MDCMessageProcessor.java:65)
        at io.github.dsheirer.module.decode.mdc1200.MDCMessageProcessor.receive(MDCMessageProcessor.java:28)
        at io.github.dsheirer.sample.Broadcaster.broadcast(Broadcaster.java:152)
        at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
        at io.github.dsheirer.bits.MessageFramer$MessageAssembler.flush(MessageFramer.java:214)
        at io.github.dsheirer.bits.MessageFramer$MessageAssembler.receive(MessageFramer.java:204)
        at io.github.dsheirer.bits.MessageFramer.process(MessageFramer.java:93)
        at io.github.dsheirer.dsp.NRZDecoder.process(NRZDecoder.java:65)
        at io.github.dsheirer.dsp.afsk.AFSK1200Decoder.dispatch(AFSK1200Decoder.java:127)
        at io.github.dsheirer.dsp.afsk.AFSK1200Decoder$Decoder.receive(AFSK1200Decoder.java:170)
        at io.github.dsheirer.dsp.afsk.AFSK1200Decoder$Decoder.receive(AFSK1200Decoder.java:150)
        at io.github.dsheirer.dsp.filter.resample.RealResampler$BufferManager.consumeOutput(RealResampler.java:139)
        at com.laszlosystems.libresample4j.Resampler.process(Resampler.java:291)
        at io.github.dsheirer.dsp.filter.resample.RealResampler.resample(RealResampler.java:58)
        at io.github.dsheirer.dsp.afsk.AFSK1200Decoder.receive(AFSK1200Decoder.java:120)
        at io.github.dsheirer.module.decode.afsk.AbstractAFSKDecoder.receive(AbstractAFSKDecoder.java:53)
        at io.github.dsheirer.module.decode.afsk.AbstractAFSKDecoder.receive(AbstractAFSKDecoder.java:31)
        at io.github.dsheirer.sample.buffer.ReusableBufferBroadcaster.broadcast(ReusableBufferBroadcaster.java:42)
        at io.github.dsheirer.sample.buffer.ReusableBufferBroadcaster.broadcast(ReusableBufferBroadcaster.java:23)
        at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
        at io.github.dsheirer.module.decode.nbfm.NBFMDecoder$SourceEventProcessor.lambda$receive$0(NBFMDecoder.java:320)
        at io.github.dsheirer.dsp.filter.resample.RealResampler$BufferManager.consumeOutput(RealResampler.java:139)
        at com.laszlosystems.libresample4j.Resampler.process(Resampler.java:291)
        at io.github.dsheirer.dsp.filter.resample.RealResampler.resample(RealResampler.java:58)
        at io.github.dsheirer.module.decode.nbfm.NBFMDecoder.receive(NBFMDecoder.java:155)
        at io.github.dsheirer.module.decode.nbfm.NBFMDecoder.receive(NBFMDecoder.java:46)
        at io.github.dsheirer.sample.buffer.ReusableBufferBroadcaster.broadcast(ReusableBufferBroadcaster.java:42)
        at io.github.dsheirer.sample.buffer.ReusableBufferBroadcaster.broadcast(ReusableBufferBroadcaster.java:23)
        at io.github.dsheirer.sample.Broadcaster.receive(Broadcaster.java:59)
        at io.github.dsheirer.sample.buffer.ReusableComplexBufferAssembler.flush(ReusableComplexBufferAssembler.java:159)
        at io.github.dsheirer.sample.buffer.ReusableComplexBufferAssembler.receive(ReusableComplexBufferAssembler.java:131)
        at io.github.dsheirer.sample.buffer.ReusableComplexBufferAssembler.receive(ReusableComplexBufferAssembler.java:143)
        at io.github.dsheirer.dsp.filter.channelizer.output.TwoChannelOutputProcessor.process(TwoChannelOutputProcessor.java:117)
        at io.github.dsheirer.dsp.filter.channelizer.output.ChannelOutputProcessor.processChannelResults(ChannelOutputProcessor.java:124)
        at io.github.dsheirer.dsp.filter.channelizer.PolyphaseChannelSource.processSamples(PolyphaseChannelSource.java:248)
        at io.github.dsheirer.source.tuner.channel.TunerChannelSource$ScheduledIntervalProcessor.run(TunerChannelSource.java:319)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

On Sunday, November 14, 2021 at 7:11:19 AM UTC-5 sdrtrunk wrote:

sdrtrunk

unread,
Nov 15, 2021, 4:22:09 AM11/15/21
to sdrtrunk

Dave Brubeck

unread,
Nov 16, 2021, 12:35:43 PM11/16/21
to sdrtrunk
After 2 days of testing I found some bugs:
1) When you change current MHz in "Tuners" and then return to your current playing frequencies in Playlist
Screenshot 2021-11-16 at 19.23.43.png
you can see Power indicator is empty, but you still able to receive a signals:
Screenshot 2021-11-16 at 19.25.15.png
2) After 1 day of running the SDRTrunk, I noticed I can't hear some channels. The red line in power indicator is higher than blue. Looks like squelch automatically drops that signals. But if you change squelch level for example to -61.0 everything working fine again.

My OS is macOS Monterey.

Thank you for your great gob!

Dave
Message has been deleted

Ron Webb

unread,
Nov 16, 2021, 3:15:56 PM11/16/21
to sdrtrunk
I tried to build pull 1103 this morning and had a failure. One thing I found interesting is that it created a small web interface for details. I was attempting to package this web-based error results but had errors trying to attach it, zipped. I have a web testing server and a sub-domain to route to it, so you can see my errors at https://test.webbnet.org/.

In case it helps, this was attempted on a Windows 11 laptop with the following version info:
openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Microsoft-28056 (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Microsoft-28056 (build 17.0.1+12-LTS, mixed mode, sharing)

Ron Webb

unread,
Nov 16, 2021, 11:10:00 PM11/16/21
to sdrtrunk
Just in case there is any doubt, I tried building the software with Ubuntu 21.10 with the latest openJDK 17.0.1. I got the exact same results when attempting to build. I'm not knowledgeable enough to decipher what is wrong in the code but as I mentioned in my last post, you can see the  errors at https://test.webbnet.org/.

sdrtrunk

unread,
Nov 17, 2021, 3:52:07 AM11/17/21
to sdrtrunk
Hi Dave!

When you have channels playing, normally sdrtrunk should lock out the source tuner so that you can't change the frequency.  Is it possible that you have multiple tuners and the channels are being fed by another tuner?

On the power meter, the blue line is squelch and the red/pink line is the peak power indicator.  If you're not seeing the gray bar power indicator, then possibly the channel is not selected above in the Now Playing table?

Denny

sdrtrunk

unread,
Nov 17, 2021, 4:04:29 AM11/17/21
to sdrtrunk
Can you post the text from the console, starting with the gradle command that you're running through to the error message? 

hans...@gmail.com

unread,
Nov 17, 2021, 3:43:44 PM11/17/21
to sdrtrunk
Denny,  I've got the same results trying to build master.  Here is the console output:

$ ./gradlew clean build
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
Project : => no module-info.java found
Skipping OS Image - Linux ARM 64-bit JDK was not found at /home/denny/java_jdks/linux-arm64/jdk-17.0.1-full
Skipping OS Image - Linux x86 64-bit JDK was not found at /home/denny/java_jdks/linux-x64/jdk-17.0.1-full
Skipping OS Image - OSX x86 64-bit JDK was not found at /home/denny/java_jdks/osx-x64/jdk-17.0.1-full.jdk
Skipping OS Image - Windows x86 64-bit JDK was not found at /home/denny/java_jdks/windows-x64/jdk-17.0.1-full

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :test FAILED

DecodeEventLoggerTest > test_receive_withCommasInDetails_writesToCsv() FAILED
    org.mockito.exceptions.verification.opentest4j.ArgumentsAreDifferent at DecodeEventLoggerTest.java:119

DecodeEventLoggerTest > test_receive_withQuotesInDetails_writesToCsv() FAILED
    org.mockito.exceptions.verification.opentest4j.ArgumentsAreDifferent at DecodeEventLoggerTest.java:101

DecodeEventLoggerTest > test_receive_writesToCsv() FAILED
    org.mockito.exceptions.verification.opentest4j.ArgumentsAreDifferent at DecodeEventLoggerTest.java:83

4 tests completed, 3 failed


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///mnt/RAID/src/SDR/sdrtrunk/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 48s
9 actionable tasks: 9 executed

Ron Webb

unread,
Nov 17, 2021, 10:45:22 PM11/17/21
to sdrtrunk
Did something happen on the Google Groups site? Was I blocked for some reason? I generally make my posts at Groups.Google.com but today it says I don't have permissions, so this is posted via email. Yesterday, I created a little web page to show the error that was generated by Grandle and put it up on test.webbnet.org (a web development server I built), in case it shed any light on what was wrong with the build process. I just modified the web page to add a short video of the build process... it is less than a minute long.
_____________________________________
Ron Webb



--
You received this message because you are subscribed to the Google Groups "sdrtrunk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdrtrunk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdrtrunk/9e96bd76-eaad-44aa-a6b5-decc567eef04n%40googlegroups.com.

sdrtrunk

unread,
Nov 18, 2021, 4:32:31 AM11/18/21
to sdrtrunk
I just pushed up a change to disable those 3 failing tests.  You should be able to pull down the latest code and try building again.

sdrtrunk

unread,
Nov 18, 2021, 4:34:04 AM11/18/21
to sdrtrunk
Ron, I saw that message that you posted.  Not sure why you're getting a permission denied.

Also, see my earlier message ... I disabled those tests, so you should be able to build ok now from the latest code.

hans...@gmail.com

unread,
Nov 18, 2021, 9:05:26 AM11/18/21
to sdrtrunk
Thanks.  I should have mentioned that the failed tests really didn't cause the build to fail, the files were still there and ran as expected. 

Unfortunately for me I'm having some problems with NBFM channels.  As far as I can tell the squelch feature isn't the problem, but I'm only able to hear about 1 second of audio in about a 5 second cycle.   With squelch set below the peak I get the bursts, set above the peak I don't and the channel changes from call to fade--so it appears squelch is fine.  I only have a couple channels to test on, but I would expect that if I dropped squelch on any channel I would at least get constant static as opposed to short bursts of static every 5 seconds.

hans...@gmail.com

unread,
Nov 18, 2021, 1:18:12 PM11/18/21
to sdrtrunk
I've tracked my problem down to a regression somewhere between your release of 0.5.0-alpha6 and my build of an alpha6 based on master--not sure what commits occurred between this yet.  In other words, NBFM works as expected when I use your build of 0.5.0-alpha6 from github, but not my build of it.  My builds prior to alpha6 also work.

hans...@gmail.com

unread,
Nov 18, 2021, 2:18:00 PM11/18/21
to sdrtrunk
My bisect resulted in:
2847dff64a7af27cd0120616e2d818e5fd7bdfa3 is the first bad commit
commit 2847dff64a7af27cd0120616e2d818e5fd7bdfa3
Author: Denny Sheirer <dennissh...@yahoo.com>
Date:   Sun Dec 27 06:48:37 2020 -0500

    #1021 Updates FIR filter to use the java Math.fma floating point multiply and accumulate instruction for more efficient processing. (#1022)
    
    Co-authored-by: Denny <denny@denny-desktop>

 .../java/io/github/dsheirer/dsp/filter/fir/real/RealFIRFilter2.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

hans...@gmail.com

unread,
Nov 18, 2021, 2:38:48 PM11/18/21
to sdrtrunk
Sorry for all the posts, but after reverting the commit (replacing mAccumulator += mData[x] * mCoefficients[x];)  master builds and my problem is corrected.

I'm not smart enough to know why this is---but Denny, NBFM squelch works great!  Thanks.

Hans
Reply all
Reply to author
Forward
Message has been deleted
0 new messages