From 5c5bd11a0cb785a71d04bbb0f54728fcec9cd1f1 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 25 Dec 2020 15:27:48 -0500 Subject: [PATCH] udp rx/tx linkage docs/examples --- op25/gr-op25_repeater/apps/900.tsv | 2 + op25/gr-op25_repeater/apps/README-example-udp | 38 +++++++++++++++++++ op25/gr-op25_repeater/apps/cfg-900.json | 10 ++--- op25/gr-op25_repeater/apps/runudp.sh | 7 ++++ op25/gr-op25_repeater/apps/tx/multi_tx.py | 2 +- 5 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 op25/gr-op25_repeater/apps/900.tsv create mode 100644 op25/gr-op25_repeater/apps/README-example-udp create mode 100644 op25/gr-op25_repeater/apps/runudp.sh diff --git a/op25/gr-op25_repeater/apps/900.tsv b/op25/gr-op25_repeater/apps/900.tsv new file mode 100644 index 0000000..c71c8c1 --- /dev/null +++ b/op25/gr-op25_repeater/apps/900.tsv @@ -0,0 +1,2 @@ +"Sysname" "Control Channel List" "Offset" "NAC" "Modulation" "TGID Tags File" "Whitelist" "Blacklist" "Center Frequency" +"Fake" "925.0" "0" "0x293" "FSK4" "" "" "" "924.95" diff --git a/op25/gr-op25_repeater/apps/README-example-udp b/op25/gr-op25_repeater/apps/README-example-udp new file mode 100644 index 0000000..ae3aeb4 --- /dev/null +++ b/op25/gr-op25_repeater/apps/README-example-udp @@ -0,0 +1,38 @@ + +Linking OP25 TX and RX December 2020 +=================================================================== + +The OP25 TX application can be configured to transmit one or more +channels directly to one of the RX apps (rx.py or multi_rx.py) in +each case by specifying a device args string of the form + udp:host:port +where host and port are the IP address and UDP port number, +respectively. Typically, the TX is started first followed by +the RX, but they can be started in any order. UDP port 25252 is +used in the examples. + +The sample RX script is in runudp.sh, and the sample TX json config +is in cfg-900.json . + +To start the TX + cd .../op25/op25-gr_repeater/apps/tx + ./multi_tx.py -c ../cfg-900.json + +The RX is started with + cd .../op25/op25-gr_repeater/apps + ./runudp.sh + +There is a 120KHz sized block of spectrum transmitted (SR=120000) +which is treated as complex baseband with each side pretending that +the spectrum is converted to/from the 900 MHz band. On the RX side +any frequency-change requests are ignored; instead, a "center +frequency" is defined. There are two channels (P25 trunk control +channel and P25 voice channel) spaced at 50 KHz separation. + +The TX reads two data files that must be created beforehand. To +create the trunk control channel data symbol file, refer to + tx/README-fakecc.txt +An audio file (PCM/ rate 8000 / mono / signed int16) must also be +created - this file will be real-time encoded with the voice codec +and sent on the P25 voice channel. These two files must be defined +in the cfg-900.json file (channel "source" keyword). diff --git a/op25/gr-op25_repeater/apps/cfg-900.json b/op25/gr-op25_repeater/apps/cfg-900.json index 7c82e15..b1bb041 100644 --- a/op25/gr-op25_repeater/apps/cfg-900.json +++ b/op25/gr-op25_repeater/apps/cfg-900.json @@ -5,9 +5,9 @@ "destination": "udp://127.0.0.1:56120", "excess_bw": 0.2, "filter_type": "rc", - "frequency": 925000000, + "frequency": 924975000, "if_rate": 24000, - "name": "p25 cc", + "name": "p25 control channel", "plot": "datascope", "source": "symbols:sym-cc925.dat", "symbol_rate": 4800 @@ -17,9 +17,9 @@ "destination": "udp://127.0.0.1:56124", "excess_bw": 0.2, "filter_type": "rc", - "frequency": 924900000, + "frequency": 924925000, "if_rate": 24000, - "name": "p25 vc", + "name": "p25 voice channel", "plot": "datascope", "source": "/home/mhp/rand4.raw", "symbol_rate": 4800 @@ -33,7 +33,7 @@ "name": "udp", "offset": 0, "ppm": 0, - "rate": 480000, + "rate": 120000, "tunable": false } ] diff --git a/op25/gr-op25_repeater/apps/runudp.sh b/op25/gr-op25_repeater/apps/runudp.sh new file mode 100644 index 0000000..7ece287 --- /dev/null +++ b/op25/gr-op25_repeater/apps/runudp.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +t="-T 900.tsv" +sr="-S 120000" +v="-v 255" + +python3 rx.py --args "udp:127.0.0.1:25252" -f 924975000 $sr -q 0 -D fsk4 -P "datascope" -V -w -v 255 $t $v 2> stderr.2 diff --git a/op25/gr-op25_repeater/apps/tx/multi_tx.py b/op25/gr-op25_repeater/apps/tx/multi_tx.py index 0789db8..a54bc01 100755 --- a/op25/gr-op25_repeater/apps/tx/multi_tx.py +++ b/op25/gr-op25_repeater/apps/tx/multi_tx.py @@ -212,7 +212,7 @@ class tx_block(gr.top_block): continue cfg = chan.config dev = chan.device - modulator_rate = 48000 ## FIXME + modulator_rate = 24000 ## FIXME bt = _def_bt if 'bt' in cfg.keys(): bt = cfg['bt']