Introduction

In the previous post (Ref.1) I examined how we can create an embedded python block on GNU Radio to communicate with the RaspberryPi4 GPIO. In this post I build on the concept by adding a Python module to enable us to create a Marine VHF channel scanner. I struggled with how to time step a variable (RTL-SDR fc) for a long time until I came upon two videos (Ref.2/3) that use a Python module to build a sweeper. The developer used a combination of Probe Signal – Function Probe & Python module to implement the sweeper.
Figure 1 shows a block diagram. Probe Signal 1 steps the scanner frequency by calling a sweeper function in the Python Module. As long as the Threshold detector measures 0, then the frequency is incremented. When a signal is received, the Threshold detector produces a 1 and this stops the scanner.
GNU Radio Schematic Marine VHF Channel Scanner





Figure 2 shows the GNU Radio Marine VHF channel scanner. The schematic is identical to the RTL-SDR VHF receiver schematics that I have used in previous posts. The major difference is instead of a GUI Range Variable for the carrier frequency fc, I am just using a variable for fc, but whose actual value depends on a Python module. Figure 3 shows the variable fc with the Python module. Figure 4 shows Function Probe 1 & Probe Signal 1. The Probe Signal 1 measures the level of the output of the Threshold detector. As long as this is zero, then the Function Probe 1 calls the Python Module to step the scanner frequency. As soon as a signal is detected, the Threshold turns to 1 and the Python module stops scanning. Scanning rates and threshold settings depend on the particular environment.
Scanning Results


Figure 5 shows the Scanner when no signals are present. Figure 6 shows the Scanner stopped at 162.4MHz Toronto Marine Weather. Note the Threshold detector shows 1.
GNURadio Companion Basics Course:
https://clarktelecommunications.thinkific.com/courses/gnuradio_basics
Please send your comments, questions and suggestions to:
contact:

References
#1. – “GNU Radio Embedded Python Block for RaspberryPi4 GPIO”
https://jeremyclark.ca/wp/telecom/gnu-radio-embedded-python-block-for-raspberrypi4-gpio/
#2. – “gnuradio function probe part1|Hello World”, AlienAI
https://www.youtube.com/watch?v=LiAcNm9Rru8
#3. – “gnuradio function probe part2|frequency sweep”, AlienAI
https://www.youtube.com/watch?v=9bhmF7WRvMQ