SDR# Fixing the SDR# CTCSS plug-in

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
This is a place holder for discussion on this topic. (if any)

Issue: The SDR# CTCSS plug-in has stopped working in newer SDR# v1822ish versions.

Cause: Smaller audio buffer SDR# now uses is too small to hold enough samples/cycles for frequencies between 67-254.1 Hz to detect the tones.

Fix: Create a (larger) hold buffer for audio samples so we can better detect tones when buffer full.

I have now done the fix described above and now testing.
It does seem to be working but I have only done limited testing on real CTCSS signals as I don't see frequent CTCSS signals at the moment.
Using a test set was OK but again have not done much testing here either.

I still think this plug-in is a bit flaky at detection at times.
 

AM909

Radio/computer geek
Premium Subscriber
Joined
Dec 10, 2015
Messages
1,105
Location
SoCal
... It does seem to be working but I have only done limited testing on real CTCSS signals as I don't see frequent CTCSS signals at the moment.
Using a test set was OK but again have not done much testing here either. ...

I've got a fair amount of CTCSS and DCS signal to listen to, both live and in IQ captures, if you want to point me to new stuff to test. Currently on SDR# v1807 and CTCSS and DCS decoders v1.0.0.0 "Copyright Youssef TOUIL 2012".
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
Did a side by side comparison with SDR# v1822 + CTCSS plug-in and KG-Tone and the CTCSS plug-in seems to be working similar.
Neither are perfect or the same in some cases.

Animated GIF:
dZq8d4K.gif


I'll see if I can upload the update sometime soon for people to test.
 
Last edited:

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
OK, I've uploaded "fixed" plug-in for people to try. (see link below)
- see 'changelog.txt' for other changes

I've noticed that if a signal is off frequency, the detection of the CTCSS tone can be choppy or missed.
I'm amazed just how many signals I've come across that are off frequency (up to 500 Hz).
This has to be intentional as nobody can tune a radio that badly.

NOTE: I have not even looked at the DCS plug-in yet. Hopefully it's the same fix.



Latest version (v1.3.0.0) can be found here: MEGA - Download
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
Ok, have fixed the color problem and some other minor things. (see link below for update)

Looks like I can apply the same fix to the DCS plug-in to get it going again.
I've noticed that both the DCS plug-in and KG-Tone are showing the inverted value as the normal value.
I have a test set that I can program DCS and I set it to '023' but both DCS plug-in and KG-Tone are showing '047'.
When I get a bit more time I'll finish it off and upload it. (no timeline)



Latest version (v1.3.1.0) can be found here: MEGA - Download
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
Hello,

I have now applied the audio buffer fix to the DCS Decoder plug-in. (see link below for update)
I have also fixed the bit decision so the DCS code will displayed in the correct order.
I have a test set that I can program DCS and I set it to '023' but both DCS plug-in and KG-Tone are showing '047'.
Now the plug-in will show it as +023 -047.

I've also added the option, so only DCS codes that exist in the standard DCS code list are displayed.
- This can be the 83 standard or 104 extend DCS code list.

see the changelog.txt for more details and how to use the options.

I don't see DCS codes in the wild that often so I can't test the plug-in that much. (only with set set)



Latest CTCSS plug-in version (v1.3.1.0)
Latest DCS plug-in version (v1.3.0.0)
Both can be found here:
MEGA - Download
 

AM909

Radio/computer geek
Premium Subscriber
Joined
Dec 10, 2015
Messages
1,105
Location
SoCal
I've also added the option, so only DCS codes that exist in the standard DCS code list are displayed.
- This can be the 83 standard or 104 extend DCS code list.
I thought about mentioning it again, but ... THANKS! I made the suggestion some years ago on the blog. It's so much easier than having to copy them all quickly or punch them into a lookup spreadsheet or whatever, since I don't remember any but the most common ones on sight any more.
 

scan32470

Member
Premium Subscriber
Joined
Aug 8, 2005
Messages
16
Hello,

I have now applied the audio buffer fix to the DCS Decoder plug-in. (see link below for update)
I have also fixed the bit decision so the DCS code will displayed in the correct order.

Now the plug-in will show it as +023 -047.

I've also added the option, so only DCS codes that exist in the standard DCS code list are displayed.
- This can be the 83 standard or 104 extend DCS code list.

see the changelog.txt for more details and how to use the options.

I don't see DCS codes in the wild that often so I can't test the plug-in that much. (only with set set)



