PLEASE READ

This directory contains the implementation of a -relatively simple -
dab/dab+ receiver.
The receiver supports terrestrial DAB reception with as input either
the stream from a dabstick or a (prerecorded) file,
and it will output through the default soundcard.
The Software uses the 8 bit I/Q signals from the stick, all decoding
is in sotware.


Building:
As usual, a pre-compiled version for windows exists, and for Linux
one has to collect libraries and do the building oneself.

Libraries that are needed are

qwt		(5.2)
qt		(4.7 or more)
usbx		(1.0.14 used)
portaudio	0.19
fftw3
rtlsdr
ffmpeg

The file "dab-constants.h" (reminiscent from earlier radio software
implementations) contains two optional defines with which decoder software
for DAB frames (i.e. Mpeg1/layer II) and DAB+ frames (i.e. He-AAC) can
be selected.
If "KJMP" is defined in this "dab-constants.h" file, then the software decoder
selected for DAB is the KJMP package. If KJMP is not defined, the ffmpeg
decoding software is used.

If "FFMPEG" is defined in this "dab-constants.h" file, the the software decoder
selected for DAB+ is the ffmpeg package. If FFMPEG is not defined, the faad
decoding software is used.

The dabreceiver.pro file assumes the availability of all libraries. Obviously
the file may be adapted to the specific choices made.

For use with faad one needs
faad

for use with ffmpeg

avcodec
avutil
avformat
swresample
swscale

When using fedora, just install the required packages!!!

Running:

Normal way of running is through
  ./dabreceiver 

(Note that running under Windows requires a Zadiq-set usb driver.)

First select a device with the selector  that says  "no device".
Possibilities are
- nodevice
- file input
- dabstick
When clicking on file input, a small menu will appear with file selection 
possibilities.

When selecting the dabstick,
Select the frequency i.e. one of the channels (5A .. 13F).
Select Start

The DAB sticks I have show a frequency deviation of app 10K. An attempt
is made to locate the frequency on which the emsemble information is deduced.

The mismatch between the selected frequency and the requested frequency
is displayed in two LCD number displays. The top one indicates
the offset of the Khz tuning, the bottom one the offset in the range
of 1 KHz.

When an ensemble is received, the names of the (audio) services are
displayed and the name of the ensemble will be displayed as well.
Selecting a service by clicking on its name will cause the system
to try to generate dab frames from the selected one.

An ini file $(HOME)/.jsdr-dab.ini contains some settings. 

[General]
channel=12C
latencyLevel=10
device=dabstick
Concurrent=1
displaySize=512
decay=5


The channel/device indicate the start position.
Channel is (obviously) only useful when "dabstick" is selected as
device. When "file input" is/was selected, a screen will appear
with which a file can be selected. The file format is "raw", i.e.
bytes just as delivered by the dabstick.

The latencylevel defines latency settings in the output,
a pretty high latency is required
for smoothing the output.

Concurrent indicates whether the decoding of the dabframes is done
in a separate thread or in the main execution thread (i.e. 1 is concurrency
on and 0 is concurrency off).

displaySize gives the number of bins in the fft to be displayed. More gives
higher resolution, but increased resource consumption. Note that we need a
power of 2 here.

decay indicates the level of averaging done for the spectrum display: higher
number makes the spectrum change slower.

There are defaults for these values and on normal program termination
the values applied are written onto the file.


good luck

jan


