RepeaterPage » History » Version 2
max, 04/22/2017 04:04 PM
1 | 1 | max | |
---|---|---|---|
2 | = Multi-channel reception using the USRP = |
||
3 | |||
4 | Assume we want to simultaneously receive the four signals shown below; |
||
5 | one conventional (analog) FM voice channel plus three P25 |
||
6 | signals. The two P25 voice channels are to be IMBE-decoded whereas the |
||
7 | P25 data channel is to be sent to Wireshark after decoding. |
||
8 | |||
9 | Fig. 1 - Spectrum of repeater input band (sample; diagram not to scale) |
||
10 | |||
11 | For now, it's necessary to edit the source code file manually to specify |
||
12 | the list of channels/modes to be received (file usrp_rx.py): |
||
13 | |||
14 | {{{ |
||
15 | channels = [ |
||
16 | {'freq':435.200e6, 'mode':'c4fm', 'port':32001}, |
||
17 | {'freq':435.350e6, 'mode':'fm', 'port':32002, 'ctcss':97.4}, |
||
18 | {'freq':435.600e6, 'mode':'cqpsk', 'port':23456, 'wireshark':1}, |
||
19 | {'freq':435.775e6, 'mode':'cqpsk', 'port':32003} |
||
20 | ] |
||
21 | }}} |
||
22 | |||
23 | Individual channels are defined one per line; note that all definition lines |
||
24 | except the last must end with a comma. |
||
25 | |||
26 | We choose a frequency somewhere close to the center of this band. |
||
27 | which will set the USRP's nominal receive frequency; this must also |
||
28 | be manually set in the source file: |
||
29 | |||
30 | {{{ |
||
31 | center_freq = 435.500e6 |
||
32 | }}} |
||
33 | |||
34 | Before running the receiver app, we |
||
35 | * measure the current calibration error value (I use kalibrate) |
||
36 | * determine the optimum USRP receiver gain value |
||
37 | The values used in this example are +1234 and 35, respectively. |
||
38 | |||
39 | We're now ready to start the receiver: |
||
40 | |||
41 | {{{ |
||
42 | usrp_rx.py -RA -c 1234 -H 127.0.0.1 -g 35 -d 25 |
||
43 | }}} |
||
44 | |||
45 | The receiver continuously monitors all four channels. For each of the three |
||
46 | voice channels, the audio and the PTT info ("key up" and "key down" events) |
||
47 | are forwarded to asterisk app_rpt over separate UDP channels. |
||
48 | For both voice modes (IMBE and analog FM) the audio is transmitted |
||
49 | as frames over the UDP channel in Asterisk's native audio format: |
||
50 | * 50 frames per second |
||
51 | * 160 audio samples per frame |
||
52 | * 8000 samples / second |
||
53 | * signed |
||
54 | * 16-bit |
||
55 | * linear |
||
56 | |||
57 | = P25 and/or analog NBFM Reception using a discriminator-tapped receiver = |
||
58 | |||
59 | One or more disc-tapped conventional receivers may be used at the same time, and can |
||
60 | coexist with one or more USRP's. |
||
61 | |||
62 | Single-channel reception is possible using disctap_rx.py. |
||
63 | This app dynmically auto-detects the modulation type (P25 or analog NBFM). |
||
64 | |||
65 | Audio and PTT events are forwarded to asterisk app_rpt over two separate UDP |
||
66 | channels, depending on modulation type (in the example below, received P25 |
||
67 | audio is sent to asterisk on UDP port 32004; for NBFM, port 32005 is used). |
||
68 | |||
69 | {{{ |
||
70 | disctap_rx.py -i -A 0.05 -c 97.4 -H 127.0.0.1 -p 32004 -g 35 -d 25 |
||
71 | }}} |
||
72 | |||
73 | The -g (gain) parameter is used to set the proper audio gain level. See |
||
74 | the hardware page for further guidance - this value is important for achieving |
||
75 | correct operation. |