RECEPTION OF DIGITAL SELECTIVE CALLING ON MF-HF
(2023)

The Python program for the reception of Digital Selective Calling on MF-HF.
Buttons:
-START-
Press this button to start the reception or to stop the reception.
-44100-
This is the sample rate of your audio device. If you have a slow PC, then you can also select 11025 samples/sec., that will reduce the processing power a lot! But then you need to use an audio device that supports this sample rate or you have to use downsampling software like Pulse Audio for Linux.
-400 - 2400-
This is the audio range that is scanned for usable signals. Normally it is set to 400 - 2400 Hz. But if you have some unwanted signals in the spectrum you can select other ranges. For 1500 Hz center frequency you can select 1000 - 2000 Hz or 1200 - 1800 Hz. For a 1500 Hz center frequency, you have to tune the SSB receiver 1500 Hz lower than the DSC frequency. So 8413 kHz for a 8414.5 kHz DSC frequency and 2186 kHz for a DSC frequency of 2187.5 kHz
For a 1700 Hz center frequency you can select 1400 - 2000 Hz. Selection is done by pressing the button, the range is given by the button text.
-Auto Scroll-
Normally activated, the last message is shown on the display.
-DSC log ON-
If OFF, the saving of the DSC data to the files is stopped.
-All Messages-
Almost all messages are test messages. If the reception of All Messages is disabled, the test messages are not decoded anymore.
-Test Mode-
Normally switched off. You can select Level 1 debug messages (orange button) or Level 2 debug messages (red button). But Level 2 will display much useless information.

The spectrum display

Configuration
GM4SLV : MF/HF DSC Database:
http://www.yaddnet.org/pages/php/test/mmsi_coast.php
http://www.yaddnet.org/pages/php/mmsi_shipname.php
Rename the data bases to YADDcoast.txt and YADDship.txt.
For more information abour the reception of DSC signals, visit the DSC group website: https://groups.io/g/dsc-list

The file structure

The script that is used to start DSCHFsnoop on a Raspberry Pi
Downsampling
You can use the program with the Raspberry Pi version 4. The CPU percentage is approximately 25%, so it should also be possible to excecute it with a 3x slower Raspberry Pi version 3. But it might be that you have to downsample the audio stream. Before pressing Start, press the orange "44100" button and the sample rate will be reduced to 11025. Then the CPU percentage is lower than 10% on my Raspberry Pi version 4 and it should certainly be possible to excecute it with a Raspberry Pi version 3. My USB sound device supports a sample rate of 11025. It is a Behringer type UFO202 and even supports a 8000 Hz sampling rate. But if your device does not support it, you can do the downsampling with Pulseaudio. Then you have to install the "Pulse" audio platform on the Raspberry Pi. Pulse is then selected as audio input device and is used for the downsampling of the audio stream. Type the following commands in a terminal window:
sudo apt-get install pulseaudio
sudo apt-get install pavucontrol
Error handling
Every character is transmitted twice, once in the DX position and once 5 characters later in the RX position. And every byte of 10 bits is specially coded. If one bit or more bits of the same "Y" or "B" value is disturbed, it will become an invalid character. This decoder program accepts wrong RX data, but only valid characters.
To eliminate problems with fading, two zero crossings are combined ("YB" and "BY" crossings) for the bit synchronisation.
Click this link to download the ZIP file with the Python programs and other scripts
FTPsnoop.py

You have to edit the first lines with login codes of FTPsnoop.py.

Simple direct conversion receiver that was used to receive the DSC messages on 8414.5 kHz
SOFTWARE
Before you are using this program, you have to install Python. That is very simple. But read first something about Python by clicking the following link:WHAT IS PYTHON AND HOW DO YOU INSTALL PYTHON
As the source code of Python is written in ASCII, it is very simple to modify the program to you own requirements. Think for example about the size of the screen, the colors etc.
Required Python version:
Click this link to download the ZIP file with the Python programs and other scripts