1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 04:41:55 -05:00

DSD demod: updates for Windows build

This commit is contained in:
Edouard Griffiths 2016-04-24 23:41:31 +02:00
parent bf164db653
commit 359a984462
8 changed files with 204 additions and 39 deletions

View File

@ -122,7 +122,7 @@ Note that this plugin does not require any of the hardware support libraries nor
This is the `demoddsd` plugin. At present it can be used to decode the following digital speech formats:
- DMR/MOTOTRBO
- D-Star
- D-Star
It is based on the [DSDcc](https://github.com/f4exb/dsdcc) C++ library which is a rewrite of the original [DSD](https://github.com/szechyjs/dsd) program. So you will need to have DSDcc installed in your system. Please follow instructions in [DSDcc readme](https://github.com/f4exb/dsdcc/blob/master/Readme.md) to build and install DSDcc. If you install it in a custom location say `/opt/install/dsdcc` you will need to add these defines to the cmake command: `-DLIBDSDCC_INCLUDE_DIR=/opt/install/dsdcc/include/dsdcc -DLIBDSDCC_LIBRARIES=/opt/install/dsdcc/lib/libdsdcc.so`
@ -130,7 +130,10 @@ Please note that it also needs [mbelib](https://github.com/szechyjs/mbelib) and
While DSDcc is intended to be patent-free, `mbelib` that it uses describes functions that may be covered by one or more U.S. patents owned by DVSI Inc. The source code itself should not be infringing as it merely describes possible methods of implementation. Compiling or using `mbelib` may infringe on patents rights in your jurisdiction and/or require licensing. It is unknown if DVSI will sell licenses for software that uses `mbelib`.
If you are not comfortable with this just do not install DSDcc and/or mbelib and the plugin will not be compiled and added to SDRangel. For packaged distributions just remove `libdemoddsd.so` or `libdemoddsd.dll` from the installed package.
If you are not comfortable with this just do not install DSDcc and/or mbelib and the plugin will not be compiled and added to SDRangel. For packaged distributions just remove from the installation directory:
- For Linux distributions: `plugins/channel/libdemoddsd.so`
- For Windows distributions: `dsdcc.dll`, `mbelib.dll`, `plugins\channel\demoddsd.dll`
<h1>Software build</h1>
@ -290,7 +293,7 @@ You then need to update the .pro files that depend on librtlsdr. They are:
<h4>BladeRF library (libbladerf)</h4>
You need to download the 1.5.1 version specifically that is found [here](https://github.com/Nuand/bladeRF/archive/libbladeRF_v1.5.1.zip). Unzip it somewhere say in `D:\softs` So it will be installed in `D:\softs\bladeRF-libbladeRF_v1.5.1`. If you installation directory is different you need to update the dependent .pro files:
You need to download the 1.5.1 version specifically that is found [here](https://github.com/Nuand/bladeRF/archive/libbladeRF_v1.5.1.zip). Unzip it somewhere say in `D:\softs` So it will be installed in `D:\softs\bladeRF-libbladeRF_v1.5.1`. If your installation directory is different you need to update the dependent .pro files:
- `libbladerf\libbladerf.pro`, update the following lines with the location of your bladeRF installation:
- `CONFIG(MINGW32):LIBBLADERFSRC = "D:\softs\bladeRF-libbladeRF_v1.5.1"`
@ -299,6 +302,33 @@ You need to download the 1.5.1 version specifically that is found [here](https:/
- `plugins\samplesource\bladerf\bladerf.pro`. Update the following line with the location of your BladeRF installation:
- `CONFIG(MINGW32):LIBBLADERFSRC = "D:\softs\bladeRF\host\libraries\libbladeRF\include"`
<h3>Dependencies for DSD (Digital Speech Decoding) plugin</h3>
<h4>mbelib</h4>
You need to clone the [mbelib git repository](https://github.com/szechyjs/mbelib.git). Let's say you have cloned it to `D:\softs\mbelib`. If your cloned repository is different you will need to update the dependent .pro files:
- `mbelib\mbelib.pro`
- `dsdcc\dscc.pro`
- `plugins\channel\demoddsd\demodsd.pro`
Changing the following lines:
CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib"
CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib"
<h4>DSDcc</h4>
You need to clone the [DSDcc git repository](https://github.com/f4exb/dsdcc.git). Let's say you have cloned it to `D:\softs\dsdcc`. If your cloned repository is different you will need to update the dependent .pro files:
- `dsdcc\dscc.pro`
- `plugins\channel\demoddsd\demodsd.pro`
Changing the following lines:
CONFIG(MINGW32):LIBDSDCCSRC = "D:\softs\dsdcc"
CONFIG(MINGW64):LIBDSDCCSRC = "D:\softs\dsdcc"
<h3>Build</h3>
Basically you open the project in QtCreator by selecting the `sdrangel.windows.pro` file in the source root directory and run the `build` command from the menu. This will eventually produce the `sdrangel.exe` executable and dependent library and plug-in DLLs in various parts of the build directory. See the Installation paragraph next for details on installing all files in a single place.

50
dsdcc/dsdcc.pro Normal file
View File

@ -0,0 +1,50 @@
#--------------------------------------------------------
#
# Pro file for Windows builds with Qt Creator
#
#--------------------------------------------------------
QT += core
TEMPLATE = lib
TARGET = dsdcc
CONFIG(MINGW32):LIBDSDCCSRC = "D:\softs\dsdcc"
CONFIG(MINGW64):LIBDSDCCSRC = "D:\softs\dsdcc"
CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib"
CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib"
INCLUDEPATH += $$LIBDSDCCSRC
INCLUDEPATH += $$LIBMBELIBSRC
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
SOURCES = $$LIBDSDCCSRC/descramble.cpp\
$$LIBDSDCCSRC/dmr_data.cpp\
$$LIBDSDCCSRC/dmr_voice.cpp\
$$LIBDSDCCSRC/dsd_decoder.cpp\
$$LIBDSDCCSRC/dsd_filters.cpp\
$$LIBDSDCCSRC/dsd_logger.cpp\
$$LIBDSDCCSRC/dsd_mbe.cpp\
$$LIBDSDCCSRC/dsd_opts.cpp\
$$LIBDSDCCSRC/dsd_state.cpp\
$$LIBDSDCCSRC/dsd_symbol.cpp\
$$LIBDSDCCSRC/dstar.cpp\
$$LIBDSDCCSRC/p25p1_heuristics.cpp
HEADERS = $$LIBDSDCCSRC/descramble.h\
$$LIBDSDCCSRC/dmr_data.h\
$$LIBDSDCCSRC/dmr_voice.h\
$$LIBDSDCCSRC/dsd_decoder.h\
$$LIBDSDCCSRC/dsd_filters.h\
$$LIBDSDCCSRC/dsd_logger.h\
$$LIBDSDCCSRC/dsd_mbe.h\
$$LIBDSDCCSRC/dsd_opts.h\
$$LIBDSDCCSRC/dsd_state.h\
$$LIBDSDCCSRC/dsd_symbol.h\
$$LIBDSDCCSRC/dstar.h\
$$LIBDSDCCSRC/p25p1_heuristics.h
LIBS += -L../mbelib/$${build_subdir} -lmbelib

29
mbelib/mbelib.pro Normal file
View File

@ -0,0 +1,29 @@
#--------------------------------------------------------
#
# Pro file for Windows builds with Qt Creator
#
#--------------------------------------------------------
QT += core
TEMPLATE = lib
TARGET = mbelib
CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib"
CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib"
INCLUDEPATH += $$LIBMBELIBSRC
SOURCES = $$LIBMBELIBSRC/ambe3600x2400.c\
$$LIBMBELIBSRC/ambe3600x2450.c\
$$LIBMBELIBSRC/ecc.c\
$$LIBMBELIBSRC/imbe7100x4400.c\
$$LIBMBELIBSRC/imbe7200x4400.c\
$$LIBMBELIBSRC/mbelib.c
HEADERS = $$LIBMBELIBSRC/ambe3600x2400_const.h\
$$LIBMBELIBSRC/ambe3600x2450_const.h\
$$LIBMBELIBSRC/ecc_const.h\
$$LIBMBELIBSRC/imbe7200x4400_const.h\
$$LIBMBELIBSRC/mbelib.h\
$$LIBMBELIBSRC/mbelib_const.h

View File

@ -0,0 +1,46 @@
#--------------------------------------------------------
#
# Pro file for Windows builds with Qt Creator
#
#--------------------------------------------------------
TEMPLATE = lib
CONFIG += plugin
QT += core gui widgets multimedia opengl
TARGET = demoddsd
CONFIG(MINGW32):LIBDSDCCSRC = "D:\softs\dsdcc"
CONFIG(MINGW64):LIBDSDCCSRC = "D:\softs\dsdcc"
CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib"
CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib"
CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0"
CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0"
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += $$LIBDSDCCSRC
INCLUDEPATH += $$LIBMBELIBSRC
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
SOURCES = dsddecoder.cpp\
dsddemod.cpp\
dsddemodgui.cpp\
dsddemodplugin.cpp
HEADERS = dsddecoder.h\
dsddemod.h\
dsddemodgui.h\
dsddemodplugin.h
FORMS = dsddemodgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../dsdcc/$${build_subdir} -ldsdcc
RESOURCES = ../../../sdrbase/resources/res.qrc

View File

@ -8,10 +8,13 @@ This plugin uses the [DSDcc](https://github.com/f4exb/dsdcc) library that has be
- D-Star: developed and promoted by Icom for Amateur Radio customers.
The modulation and format is automatically detected and switched.
DSDcc itself uses [mbelib](https://github.com/szechyjs/mbelib) to decode AMBE frames. While DSDcc is intended to be patent-free, `mbelib` that it uses describes functions that may be covered by one or more U.S. patents owned by DVSI Inc. The source code itself should not be infringing as it merely describes possible methods of implementation. Compiling or using `mbelib` may infringe on patents rights in your jurisdiction and/or require licensing. It is unknown if DVSI will sell licenses for software that uses `mbelib`.
If you are not comfortable with this just do not install DSDcc and/or mbelib and the plugin will not be compiled and added to SDRangel. For packaged distributions just remove `libdemoddsd.so` or `libdemoddsd.dll` from the installed package.
If you are not comfortable with this just do not install DSDcc and/or mbelib and the plugin will not be compiled and added to SDRangel. For packaged distributions just remove:
- For Linux distributions: `plugins/channel/libdemoddsd.so`
- For Windows distributions: `dsdcc.dll`, `mbelib.dll`, `plugins\channel\demoddsd.dll`
If you choose to compile and install this plugin you will need to have DSDcc installed in your system. Please follow instructions in [DSDcc readme](https://github.com/f4exb/dsdcc/blob/master/Readme.md) to build and install DSDcc. If you install it in a custom location say `/opt/install/dsdcc` you will need to add these defines to the cmake command: `-DLIBDSDCC_INCLUDE_DIR=/opt/install/dsdcc/include/dsdcc -DLIBDSDCC_LIBRARIES=/opt/install/dsdcc/lib/libdsdcc.so`
@ -29,28 +32,28 @@ Use the wheels to adjust the frequency shift in Hz from the center frequency of
This is the type of modulation detected by DSDcc. It can be the following:
- `C4FM`: 4FSK modulation as implemented for example by Yaesu. It is also the default display. Sometimes 4-GMSK can be detected as C4FM if the signal is relatively noisy. This should not affect decoding provided noise is not too strong.
- `GMSK`: Gaussian mean frequency shift keying. it is either 2 or 4-FSK (2-GMSK or 4-GMSK). DMR transmissions will typically be identified as GMSK as it is 4-GMSK. D-Star will also be detected as GMSK as it is 2-GMSK.
- `QPSK`: At present no decodable transmissions use QPSK.
- `C4FM`: 4-FSK modulation as implemented for example by Yaesu. It is also the default display. Sometimes 4-GFSK signals can be detected as C4FM if the signal is relatively noisy. This should not affect decoding provided noise is not too strong.
- `GFSK`: Gaussian mean frequency shift keying. it is either 2 or 4-FSK (2-GFSK or 4-GFSK). DMR transmissions will typically be identified as GFSK as it is 4-GFSK. D-Star will also be detected as GFSK as it is 2-GFSK.
- `QPSK`: At present no decodable transmissions use QPSK.
<h3>3: Type of frame detected</h3>
This can be one of the following:
- `+DMRd`: non-inverted DMR data frame
- `-DMRd`: inverted DMR data frame
- `-DMRd`: inverted DMR data frame
- `+DMRv`: non-inverted DMR voice frame
- `-DMRv`: inverted DMR voice frame
- `-DMRv`: inverted DMR voice frame
- `(+DMR)`: non-inverted isolated DMR voice frame
- `(-DMR)`: inverted isolated DMR voice frame
- `+D-STAR`: non-inverted D-Star frame
- `-D-STAR`: inverted D-Star frame
- `+D-STAR_HD`: non-inverted D-Star header frame encountered
- `-D-STAR_HD`: inverted D-Star header frame encountered
- `+D-STAR`: non-inverted D-Star frame
- `-D-STAR`: inverted D-Star frame
- `+D-STAR_HD`: non-inverted D-Star header frame encountered
- `-D-STAR_HD`: inverted D-Star header frame encountered
<h3>4: Decoder input level in %</h3>
Most satisfactory decodes for values 50~70%
Most satisfactory decodes for values 50~70%. When no signal is detected it defaults to 91%.
<h3>5: Channel power</h3>
@ -66,11 +69,11 @@ This is the gain applied to the output of the discriminator before the decoder
<h3>8: Audio volume</h3>
This is the audio volume for positive values. Zero triggers the auto volume (audio AGC).
This is the audio volume for positive values. A value of zero triggers the auto volume (audio AGC).
<h3>9: Maximum expected FM deviation</h3>
This is the deviation in kHz leading to maximum (100%) deviation. You should aim for 30 to 50% deviation on the scope display.
This is the deviation in kHz leading to maximum (100%) deviation. You should aim for 30 to 50% (+/-300 to +/-500m) deviation on the scope display.
<h3>10: Squelch level</h3>
@ -78,7 +81,7 @@ The level corresponds to the channel power above which the squelch gate opens.
<h3>11: Squelch time gate</h3>
Number of milliseconds following squelch gate opening after which the signal is actually fed to the decoder. 0 means immediate application.
Number of milliseconds following squelch gate opening after which the signal is actually fed to the decoder. 0 means no delay i.e. immediate feed.
<h3>12: Audio mute and squelch indicator</h3>
@ -86,13 +89,13 @@ Audio mute toggle button. This button lights in green when the squelch opens.
<h3>13: Format specific status display</h3>
When the display is active the background turns from the surrounding grey color to dark green.
When the display is active the background turns from the surrounding gray color to dark green. It shows informatory or status messages that are particular to each format.
<h4>13.1: D-Star status display</h4>
![DSD D-Star status](../../../doc/img/DSDdemod_plugin_dstar_status.png)
These are the standard D-Star embedded information that is read from the header frame.
These is the standard D-Star embedded information that is read from the header frame.
<h5>13.1.1: Repeater 1 callsign</h5>
<h5>13.1.2: Repeater 2 callsign</h5>
@ -122,15 +125,15 @@ These are the standard D-Star embedded information that is read from the header
<h3>14: Discriminator output scope display</h3>
The discriminator signal at 48 kS/s is routed to a scope display with the following connections:
The discriminator signal at 48 kS/s is routed to the scope display with the following connections:
- I signal: the discriminator samples
- Q signal: the discriminator samples delayed by the baud rate i.e. one symbol delay:
- 2400 baud: 20 samples
- 4800 baud: 10 samples
- 9600 baud: 5 samples
This allows the visualization of symbol transitioons which depends on the type of modulation.
This allows the visualization of symbol transitions which depend on the type of modulation.
![DSD scope](../../../doc/img/DSDdemod_plugin_scope.png)
@ -138,20 +141,20 @@ This allows the visualization of symbol transitioons which depends on the type o
- On the combo box you should choose IQ (lin) for the primary display and IQ (pol) for secondary display
- On the display buttons you should choose the side by side display
On the same line you can choose any trace length. If it is too short the constelaltion points will not appear clearly and if it is too long the polar figure will be too dense. Usually 100ms give good results.
On the same line you can choose any trace length. If it is too short the constellation points will not appear clearly and if it is too long the polar figure will be too dense. Usually 100ms give good results.
<h4>14.2: IQ linear display</h4>
The yellow trace (I) is the direct trace and the blue trace (Q) is the delayed trace. This can show how symbols differentiate between each other in a sort of eye diagram.
<h4>14.3: IQ polar display</h4>
This shows the constellation of transition points. You should adjust the frequency shift to center the figure and the maximum deviation and/or discriminator gain to contain the figure within the +/-0.4 square. +/- 0.1 to +/- 0.3 give the best results.
<h5>2-FSK or 2-GMSK</h5>
This shows the constellation of transition points. You should adjust the frequency shift to center the figure and the maximum deviation and/or discriminator gain to contain the figure within the +/-0.4 square. +/- 0.1 to +/- 0.3 usually give the best results.
This concerns the following fornats:
<h5>2-FSK or 2-GFSK</h5>
This concerns the following formats:
- D-Star
@ -161,32 +164,31 @@ There are 4 possible points corresponding to the 4 possible transitions. x repre
- (1, 1): upper right corner. The pointer can stay there or move to (1, -1)
- (1, -1): upper left corner. The pointer can move to (-1, -1) or (-1, 1)
- (-1, 1): lower right corner. The pointer can move to (1, -1) ot (1, 1)
- (-1, -1): lower left corner. The pointer can stay ther or move to (-1, 1)
- (-1, 1): lower right corner. The pointer can move to (1, -1) or (1, 1)
- (-1, -1): lower left corner. The pointer can stay there or move to (-1, 1)
As you can see the pointer can make all moves except between (-1, -1) and (1,1) hence all vertices between the 4 points can appear except the one between the lower left corner and the upper right corner.
<h5>4-FSK or 4-GMSK</h5>
<h5>4-FSK or 4-GFSK</h5>
This concerns the following fornats:
This concerns the following formats:
- DMR
![DSD DMR polar](../../../doc/img/DSDdemod_plugin_dmr_polar.png)
There are 16 possible points corresponding to the 16 possible transitons between the 4 dibits. The 4 dibits are equally spaced at relative positions of -3, -1, 1, 3 hence the 16 points are also equally spaced between each other on the IQ or (x,y) plane.
There are 16 possible points corresponding to the 16 possible transitions between the 4 dibits. The 4 dibits are equally spaced at relative positions of -3, -1, 1, 3 hence the 16 points are also equally spaced between each other on the IQ or (x,y) plane.
Because not all transitions are possible similarly to the 2-FSK case pointer moves from the lower left side of the diagonal to the upper rihgt side are not possible.
Because not all transitions are possible similarly to the 2-FSK case pointer moves from the lower left side of the diagonal to the upper right side are not possible.
<h4>14.4: I gain</h4>
You should set the slider to a unity span (+/- 0.5) with no offset.
You should set the slider to a unity (1) span (+/- 0.5) with no offset.
<h4>14.5: Q gain</h4>
You should set the slider to a unity span (+/- 0.5) with no offset.
You should set the slider to a unity (1) span (+/- 0.5) with no offset.
<h4>14.6: Trigger settings</h4>
You can leave the trigger free running or set it to I linear with a 0 threshold.

View File

@ -14,6 +14,8 @@ SUBDIRS += librtlsdr
SUBDIRS += libhackrf
SUBDIRS += libairspy
SUBDIRS += libbladerf
SUBDIRS += mbelib
SUBDIRS += dsdcc
SUBDIRS += plugins/samplesource/filesource
CONFIG(MINGW64)SUBDIRS += plugins/samplesource/sdrdaemon
SUBDIRS += plugins/samplesource/rtlsdr
@ -23,6 +25,7 @@ SUBDIRS += plugins/samplesource/bladerf
SUBDIRS += plugins/channel/chanalyzer
SUBDIRS += plugins/channel/demodam
SUBDIRS += plugins/channel/demodbfm
SUBDIRS += plugins/channel/demoddsd
SUBDIRS += plugins/channel/demodlora
SUBDIRS += plugins/channel/demodnfm
SUBDIRS += plugins/channel/demodssb

View File

@ -3,6 +3,8 @@ SET libusbdir="D:\libusb-1.0.19\MinGW32"
copy app\%1\sdrangel.exe %2
copy sdrbase\%1\sdrbase.dll %2
copy lz4\%1\lz4.dll %2
copy mbelib\%1\mbelib.dll %2
copy dsdcc\%1\dsdcc.dll %2
copy libhackrf\%1\libhackrf.dll %2
copy librtlsdr\%1\librtlsdr.dll %2
copy libairspy\%1\libairspy.dll %2
@ -14,6 +16,7 @@ mkdir %2\plugins\samplesource
copy plugins\channel\chanalyzer\%1\chanalyzer.dll %2\plugins\channel
copy plugins\channel\demodam\%1\demodam.dll %2\plugins\channel
copy plugins\channel\demodbfm\%1\demodbfm.dll %2\plugins\channel
copy plugins\channel\demoddsd\%1\demoddsd.dll %2\plugins\channel
copy plugins\channel\demodlora\%1\demodlora.dll %2\plugins\channel
copy plugins\channel\demodnfm\%1\demodnfm.dll %2\plugins\channel
copy plugins\channel\demodssb\%1\demodssb.dll %2\plugins\channel

View File

@ -14,7 +14,8 @@ copy %msys2dir%\mingw64\bin\zlib1.dll %2
move %2\icudt56.dll %2\libicudt56.dll
copy app\%1\sdrangel.exe %2
copy sdrbase\%1\sdrbase.dll %2
copy lz4\%1\lz4.dll %2
copy mbelib\%1\mbelib.dll %2
copy dsdcc\%1\dsdcc.dll %2
copy nanomsg\%1\nanomsg.dll %2
copy libhackrf\%1\libhackrf.dll %2
copy librtlsdr\%1\librtlsdr.dll %2
@ -27,6 +28,7 @@ mkdir %2\plugins\samplesource
copy plugins\channel\chanalyzer\%1\chanalyzer.dll %2\plugins\channel
copy plugins\channel\demodam\%1\demodam.dll %2\plugins\channel
copy plugins\channel\demodbfm\%1\demodbfm.dll %2\plugins\channel
copy plugins\channel\demoddsd\%1\demoddsd.dll %2\plugins\channel
copy plugins\channel\demodlora\%1\demodlora.dll %2\plugins\channel
copy plugins\channel\demodnfm\%1\demodnfm.dll %2\plugins\channel
copy plugins\channel\demodssb\%1\demodssb.dll %2\plugins\channel