Latest CTCSS plug-in version (v1.3.1.0)
Latest DCS plug-in version (v1.3.0.0)
Both can be found here:
MEGA - Download
When I download these and unzip them the result in each folder is a single file with a .7z extension. Is that what I'm supposed to see?
I'm also following some perhaps outdated instructions on YouTube about how to install a plugin to SDR# (I have V 1.0.0.1811), but they refer to a "plugins" folder in the Windows sdrsharp-x86 folder (but my installation doesn't have that plugins folder). Anyway, would you have a guide to installing your plugins in SDR#? Thanks for any help you can provide.
 

AM909

Radio/computer geek
Premium Subscriber
Joined
Dec 10, 2015
Messages
1,105
Location
SoCal
7-zip (.7z files) is another type of compression/packaging, like zip. Unfortunately, when you tell mega.nz to give you a .7z file in zip format, it just zips up the .7z file instead of uncompressing it and then re-zipping it. If your unzip tool isn't able to open the .7z file (try it; WinZip does), you need to install 7zip and then use that to decompress and extract from the .7z file.
 

alphaacres

Member
Premium Subscriber
Joined
Feb 3, 2006
Messages
209
Location
Oswego, New York
SDR# with Community Plugins
This automated installer configures the latest SDR# release with the most popular community plugins. It is managed by Rodrigo Pérez.

You are a Plugin Developer and you want to reference your work in this Community Package? Contact us!

Please give him your files
 

scan32470

Member
Premium Subscriber
Joined
Aug 8, 2005
Messages
16
7-zip (.7z files) is another type of compression/packaging, like zip. Unfortunately, when you tell mega.nz to give you a .7z file in zip format, it just zips up the .7z file instead of uncompressing it and then re-zipping it. If your unzip tool isn't able to open the .7z file (try it; WinZip does), you need to install 7zip and then use that to decompress and extract from the .7z file.

thanks, I finally figured the unzip part out. I noticed in the magic file for each plugin that for SDR# Versions above 1800 you only need to copy and paste the DLL file into the plugin folder.

I did that and then started SDR#, I activated the plugins but really not sure how to set them properly. Is there a guide somewhere?

For instance, I clicked on the Detect checkbox and see the plugins came alive, but I don't know what to enter or where. Am I supposed to enter a CTSS or DCS tone for the frequency I am scanning for, or just let it find the tone and use it?
 

AM909

Radio/computer geek
Premium Subscriber
Joined
Dec 10, 2015
Messages
1,105
Location
SoCal
You don't have to enter anything. They show the PL or DCS code present on the signal you are currently tuned to. Note that the DCS plugin shows all possible (usually about six) DCS codes that can produce the current pattern being received; only one specific one (or its inverse) is actually referred to by convention when programming radios. See DPL / DCS Information for the list of standard codes colored blue (search for Here is the list of the so called "standard" DCS codes: about 30% of the way down the page). The list that follows it is other codes that are possible, but not normally used because of higher probability of falsing or poor detection.

