Project

General

Profile

SignalScopePage » History » Version 14

max, 04/22/2017 04:04 PM

1 1 max
= Signal Scope =
2
3
== Installation ==
4
5 6 max
Before running the scope app, check that the following standard pre-requisite packages are also installed:
6 1 max
 * GNU Radio
7
 * The op25 blocks
8
 * The op25 repeater block
9
10 14 max
The osmosdr http://sdr.osmocom.org/trac/wiki/GrOsmoSDR package is required when using USRP or HackRF (or other hardware supported by osmosdr)
11
12
Additionally, hamlib http://sourceforge.net/apps/mediawiki/hamlib/index.php?title=Main_Page is (optionally) needed if using a frequency-agile receiver that is to be tuned using hamlib (see below)
13
14
The Python Numeric package is also needed when using autocorrelation.  If you're running Debian or Ubuntu:
15 6 max
{{{
16
apt-get install python-numeric
17 1 max
}}}
18 6 max
19 1 max
Other than these pre-reqs, no special setup or installation is needed.
20 11 max
21 1 max
== Targets ==
22 14 max
 * Choice of osmosdr(uhd / hackrf, etc), discriminator-tap, or "audio-IF" hardware modes
23 1 max
 * Supports either GL or non-GL display mode
24
 * Both FSK4 and CQPSK demodulation modes supported
25 14 max
 * Lower and middle range PC hardware, not just the latest (optional features require more CPU)
26 11 max
27
== Running the Program ==
28
29 14 max
There are four overall options or modes depending on your hardware; these are
30
 * Osmosdr
31
 * Hamlib
32 1 max
 * External receiver with discriminator tap connected to sound card
33 11 max
 * External receiver with IF in the audio sound card range (e.g., 24 KHz), referred to as "audio IF"
34 3 max
35 1 max
=== Running with the disc-tap option ===
36
37 9 max
The signal scope does not require the USRP.  If you have a discriminator-tapped receiver, use the "-a" option:
38 3 max
{{{
39 1 max
./scope.py -a -v 10 -g 50
40
}}}
41
42 14 max
=== UHD example ===
43 1 max
44
{{{
45 14 max
./scope.py --args 'uhd,nchan=1,subdev=B:0' -g 65 -f 412.34e6  -o 50e3 -V -v 0   -T 412.34e6 -N 'ADC-pga:10,PGA0:29' -c 7500
46 1 max
}}}
47
48 14 max
=== HackRF example ===
49
{{{
50
./scope.py --args 'hackrf'  -g 65 -f 412.34e6 -N  'RF:14,IF:32,BB:26' -o 50e3 -c 2500 -T 412.34e6  -V -v 0
51
}}}
52
53
=== Hamlib example ===
54
Two receivers in cascade (USRP with LFRX connected to the 455 KHz IF output terminal of hamlib-controlled receiver)
55
{{{
56
./scope.py --args 'uhd,nchan=1,subdev=A:A' -g 65 -f 455e3 -o 50e3 -V -v 0 -H 1234  -T 412.34e6
57
}}}
58
59 11 max
=== Running in the Audio IF mode ===
60 1 max
61 5 max
Receivers equipped with an IF output in the sound card range can be used.  This is known as "audio IF" mode.
62
A soundcard sampling rate of 96K is used and the IF frequency (typically 24 KHz) is given using the {{{--calibration}}} parameter:
63
64
{{{
65 9 max
./scope.py -A -c 24e3 -g 50 -v 10
66 5 max
}}}
67
68 4 max
== Feature overview ==
69
70
 * Spectrum plot
71
 * Baseband oscilloscope
72 1 max
 * Eye Pattern Diagram (Datascope) display supporting several standard symbol rates
73 4 max
 * Constellation Diagrams
74
 * Demodulated Symbol Output
75 6 max
 * Correlation (including Fast Auto-Correlation)
76 1 max
 * Direct-frequency entry, signal gain and fine-tuning controls
77
 * User-selectable demodulator (FSK4 or QPSK)
