GNURadio introduction to Satellites



I, JE9PEL will exercise along study.grc included in grc_study.zip (by JI1SZP)
on SDR+GNURadio. This is the content presented at the JAMSAT Symposium held
in Kyoto in Japan on 16 and 17 March 2019. And it's also introduced in detail
in the JAMSAT Newsletter #293. And also refer to the reference below.
I, JE9PEL added the supplementary issues in the exercise format after
[Exercise 9-1] in relation to [Exercise 6.1].


[Exercise 1-1] Generate a cosine wave and display the waveform

Core -> Variables -> Variable
        ID: samp_rate, Value: 32000
Core -> Waveform Generators -> Signal Source
        Right click ->Properties
        Output Type: Complex, Sample Rate: samp_rate
        Waveform: Cosine, Frequency: 100
Core -> Instrumentation -> QT -> QT GUI Time Sink
        Right click ->Properties
        Output Type: Complex, Sample Rate: samp_rate

  


[Exercise 1-2] Make only one cosine wave

Signal Source -> Right click ->Properties -> Output Type -> Float
QT GUI Time Sink -> Right click ->Properties -> Output Type -> Float
File -> Save As -> Name: sutudy_1_0.grc -> Save

  


[Exercise 1-3] Add another 'Signal Source' to display different waveform

Signal Source -> Right click ->Properties -> Frequency: 150
Signal Source -> Right click ->Properties -> Output Type -> Float
QT GUI Time Sink -> Right click ->Properties -> Number of Inputs: 2
QT GUI Time Sink -> Right click ->Properties -> Output Type -> Float
Save the current flow graph as (sutudy_1_0.grc)

  


[Exercise 2-1] Display 'SDR Source' output in FFT and Waterfall

Variable -> ID: samp_rate, Value: 2084000
QT GUI Range -> ID: freq0, Type: Float, Default Value: 144.660e6
                Start: 144.000e6, Stop: 146.000e6, Step: 1e3
QT GUI Range -> ID: vol, Type: Float, Start: 0.1, Stop: 10, Step: 1
RTL-SDR Source -> Sample Rate: samp_rate, Frequency: freq0
                  ppm: 64, RF gain: 49
QT GUI Sink -> Center Frequency: 144.660e6, Bandwidth: 2000
File -> Save As -> Name: sutudy_2_0.grc -> Save

  


[Exercise 2-2] Enter and display in 'SDR Sink'

  


[Exercise 3-1] Display the variation of the fixed center frequency

Variable -> ID: center_freq, Value: center_freq_val
QT GUI Range -> ID: center_freq_val, Lavel: center_freq
                Type: Float, Default Value: 144.660e6
                Start: 144e6, Stop: 146e6, Step: 100
RTL-SDR Source -> Sample Rate: samp_rate
                  Frequency: int(center_freq)
QT GUI Sink -> Center Frequency: 144.660e6
               Bandwidth: samp_rate
File -> Save As -> Name: sutudy_3_0.grc -> Save

  


[Exercise 4-1] Add 'File Sink' to save SDR received wave to file

File Sink -> ID: iq_data.wav
File -> Save As -> Name: sutudy_4_0.grc -> Save
When executed, the wav file is saved in Home folder.

  


[Exercise 4-2] Load the saved IQ file

File Source -> File: iq_data.wav, Repeat: No
QT GUI Sink: Center Frequency: 144.660e6
             Bandwidth: samp_rate

  


[Exercise 4-3] Synchronize processing time to real time

Throttle -> Sample Rate: 2084000
QT GUI Sink -> Bandwidth: 2084000
When executed, the loaded IQ file is displayed dynamically.

  


[Exercise 5-1] Insert the LPF and display the waveform

Add the analog processor LPF (Low Pass Filter) to the flow graph created
in Exercise 3-1. It is digitally processed internally. Since the signal
of SDR is a complex signal, it has both positive and negative components.
By sandwiching the LPF, the characteristic of the signal of positive and
negative object can be obtained. And only the target signal can be taken out.

Low Pass Filter -> Cutoff Freq: 640000
                   Transition Width: 120000
File -> Save As -> Name: sutudy_5_0.grc -> Save

  


[Exercise 6-1] Receive and decode GMSK9600 via SDR

Variable -> ID: samp_rate, Value: 2084000
Variable -> ID: center_freq, Value: center_freq_val
QT GUI Range -> Label: center_freq, Default Vallue: 144.640e6
Low Pass Filter -> Decimation -> samp_rate/9600/2, Sample Rate: samp_rate
                   Cutoff Freq: 9600/2, Transition Width: 600
QT GUI Sink -> Center Frequncy: 144.640e6, Bandwidth: 9600*2
GMSK Demod -> Connect after 'Low Pass Filter'
File Sink -> File: GMSK_demod.hex, Input Type: Byte

When executed, 'GMSK_demod.hex' is automatically generated in Home folder.
If '$ hexdump -C GMSK_demod.hex' is entered on Terminal, the saved
'GMSK_demod.hex' will be dumped in hexadecimal. There are other options
for the 'hexdump' command on LINUX:

  -b ... displayed in octal every 1 byte
  -c ... displayed as ASCII characters in 1 byte
  -d ... display in decimal numbers every 2 bytes
  -o ... display in octal every 2 bytes
  -C ... display in hexadecimal for each 1 byte and also
         display ASCII characters on the right

  

(Complement)

> By JH4XSY/1: It was able to decode by changing the cutoff frequency to 9600.
> By JI1SZP: Currently, 1 bit is output as 1 byte.
> Therefore, in order to make it 1 byte,
> it is necessary to attach 8 bytes and make it 1 byte again.
> In addition, you need to apply NRZI etc. to convert to AX.25 9600.
> By JE9PEL: I added the supplementary issues in practice form after
> [Exercise 9-1] in relation to [Exercise 6.1].