In the main window of the plugin, both CTCSS and DCS Plugins have a Squelch checkbox and a Code field. If you check the box, it should mute audio unless that code is received. There is also a "Set this code" button that transfers the currently-decoded code (I don't know which one) to the Code field. I haven't used this feature.

@thewraith2008: It would really be cool if the DCS decoder were to highlight/bold the primary normal and inverted code based on the tables I linked, and maybe make them all red if non-standard. I wrote a spreadsheet that I have to use to get the correct code from the list every time. Being able to highlight and copy from the window would be cool, too.
 

scan32470

Member
Premium Subscriber
Joined
Aug 8, 2005
Messages
16
You don't have to enter anything. They show the PL or DCS code present on the signal you are currently tuned to. Note that the DCS plugin shows all possible (usually about six) DCS codes that can produce the current pattern being received; only one specific one (or its inverse) is actually referred to by convention when programming radios. See DPL / DCS Information for the list of standard codes colored blue (search for Here is the list of the so called "standard" DCS codes: about 30% of the way down the page). The list that follows it is other codes that are possible, but not normally used because of higher probability of falsing or poor detection.

In the main window of the plugin, both CTCSS and DCS Plugins have a Squelch checkbox and a Code field. If you check the box, it should mute audio unless that code is received. There is also a "Set this code" button that transfers the currently-decoded code (I don't know which one) to the Code field. I haven't used this feature.

@thewraith2008: It would really be cool if the DCS decoder were to highlight/bold the primary normal and inverted code based on the tables I linked, and maybe make them all red if non-standard. I wrote a spreadsheet that I have to use to get the correct code from the list every time. Being able to highlight and copy from the window would be cool, too.

Thank you! I did just get one brief transmission about 5 minutes ago and of the 6 numbers displayed, I do see one that matches the frequency listed in Radio Reference. I clicked the Set Code button after that but really not sure what it does since nothing changed that I could see. See attached image.
 

Attachments

  • dcs.JPG
    dcs.JPG
    23.9 KB · Views: 27

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
SDR# with Community Plugins
This automated installer configures the latest SDR# release with the most popular community plugins. It is managed by Rodrigo Pérez.

You are a Plugin Developer and you want to reference your work in this Community Package? Contact us!

Please give him your files
No thanks, I'd rather release and allow open discussion and support here.


@thewraith2008: It would really be cool if the DCS decoder were to highlight/bold the primary normal and inverted code based on the tables I linked, and maybe make them all red if non-standard. I wrote a spreadsheet that I have to use to get the correct code from the list every time. Being able to highlight and copy from the window would be cool, too.

You could try this option to filter the results (from changelog.txt)
Code:
Added: Option to only use detected DCS codes that exist in table
- Reduces the list to the most likely used codes
- Three options are:
   0 = Default - No need to add line if this is all you want to use.
   1 = Use only the standard 83 DCS codes (as defined in ETSI TS 103 236 V1.1.1 (Table 2))
   2 = Same as '1' + 21 extended DCS codes
- To use, add the following line (with Notepad) to the file 'SDRSharp.exe.config' and set value (find the other entries that start with 'DCS.')
    <add key="DCS.OnlyUseDcsCodesInTable" value="2" />

The reason multiple DCS codes are shown is because there is no sure way to know what the 'primary' code is. The above option at least removes the ones that don't appear in the tables.
 

AM909

Radio/computer geek
Premium Subscriber
Joined
Dec 10, 2015
Messages
1,105
Location
SoCal
Excellent and thank you! I hadn't gotten around to installing your new versions of the plugins yet, so didn't see that. I also see you inverted the polarity, apparently to what it's supposed to be, which was on my list of things to investigate (i.e., whether the plugin was "wrong", or the signal was getting inverted somewhere upstream; always been an issue with DPL). I can confirm the plugins work with SDR# 1.0.0.1807.

There's another issue, but I don't know if the plugin has control over it. When play of a live or recorded signal is stopped, the decoder aux windows disappear. If the signal you are interested in is right at the end of a recording, you have very little time to see and record the tone or DCS. Can the aux windows be made to be visible always?

I'll also mention that I send window sizing and positioning messages to the aux windows to put them where I want and size them so as to fit in the minimal amount of space I have available (I have issues with the "Show on spectrum" option, or I would use that instead).
Screenshot 2022-01-03 123807.jpg
It would be nice if it would natively allow the user to size/position the windows and retain those settings. Also, if the "Detect" flag in the DCS window could be moved in place of the "Code+" label, the "Code-" label removed, and just put the sign in front of the codes, it would allow that window to be even smaller:
Detect
+073
-506
Thanks again for you work on these long-neglected important plugins! :)
 

thewraith2008

Member
Joined
Nov 22, 2016
Messages
1,850
There's another issue, but I don't know if the plugin has control over it. When play of a live or recorded signal is stopped, the decoder aux windows disappear. If the signal you are interested in is right at the end of a recording, you have very little time to see and record the tone or DCS. Can the aux windows be made to be visible always?
This is by design.
When SDR# is not playing or the detector is not NFM, the aux window will be hidden.

I have added as a manual option (by editing 'SDRSharp.exe.config') a way to override this default behavior.

I'll also mention that I send window sizing and positioning messages to the aux windows to put them where I want and size them so as to fit in the minimal amount of space I have available (I have issues with the "Show on spectrum" option, or I would use that instead).
View attachment 114540
It would be nice if it would natively allow the user to size/position the windows and retain those settings. Also, if the "Detect" flag in the DCS window could be moved in place of the "Code+" label, the "Code-" label removed, and just put the sign in front of the codes, it would allow that window to be even smaller:

Thanks again for you work on these long-neglected important plugins! :)
I have already made changes awhile ago (for next release) which changes the aux window (for both CTCSS and DCS)
  • Removed window title bar+borders
  • Saves window position
  • Match theme colors*
  • Different tone detect color
The aux window is not resizable and is as small as it will go for the maximum info it holds.
I have not made the aux window autosizing because I hate that.

4ifMuAZ.png



* Matching themes colors is a pain in the neck as SDR# keeps changing the UI.
Because I wanted the plug-in to be backwards compatible with pre v1717 SDR#, the theme colors are hardcoded in to plug-in.
I made the stupid mistake of assuming the the standard Telerik theme colors where static. This has changed in one of last versions (1832?)
 
Top