78 5 max
79 12 max
In the baseband AF (disc. tap) mode, several program functions are disabled (spectrum FFT, constellation diagram, PSK demod, FAC and iDEN correlation)
80
because these functions require direct access to the signal with no demodulation.
81 5 max
82
In all modes, the {{{--wireshark}}} option is used to write received P25 packet data to Wireshark.
83 1 max
84
== Program Options ==
85 10 max
86
Here is a full list of program options:
87
{{{
88
Usage: scope.py [options]
89
90
Options:
91
  -h, --help            show this help message and exit
92 14 max
  --args=ARGS           device args
93
  --antenna=ANTENNA     select antenna
94 10 max
  -a, --audio           use direct audio input
95
  -A, --audio-if        soundcard IF mode (use --calibration to set IF freq)
96
  -I AUDIO_INPUT, --audio-input=AUDIO_INPUT
97 1 max
                        pcm input device name.  E.g., hw:0,0 or /dev/dsp
98
  -i INPUT, --input=INPUT
99
                        input file name
100
  -b Hz, --excess-bw=Hz
101
                        for RRC filter
102
  -c Hz, --calibration=Hz
103
                        USRP offset or audio IF frequency
104
  -C Hz, --costas-alpha=Hz
105
                        value of alpha for Costas loop
106
  -f Hz, --frequency=Hz
107 10 max
                        USRP center frequency
108 14 max
  -F IFILE, --ifile=IFILE
109
                        read input from complex capture file
110
  -H HAMLIB_MODEL, --hamlib-model=HAMLIB_MODEL
111
                        specify model for hamlib
112
  -s SEEK, --seek=SEEK  ifile seek in K
113
  -S SAMPLE_RATE, --sample-rate=SAMPLE_RATE
114
                        source samp rate
115
  -t, --tone-detect     use experimental tone detect algorithm
116
  -T Hz, --trunk-cc-freq=Hz
117
                        trunk control channel frequency
118 10 max
  -v VERBOSITY, --verbosity=VERBOSITY
119
                        message debug level
120 14 max
  -V, --vocoder         voice codec
121
  -o Hz, --offset=Hz    tuning offset frequency [to circumvent DC offset]
122 10 max
  -p, --pause           block on startup
123 1 max
  -w, --wireshark       output data to Wireshark
124
  -W WIRESHARK_HOST, --wireshark-host=WIRESHARK_HOST
125
                        Wireshark host
126 14 max
  -r RAW_SYMBOLS, --raw-symbols=RAW_SYMBOLS
127
                        dump decoded symbols to file
128 10 max
  -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC
129
                        select USRP Rx side A or B (default=A)
130
  -g GAIN, --gain=GAIN  set USRP gain in dB (default is midpoint) or set audio
131
                        gain
132
  -G GAIN_MU, --gain-mu=GAIN_MU
133
                        gardner gain
134 14 max
  -N GAINS, --gains=GAINS
135
                        gain settings
136
  -O AUDIO_OUTPUT, --audio-output=AUDIO_OUTPUT
137
                        audio output device name
138 10 max
}}}
139
140 4 max
== Spectrum Display ==
141
142
[[Image(a.png)]]
143
144
The controls arranged along the bottom of the page are:
145
 * Frequency: to retune, type the new frequency here and press ENTER
146
 * Signal Gain: adjusts the baseband (demodulated) signal level
147
 * Fine Tune: adjusts tuning frequency over +/- 3000 Hz range
148
 * Demod: Selects demodulator (currently used in Demodulated Symbols only)