[Exercise 7-1] Create an APRS1200 Receiver

After downloading 'gr-bruninga' and 'gr-ax25' beforehand, compile and
build them according to the following procedure and register them GNURadio.

$ git clone https://github.com/tkuester/gr-bruninga
$ cd gr-bruninga
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make -j8
$ sudo -s
# make install
# sudo ldconfig
# cd ~/gr-bruninga/grc
# cp *.* /usr/local/share/gnuradio/grc/blocks
# exit
$ git clone https://github.com/dl1ksv/gr-ax25
$ cd gr-ax25
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make
$ sudo -s
# make install
# sudo ldconfig
# cd ~/gr-ax25/grc
# cp *.* /usr/local/share/gnuradio/grc/blocks
# exit
$ cd
$ gnuradio-companion

  


[Exercise 7-2] Receive and decode APRS1200 via SDR

The flow graph created in Exercise 7-1 was activated and the signal actually
received by SDR+GQRX was decoded and saved with the file name 'afsk_demod.bin'.
The target signal is displayed as 'No CRC Error', and many other signals are
decoded. 'Audio Source' works as a microphone (stereo mixer) input and
'Audio Sink' works as a speaker output.

  


[Exercise 8-1] Compile and build gr-satellites

$ sudo -s
# git clone https://github.com/daniestevez/gr-satellites
# cd gr-satellites
# mkdir build
# cd build
# cmake ..
# make
# sudo make install
# sudo ldconfig
# exit

  


[Exercise 9-1] Compile gr-ax25, gr-kiss, gr-display, gr-ec

Both gr-ax25 and gr-kiss were easy to compile, but the compile of gr-display
and gr-ec took time by trial and error by JE9PEL.

   

(Complement)
  http://github.com/dl1ksv/gr-display/tree/v3.7
  http://github.com/dl1ksv/gr-display/issues/5


[Exercise 10-1] Improve GMSK9600 flow graph #1

The flow graph of this exercise refers to the previous article written by
JH4XSY station. I, JE9PEL will improve it Because 'samp_rate' in Variable
block did not run at 96k, it run after boldly setting it to 1000000 (1M).

After putting 'WX GUI FFT Sink' block after 'Low Pass Filter' in the 
flow graph, 'FFT Plot' screen popped up as shown in the right figure.
Looking at the Home folder later, it specified two files, gmsk_test.dat
and gmsk_log.txt, but it was a storm of garbled characters when I opened
it with the hexdump command or editor.

> error: printing layer 2 repeater subfields is not yet implemented

Such a message was also visible. As it is still silent, there are likely
to be many points to improve this flow graph.

   


[Exercise 10-2] Improve GMSK9600 flow graph #2

Changed Generate Options from WX GUI to QT GUI.  Relatedly, WX GUI FFT Sink
has been changed to QT GUI Sink. Connected Audio Sink and enabled it to output
audio. Heard the original GMSK9600 tone on GNURadio. Displayed the variation
of the fixed center frequency. I will setup a little more detailed from now on.
http://dl.dropbox.com/s/afv8cufrqo4bivz/study_10_0.grc

   


[Exercise 11-1] Improve AFSK1200 flow graph #1

I, JE9PEL will further improve the following flow graph.
http://github.com/handiko/gr-APRS

First, execute AFSK_Demod.grc and APRS_Rx.grc.
Then it adds APRS module in GNURadio module.

  

Drag and drop Python Block in Misc into the workspace, and click
'Open in Editor' after right click - Properties on Python Block,
and copy and save all gr-APRS/gr-APRS-master/Module/epb.py code.

  

Confirm again the flow graph of AFSK_Demod.grc and APRS_Rx.grc.

  

Next, execute APRS_WAV.grc including AFSK_Demod and APRS_Rx.
Specify the path of the sample wav file in 'Wav File Source'
correctly, and experiment if it can be decoded it.
http://dl.dropbox.com/s/bfprip2bh7n9lwx/APRS_WAV_mod.grc

  
   

Enter 'telnet localhost 52001' in Terminal, the sample wav file was
completely decoded as shown in the following figure.

  


[Exercise 11-2] Improve AFSK1200 flow graph #2

APRS_AFSK1200 signal could be completely received and decoded. The procedure
is shown below. First, replace it with my own RTL-SDR Source block. Because
Rotator block that follows is a frequency shift block for offset tuning, it
may not be necessary, but it was temporarily set to Phase Increment=0.

Instead of doing so, SDR frequency shift is adjusted by setting RTL-SDR
Source_Freq.Corr.(Ppm)=dev_ppm, ie, Variable dev_ppm=65. Then, the frequency
was set as Variable freq=144.660e6. In addition, I installed Audio Sink
after FFT Filter so I could hear the audio.
http://dl.dropbox.com/s/urinewfgk8fp5g6/APRS_RX_RTL_mod.grc

  

The next figure shows the real-time display of the spectrum by QT GUI.

  

Message Debug Print and Terminal displayed on the lower left message window
of GNURadio are displayed at the same time as the decoded result, but both are
difficult to read by the extra space.

  

Enter 'telnet localhost 52001' on Terminal, and at the same time the
contents are displayed in real time and easy to read as usual. This is
due to the setting of TCP Server Port=52001 in the Socket PDU block.
This is recommended for decoding.

  


(Reference)

  grc_study.zip
  SDR_GNURadio.pdf
  SDR_GNURadio.pptx
  JAMSAT report, W5NYV Michelle Thompson
  JAMSAT Newsletter #293, 18 Apr. 2019 (JAMSAT)
  RF World #44 "The World of SDR spreading through GRC" (CQ Publishing Co., Ltd.)


Back to Top
Back to Home Page