With the addition of a software AMBE halfrate encoder the OP25 Group now releases an updated TX with voice encoders for-
This release was tested using a PC soundcard connected to the direct modulator input (i.e., 9,600 data port) of an Icom IC-820H configured for high speed data operation [AMOD/PACT switch set to PACT]. Not all PCs tested successfully so perhaps the choice of sound card isn't irrelevant, or the interface circuit needs more work... The software TX drives the audio output at optimum (close to full) signal levels, so no output level adjust is needed.
git clone https://git.osmocom.org/op25 cd op25 git checkout max
sudo apt-get update sudo apt-get build-dep gnuradio sudo apt-get install gnuradio gnuradio-dev gr-osmosdr librtlsdr-dev libuhd-dev libhackrf-dev libitpp-dev libpcap-dev git
mkdir build cd build cmake ../ make sudo make install sudo ldconfig
op25/gr-op25_repeater/apps/tx
subdirectory (after checking out the "max" branch of the repository). Here's an example command line:
python dv_tx.py -r -f ~/uncompressed.wav -p dstar -c dstar-cfg.dat
Hackrf Example:
python dv_tx.py -p dmr --args hackrf -q -21 -Q 925187500 -c dmr-cfg.dat -f ~/file1.wav -F ~/file2.wav -rIn this example we've selected the dstar protocol with input from a wav file (must be standard rate 8000/S16_LE/mono). Below is a full list of options.
Multiprotocol Digital Voice TX (C) Copyright 2017 Max H. Parke KA1RBI Usage: dv_tx.py [options] Options: -h, --help show this help message and exit -a ARGS, --args=ARGS device args -b BT, --bt=BT specify bt value -c CONFIG_FILE, --config-file=CONFIG_FILE specify the config file name -f FILE1, --file1=FILE1 specify the input file slot 1 -F FILE2, --file2=FILE2 specify the input file slot 2 (DMR) -g GAIN, --gain=GAIN input gain -i IF_RATE, --if-rate=IF_RATE output rate to sdr -I AUDIO_INPUT, --audio-input=AUDIO_INPUT pcm input device name. E.g., hw:0,0 or /dev/dsp -N GAINS, --gains=GAINS gain settings -O AUDIO_OUTPUT, --audio-output=AUDIO_OUTPUT pcm output device name. E.g., hw:0,0 or /dev/dsp -o OUTPUT_FILE, --output-file=OUTPUT_FILE specify the output file -p PROTOCOL, --protocol=PROTOCOL specify protocol -q FREQUENCY_CORRECTION, --frequency-correction=FREQUENCY_CORRECTION ppm -Q FREQUENCY, --frequency=FREQUENCY Hz -r, --repeat input file repeat -R, --fullrate-mode ysf fullrate -s SAMPLE_RATE, --sample-rate=SAMPLE_RATE output sample rate -t TEST, --test=TEST test pattern symbol file -v VERBOSE, --verbose=VERBOSE additional output
python multi_tx.py --args hackrf --gains rf:0,if:0 -q -19.5 -Q 442187500 -f ~/rand3.wav -R
The "-Q" (frequency) option gives the frequency of the first of the four channels; the remaining channel frequencies appear at regular intervals (default spacing is 100 KHz). The ysf channel format may be set to "wide", using "-R" (default=narrow). The "-q" option is needed for PPM correction (unless a time base such as GPSDO is used). The input file ("-f" option) requires WAV format, 8000 samples/sec, S16_LE. Audio from the WAV file is transmitted on all frequencies. However if the "-A" option is given, program content for the second DMR time slot is instead taken live from the sound card audio input port ("-I" option).
-f filename
(or -F filename
in DMR mode) is selected the input is read from file(s); otherwise the GR audio source is selected. Likewise output is sent to the soundcard unless -o
is given. When using files the -r
option can be specified to replay the input file(s) in a continuous loop. Without this option the program exits at EOF. The -p protocol
option is used to select which of the four DV standards (dmr, dstar, p25 or ysf) is to be used. The dmr and ysf modes also utilize a configuration file, specified using the -c filename
parameter. See the specific section (below) for more details on the configuration file.
There currently appears to be an audio bug that causes the audio to sound "overdriven" or "clipped". The dstar and to a lesser extent the ysf-halfrate coder is most affected by this; dstar suffers from an audio level pumping or AVC malady.
UPDATE (Mar. 2017) A hack was added that greatly reduces this problem in ysf. At this point only dstar seems in need of further work.
Note: in general the program currently doesn't currently send "header" or "terminator" packets which typically appear once at the start/end of voice transmissions. Instead we rely on the ability inherent in all of these protocols to start receiving even for transmissions already in progress. For two of the four protocols (dstar and ysf in fullrate mode) this means we forfeit an opportunity to transmit the station callsign. This needs to be fixed in a future release...
dmr-cfg.dat
(supplied). It is also possible to disable one or both channels if desired.
-g gain
parameter can be used to adjust the input gain, although this doesn't fully cure all dstar quality issues.
-R
option. The halfrate mode also supports the interspersed callsign and repeater ID data, but this is currently untested. See the sample ysf config file ysf-cfg.dat
(supplied).