From 478d2cba70e2f07c46ee4d200b32e5a434ed7de4 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 2 Aug 2020 15:49:05 -0400 Subject: fakecc updates --- op25/gr-op25_repeater/apps/tx/README-fakecc.txt | 31 +++++++++++++++++++++++++ op25/gr-op25_repeater/apps/tx/generate-tsbks.py | 6 ++++- op25/gr-op25_repeater/apps/tx/p25craft.py | 12 +++++----- 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 op25/gr-op25_repeater/apps/tx/README-fakecc.txt diff --git a/op25/gr-op25_repeater/apps/tx/README-fakecc.txt b/op25/gr-op25_repeater/apps/tx/README-fakecc.txt new file mode 100644 index 0000000..4d629ce --- /dev/null +++ b/op25/gr-op25_repeater/apps/tx/README-fakecc.txt @@ -0,0 +1,31 @@ + +Generating and transmitting a fake trunking control channel +=========================================================== + +1. After editing, run generate-tsbks.py which should generate +a file named "p25.out". + +2. The tool generates the file packed form; it must be unpacked + ./unpack.py -i p25.out -o sym-cc925.dat + +3. The unpacked file must be referenced in the json cfg file: + . + . + . + "source": "symbols:sym-cc925.dat", + . + . + . + +NOTE: in generate_tsbks.py, keys starting with "iden_up" +are used to define a channel band plan with bandwidth(bw), +channel spacing, and starting frequency in Hz; TX offset is in +MHz. + +NOTE: with rx.py and multi_tx.py in tandem using the udp option, +the center frequency must be set in the rx.py trunking TSV +file equal to the device frequency in the multi_tx config. + +As always, the control channel and voice channel frequencies +must fall inside the band defined by the center freqency and +sampling rate. diff --git a/op25/gr-op25_repeater/apps/tx/generate-tsbks.py b/op25/gr-op25_repeater/apps/tx/generate-tsbks.py index f3c80ed..f4b06d9 100755 --- a/op25/gr-op25_repeater/apps/tx/generate-tsbks.py +++ b/op25/gr-op25_repeater/apps/tx/generate-tsbks.py @@ -12,5 +12,9 @@ if __name__ == '__main__': 'vc_freq': 924900000, 'nac': 0x293, 'subsystem_id': 1, - 'site_id': 1} + 'site_id': 1, + 'iden_up_bw' : 12500, + 'iden_up_tx_offset' : 25, # MHz + 'iden_up_spacing' : 12500, + 'iden_up_frequency' : 902012500} make_fakecc_tsdu(params) diff --git a/op25/gr-op25_repeater/apps/tx/p25craft.py b/op25/gr-op25_repeater/apps/tx/p25craft.py index dd0f0c9..7fae739 100755 --- a/op25/gr-op25_repeater/apps/tx/p25craft.py +++ b/op25/gr-op25_repeater/apps/tx/p25craft.py @@ -1694,17 +1694,17 @@ def make_fakecc_tsdu(params): opcodes = [] args = [] op, arg = format_iden_up(0, - int(12.5 / 0.125), - (25 * 4), - int(12.5 / 0.125), - 902012500/5) + params['iden_up_bw'] // 125, + params['iden_up_tx_offset'] * 4, + params['iden_up_spacing'] // 125, + params['iden_up_frequency'] // 5) opcodes.append(op) args.append(arg) op, arg = format_network_status_broadcast( 0, params['wacn'], params['system_id'], - (params['cc_freq'] - 902012500) / 12500, + (params['cc_freq'] - params['iden_up_frequency']) // params['iden_up_spacing'], 0x70) opcodes.append(op) args.append(arg) @@ -1713,7 +1713,7 @@ def make_fakecc_tsdu(params): params['system_id'], params['subsystem_id'], params['site_id'], - (params['cc_freq'] - 902012500) / 12500, + (params['cc_freq'] - params['iden_up_frequency']) // params['iden_up_spacing'], 0x70) opcodes.append(op) args.append(arg) -- cgit v1.2.3