149
Except for the signal gain control, these controls are only available in USRP RX mode.
150
151
== Eye Pattern Diagrams ==
152
153
The scope input source can be connected either before or after the symbol filter using the Viewpoint toggle.
154
155
Also the proper speed must be selected from the available options.
156
157
[[Image(b.png)]]
158
159
== Constellation Diagram ==
160
161 7 max
[[Image(f.png)]]
162
163
The signal scope also features an angular population graph (shown above) in addition to the traditional constellation display.
164
In this mode the symbol magnitude (distance from center) is discarded.  Instead the circle is sliced into segments and a count
165
of symbols found in each segment is plotted.  This is similar to a histogram except that a straight line is drawn between each
166
result, and that the results are arranged in polar form instead of rectangular form.
167
168 8 max
With this display, the zone at the exact center of the plot can be used precisely to measure the degree of separation or margin
169 13 max
between the demodulated symbols.  The plots below illustrate the difference, with poor separation showing on the left image as 
170
revealed by the failure to converge at the center and by the clear territorial violations:
171 1 max
172 8 max
[[Image(mhp7a.png)]][[Image(c.png)]]
173
174
The two-color mode is used in these images, providing natural relief to highlight the distinctive feature of π/4 DQPSK in which 
175
successive symbols are chosen from two distinct constellations (each containing four possible symbol values) separated by 45°
176
177 4 max
== Demodulated Symbols ==
178
179
[[Image(d.png)]]
180
181 1 max
== Correlation ==
182
183
[[Image(e.png)]]
184
185 9 max
Cross correlation allows rapid identification of signals with known characteristics.  Frame Sync (FS) signatures of several commonly
186
used radio systems are included.
187
188
By convention correlation results are usually displayed using positive correlation peaks only.  In this system
189
however it is possible (and legal) for negative correlation products to be produced.  This can occur for two wholly separate reasons:
190
 * If the hardware polarity is inverted 
191
 * When the FS symbols are purposely inverted as an integral part of protocol processing (commonly used in certain protocols but not used in P25)
192
193
The first case commonly happens when using the disc-tap method of hardware connection, because the actual polarity of the signal seems to vary 
194
randomly among different sound cards and receivers.  In one actual case, two PC's of the same PC brand bought from the same store had opposite polarity.
195
196
The P25 software framer automatically detects the proper polarity and issues a message if negative polarity data is received:
197
{{{
198
Reversed FS polarity detected - autocorrecting
199
}}}
200
201
The automatic correction applies only to software framing and doesn't help with correlation.  For correct results for both software framing and
202
correlation, you should correct the polarity reversal problem at its source; this is done using negative values for the {{{--gain}}} parameter at 
203
program start time:
204
205
{{{
206
./scope.py -a -v 10 -g -50
207
}}}
208
209
The second cause of negative correlation peaks is that some protocols (although not P25) make use of both normal- and inverted-polarity FS 
210
sequences as a standard part of their processing.   Instead of clogging the GUI menu with several choices that are merely inverses of others,
211 1 max
just for the sake of always having positive-peaked correlations, we allow the correlation graph to reflect the natural polarity of the data.
212 9 max
Thus both + and - peaks are shown, allowing quick diagnosis of incorrect hardware polarity (see above), and allowing identification of the
213 12 max
particular family and sub-protocol in use.
214 9 max
215
== Auto Correlation ==
216
217 1 max
Also included is Frank's Fast Auto Correlation (fac):
218
219 8 max
[[Image(g.png)]]
220 9 max
221
For further details about Fast Auto Correlation refer to Frank's page at http://sites.google.com/site/radiorausch/
222 8 max
223
== BUGS ==
224
225
Possibly bugs exist, here are a few of the known ones as of this writing
226 1 max
 * Symbol filters totally brain damaged (need separate filters for each speed)
227
 * When switching modes using the notebook tabs, leftover data from before may appear momentarily
228
 * Highest and lowest speeds are not well tuned resulting either in sluggish updates or CPU exhaustion
229 11 max
230
== CREDITS ==
231
232
I ripped off the "tabbed notebook" theme (and code) from Stevie; it already had the spectrum, baseband, and decoded symbol displays. I added the data scope, constellation scope, and cross correlation features.
233
234
The Fast Auto Correlation (fac) code came from Radiorausch.
235
236
Special thanks to Mossmann for leaving one commented-out "print" statement in c4fm-decode.py. Of course it was tempting to wonder "what would happen" if that statement were un-commented. The final result? The cross-correlation feature.
237
238
Special thanks also to GPL(v3), for encouraging these mashups.
Add picture from clipboard (Maximum size: 48.8 MB)