Provides Python interfaces to manage DExtra and DPlus connections (protocols used by reflectors), convert from network data to D-STAR streams (header and frames) and vice versa, as well as encode and decode voice data using mbelib (decode only) and codec2, and transcode using an AMBEd server (the version included in my xlxd fork).
Installs the following executables:
dv-recorder, which connects to a reflector and records traffic in .dvtool files
dv-player, which plays back a .dvtool file to a reflector
dv-encoder, which converts a .wav fle to a .dvtool file using the Codec 2 vocoder
dv-decoder, which converts a .dvtool file using any vocoder to .wav
dv-transcoder, which connects to an AMBEd server and converts a .dvtool file using the AMBE vocoder to a .dvtool file using the Codec 2 vocoder and vice versa
D-STAR vocoder extension
I propose the use of the "Flag 3" byte of the header, to mark the vocoder type in the voice frames, as follows (in accordance to section 2.1.1, page 4 of the D-STAR specification):
||Codec 2 mode||
||Undefined||Use for future expansion|
FEC is currently not implemented. The space available in the frame for voice data is 72 bits, so that leaves us with 8 bits in the case of 3200 mode and 24 in the case of 2400 mode. The latter is enough for 22 bits of FEC, as FreeDV does in 2400 and 1850 modes.
The vocoder extension is compatible with all current D-STAR hardware (repeaters, hotspots, etc.) and software (repeater controllers, reflectors, etc.), except - of course - transceivers that assume voice data to be in AMBE format and use the corresponding chip for processing.
D-STAR reflectors, like xlxd, can be used to transcode and bridge the two formats. Although implementations of the vocoder extension can use the same reflector connections as AMBE-only clients, it should be avoided, to save the user confusion and establish interoperability.
The solution implemented in the
vocoder-extension branch of my xlxd fork uses another DExtra listener on a different port (30201 instead of 30001). The new port is to be used by reflectors using the "ORF" prefix (Open ReFlector). Any client connected to an ORF reflector will receive streams encoded with Codec 2. All other D-STAR protocol handlers will still send out data encoded with AMBE. Note that the protocol/port only affects data transmitted by the reflector. The stream vocoder is recognized by all protocol handlers, so a client can still transmit data using any vocoder on any port. The rationale behind this is that DExtra links may be used by repeaters or other reflectors, so it is not really possible to know what their clients support. So, nothing will change when linking a repeater to an XRF reflector, but will do when linking to an ORF one.
The open source vocoder, allows homebrewing transceivers using a Rasbperry Pi, an MMDVM modem (even one constructed with through-hole components), and an old radio. Thus, one could use a D-STAR hotspot as a transceiver, assuming a method to attach a microphone and speaker.
All included utilities implement the vocoder extension. Use the
-p dextraopen flag, or substitude the reflector's callsign prefix with "ORF", to make
dv-recorder use the "open" DExtra port.
On Mac OS X, I used MacPorts to install
libsamplerate. mbelib compiles and installs to
/usr/local without problems. To build codec2, I had to
export LIBRARY_PATH=$LIBRARY_PATH:/opt/local/lib before running
make, and edit the following files to remove unsupported
gcc flags (from the
unittest/CMakeFiles/ofdm_stack.dir/flags.make, to remove
unittest/CMakeFiles/ofdm_stack.dir/link.txt, to remove
73 de SV9OAN