1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-14 20:31:53 -05:00

SDRplay plugin: adjust documentation. Corrections and re-organization of the main readme.md file

This commit is contained in:
f4exb 2016-11-21 18:07:58 +01:00
parent ee947f54e9
commit 2d0ee4bf76
5 changed files with 518 additions and 472 deletions

236
Readme.md
View File

@ -1,4 +1,4 @@
![SDR Angel banner](/doc/img/sdrangel_banner.png) ![SDR Angel banner](doc/img/sdrangel_banner.png)
**SDRangel** is an Open Source Qt5/OpenGL SDR and signal analyzer frontend to various hardware. **SDRangel** is an Open Source Qt5/OpenGL SDR and signal analyzer frontend to various hardware.
@ -17,8 +17,9 @@ Although it keeps the same look and feel as its parent application **SDRangelove
These plugins come from the parent code base and have been maintained so that they compile but they are not being actively tested: These plugins come from the parent code base and have been maintained so that they compile but they are not being actively tested:
- Channels: channelrx:
- lora
- demodlora
- tcpsrc (although it has evolved please use the udpsrc plugin instead) - tcpsrc (although it has evolved please use the udpsrc plugin instead)
<h1>Supported hardware</h1> <h1>Supported hardware</h1>
@ -35,8 +36,12 @@ Transmission or signal generation support for eligible devices (BladeRF and Hack
- Phase 1: version 2.2.0: generation to file (File Sink) with AM modulator with simple sine modulation. Fixed sample rate of 48 kS/s (no effective interpolation) - Phase 1: version 2.2.0: generation to file (File Sink) with AM modulator with simple sine modulation. Fixed sample rate of 48 kS/s (no effective interpolation)
- Phase 2: version 2.2.x: full baseband interpolation chain: in AM modulator and Up Channelizer. - Phase 2: version 2.2.x: full baseband interpolation chain: in AM modulator and Up Channelizer.
- Phase 3: version 2.3.0: FM and SSB modulators with audio file input - 2.3.0: SDRplay came into play ...
- Phase 4: version 2.3.x: Audio (Mic) input support - Phase 3a: version 2.3.x: Improve AM modulator with audio file input
- Phase 3b: version 2.3.x: Improve AM modulator with audio input (Mic) support
- Phase 4a: version 2.4.0: FM modulator
- Phase 4b: version 2.4.x: WFM modulator
- Phase 4c: version 2.4.x: SSB modulator
- phase 5: version 3.0.0: BladeRF and HackRF support including final interpolation stage. - phase 5: version 3.0.0: BladeRF and HackRF support including final interpolation stage.
<h2>Airspy</h2> <h2>Airspy</h2>
@ -85,21 +90,29 @@ If you use your own location for librtlsdr install directory you need to specify
`-DLIBRTLSDR_LIBRARIES=/opt/install/librtlsdr/lib/librtlsdr.so -DLIBRTLSDR_INCLUDE_DIR=/opt/install/librtlsdr/include` `-DLIBRTLSDR_LIBRARIES=/opt/install/librtlsdr/lib/librtlsdr.so -DLIBRTLSDR_INCLUDE_DIR=/opt/install/librtlsdr/include`
<h2>SDRplay</h2>
SDRplay devices are supported through the [libmirisdr-4](https://github.com/f4exb/libmirisdr-4) library found in this very same Github space. There is no package distribution for this library and you will have to clone it, build and install it in your system. However Windows and Debian packages of SDRangel contain a pre-compiled version of this library.
If you use your own location for libmirisdr-4 install directory you need to specify library and include locations with cmake. For example with `/opt/install/libmirisdr` the following defines must be added on `cmake` command line:
`-DLIBMIRISDR_LIBRARIES=/opt/install/libmirisdr/lib/libmirisdr.so -DLIBMIRISDR_INCLUDE_DIR=/opt/install/libmirisdr/include`
<h1>Plugins for special devices</h1> <h1>Plugins for special devices</h1>
<h2>File input</h2> <h2>File input</h2>
The file source plugin allows the playback of a recorded IQ file. Such a file is obtained using the recording feature. Press F7 to start recording and F8 to stop. The file has a fixed name `test.sdriq` created in the current directory. The file source plugin allows the playback of a recorded IQ file. Such a file is obtained using the recording feature. Click on the record button on the left of the main frequency dial to toggle recording. The file has a fixed name `test_<n>.sdriq` created in the current directory where `<n>` is the device tab index.
Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is alwasys available in the list of devices as `FileSource[0]` even if no physical device is connected. Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is alwasys available in the list of devices as `FileSource[0]` even if no physical device is connected.
The `.sdriq` format produced are the 2x2 bytes I/Q samples with a header containing the center frequency of the baseband, the sample rate and the timestamp of the recording start. Note that this header length is a multiple of the sample size so the file can be read with a simple 2x2 bytes I/Q reader such as a GNU Radio file source block with a glitch at the beginning corresponding to the header data. The `.sdriq` format produced are the 2x2 bytes I/Q samples with a header containing the center frequency of the baseband, the sample rate and the timestamp of the recording start. Note that this header length is a multiple of the sample size so the file can be read with a simple 2x2 bytes I/Q reader such as a GNU Radio file source block. It will just produce a short glitch at the beginning corresponding to the header data.
<h2>File output</h2> <h2>File output</h2>
The file sink plugin allows the recording of the I/Q baseband signal produced by a transmission chain to a file in the `.sdriq` format thus readable by the file source plugin described just above. The file sink plugin allows the recording of the I/Q baseband signal produced by a transmission chain to a file in the `.sdriq` format thus readable by the file source plugin described just above.
Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is alwasys available in the list of devices as `FileSink[0]` even if no physical device is connected. Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is always available in the list of devices as `FileSink[0]` even if no physical device is connected.
<h2>SDRdaemon input</h2> <h2>SDRdaemon input</h2>
@ -107,7 +120,9 @@ This is the client side of the SDRdaemon server. See the [SDRdaemon](https://git
There is an automated skew rate compensation in place. During rate readjustemnt streaming can be suspended or signal glitches can occur for about one second. There is an automated skew rate compensation in place. During rate readjustemnt streaming can be suspended or signal glitches can occur for about one second.
Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is alwasys available in the list of devices as `SDRdaemon[0]` even if no physical device is connected. This plugin will be built only if the lz4 and libnanomsg libraries are installed in your system. These libraries are available as dev packages in most distributions.
Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is always available in the list of devices as `SDRdaemon[0]` even if no physical device is connected.
<h2>SDRdaemonFEC input</h2> <h2>SDRdaemonFEC input</h2>
@ -115,9 +130,9 @@ This is a specialized client for the SDRdaemon server that matches the SDRdaemon
Using this scheme the remote operation is more robust in case conditions are not optimal. While SDRdaemon without FEC will work fine on copper or fiber lines the FEC version is recommended for WiFi links where even in good conditions some UDP packets might get lost. Using this scheme the remote operation is more robust in case conditions are not optimal. While SDRdaemon without FEC will work fine on copper or fiber lines the FEC version is recommended for WiFi links where even in good conditions some UDP packets might get lost.
This plugin will be built only if the [CM256cc library](https://github.com/f4exb/cm256cc) is installed in your system. You will then have to specify the include and library paths on the cmake command line. Say if you install cm256cc in `/opt/install/cm256cc` you will have to add `-DCM256CC_INCLUDE_DIR=/opt/install/cm256cc/include/cm256cc -DCM256CC_LIBRARIES=/opt/install/cm256cc/lib/libcm256cc.so` to the cmake commands. This plugin will be built only if the libnanomsg and the [CM256cc library](https://github.com/f4exb/cm256cc) are installed in your system. libnanomsg is available as a dev package in most distributions For CM256cc if you install it in a non standard directory you will then have to specify the include and library paths on the cmake command line. Say if you install cm256cc in `/opt/install/cm256cc` you will have to add `-DCM256CC_INCLUDE_DIR=/opt/install/cm256cc/include/cm256cc -DCM256CC_LIBRARIES=/opt/install/cm256cc/lib/libcm256cc.so` to the cmake commands.
Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is alwasys available in the list of devices as `SDRdaemonFEC[0]` even if no physical device is connected. Note that this plugin does not require any of the hardware support libraries nor the libusb library. It is always available in the list of devices as `SDRdaemonFEC[0]` even if no physical device is connected.
<h1>Channel plugins with special conditions</h1> <h1>Channel plugins with special conditions</h1>
@ -151,6 +166,36 @@ If you are not comfortable with this just do not install DSDcc and/or mbelib and
- For Linux distributions: `plugins/channel/libdemoddsd.so` - For Linux distributions: `plugins/channel/libdemoddsd.so`
- For Windows distributions: `dsdcc.dll`, `mbelib.dll`, `plugins\channel\demoddsd.dll` - For Windows distributions: `dsdcc.dll`, `mbelib.dll`, `plugins\channel\demoddsd.dll`
<h1>Software distributions</h1>
In the [releases](https://github.com/f4exb/sdrangel/releases) section one can find binary distributions for some common systems:
- Windows 64 bit
- Windows 32 bit
- Debian x86_64 (Ubuntu 16.04)
- Debian armv7l (Debian Jessie)
<h2>Windows distributions</h2>
This is the archive of the complete binary distribution that expands to the `sdrangel64` directory for the 64 bit version and `sdrangel` for the 32 bit version. You can install it anywhere you like and click on `sdrangel.exe` to start.
<h2>Debian distributions</h2>
It is provided in the form of a .deb package for x86_64 architectures with SSE 4.1 support or ARMv7l architectures with Neon support. Please note that the ARM version is quite experimental and may or may not work depending on the hardware (it is very slow and unusable on a RPi3 for example).
Install it as usual for a .deb package:
- Make sure the `universe` repository is in your `/etc/apt/sources.list`
Then in a terminal do:
- `sudo apt-get update`
- `sudo dpkg -i sdrangel_vx.y.z-1_amd64.deb` where x.y.z is the version number
- `sudo apt-get -f install` this will install missing dependencies
The software is installed in `\opt\sdrangel` you can start it from the command line with:
- `/opt/sdrangel/bin/sdrangel`
<h1>Software build</h1> <h1>Software build</h1>
<h2>Qt version</h2> <h2>Qt version</h2>
@ -235,168 +280,7 @@ Then you should be all set to build the software with `cmake` and `make` as disc
<h2>Windows</h2> <h2>Windows</h2>
<h3>Introduction, limitations, warnings...</h3> This is a rather long story and one may prefer using the software distribution instead. However the brave may follow [this link](ReadmeWindowsBuild.md)
This is new in version 1.1.3 and also experimental. Use at your own risk! This may or may not work on your machine and version of Windows. It was tested more or less successfully in native Windows 7, 8 and 10 however it does not work in a Virtualbox guest supposedly because it uses OpenGL ES 2.0 instead of the OpenGL desktop version (OpenGL 4.3) when it is running native and I think the OpenGL code in SDRangel is still not quite right to be compatible with the ES version (use of QtGLWidget instead of QtOpenGLWidget).
You should take note that the Windows scheduler is just a piece of crap and not suitable for near real time applications like SDRs. In any case you should make sure that the sdrangel.exe process does not take more than 35% of the global CPU (check this with Task Manager). Unload channel plugins if necessary. Promoting sdrangel.exe process to real time via Task Manager may or may not help but usually not. If you encounter any problem just grab a Linux installation CD or .iso file and get yourself a decent OS first. You have been warned!
There are no plugins for both flavours of Funcubes since it uses Alsa interface which is Linux exclusively. Changing for the Qt audio portable interface instead could be a solution that will be investigated in the future.
The SDRdaemon plug-in is present only in the 64 bit build version since version 1.1.4. The messaging system based on nanomsg works only in the 64 bit environment. However please be aware that the SDRdaemon plugin is not working well mainly due to the fact that it needs an OS with a decent scheduler and Windows is definitely not this sort of OS (see my previous warning). In fact depending on the case your mileage may vary however the Linux version works always beautifully so you know the options if you really want to use it!
<h3>Build environment</h3>
You will have to use QtCreator and its environment for that purpose. Build was done with the `Desktop_Qt_5_5_1_MinGW_32bit` tool-chain. Some other flavors might work. Please refer to Qt documentation for Qt Creator details.
You will need to add `CONFIG+=MINGW32` to the `qmake` options. In QtCreator open the `Projects` menu (the file icon on the left bar) and in the `Build steps` section open the `qmake` details collapsed section (click on the caret icon). Choose the build configuration for which you run the build (`debug` or `release`) and add `CONFIG+=MINGW32` to the `Additional arguments` line.
<h3>Dependencies</h3>
<h4>Boost</h4>
You only really need the Boost headers so there is no need to compile Boost itself. Just download an archive from the Boost website and unpack it somewhere. In our example it will be installed in `D:\boost_1_58_0`.
You then need to update the .pro files that depend on Boost. They are:
- `sdrbase\sdrbase.pro`
- `plugins\channel\chanalyzer\chanalyzer.pro`
Just update the following line with the location of your Boost installation:
- `CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0"`
<h4>USB support (libusb)</h4>
You have to download an archive of libusb that supports MinGW32 from the following [location](https://sourceforge.net/projects/libusb/files/libusb-1.0/). You will have the choice among various versions and various archive formats in each version folder. It works with version `1.0.19` and is untested with later version(s). In our example it will be installed in `D:\libusb-1.0.19`.
You then need to update the .pro files that depend on libusb. They are:
- `libairspy\libairspy.pro`
- `libhackrf\libhackrf.pro`
- `librtlsdr\librtlsdr.pro`
- `libbladerf\libbladerf.pro`
Just update the following lines with the location of your libusb installation:
- `CONFIG(MINGW32):INCLUDEPATH += "D:\libusb-1.0.19\include\libusb-1.0"`
- `CONFIG(MINGW32):LIBS += -LD:\libusb-1.0.19\MinGW32\dll -llibusb-1.0`
<h4>Airspy library (libairspy)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\libairspy`. Copy the header files (`*.h`) from `D:\softs\libairspy\libairspy\src` to the directory above (`D:\softs\libairspy\libairspy`).
You then need to update the .pro files that depend on libairspy. They are:
- `libairspy\libairspy.pro`. Update the following line with the location of your libiarspy installation:
- `CONFIG(MINGW32):LIBAIRSPYSRC = "D:\softs\libairspy\libairspy"`
- `plugins\samplesource\airspy\airspy.pro`. Update the following line with the location of your libiarspy installation:
- `CONFIG(MINGW32):LIBAIRSPYSRC = "D:\softs\libairspy"`
<h4>HackRF library (libhackrf)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\hackrf`. Copy the header files (`*.h`) from `D:\softs\hackrf\host\libhackrf\src` to the directory above (`D:\softs\hackrf\host\libhackrf`).
You then need to update the .pro files that depend on libhackrf. They are:
- `libhackrf\libhackrf.pro`. Update the following line with the location of your libhackrf installation:
- `CONFIG(MINGW32):LIBHACKRFSRC = "D:\softs\hackrf\host\libhackrf"`
- `plugins\samplesource\hackrf\hackrf.pro`. Update the following line with the location of your libhackrf installation:
- `CONFIG(MINGW32):LIBHACKRFSRC = "D:\softs\hackrf\host"`
<h4>RTL-SDR library (librtlsdr)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\librtlsdr`.
You then need to update the .pro files that depend on librtlsdr. They are:
- `librtlsdr\librtlsdr.pro`. Update the following line with the location of your librtlsdr installation:
- `CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr"`
- `plugins\samplesource\rtlsdr\rtlsdr.pro`. Update the following line with the location of your librtlsdr installation:
- `CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr"`
<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 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"`
- `CONFIG(MINGW32):LIBBLADERFCOMMONSRC = "D:\softs\bladeRF-libbladeRF_v1.5.1\host\common"`
- `CONFIG(MINGW32):LIBBLADERFLIBSRC = "D:\softs\bladeRF-libbladeRF_v1.5.1\host\libraries\libbladeRF"`
- `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.
<h3>Installation</h3>
Then comes the tedious part of packaging everything in a single place so that you will just have to click on `sdrangel.exe` in the file explorer to start. Please follow the next steps for this purpose.
- Make yourself an installation directory say `D:\Programs\sdrangel`
- Assume the build directory is `D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release` (assuming you compiled SDRangel for release)
- Assume the source directory is `D:\development\sdrangel`
- From the Qt group in the Windows start menu select the `Qt 5.5 for Desktop (Mingw...` console box
- In this console type: `bin\windeployqt.exe --dir D:\Programs\sdrangel D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release\app\release\sdrangel.exe D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release\sdrbase\release\sdrbase.dll`
- This copies all dependencies for Qt but alas nothing from our software so you will have to do this yourself. In the same console cd to the root of the build directory and type:
- `D:\development\sdrangel\windows.install.bat release D:\Programs\sdrangel`
- use `debug` in the place of `release` if you built the debug version
<h3>Running</h3>
You will need to install Zadig to get USB support for hardware devices. Please refer to [Zadig website](http://zadig.akeo.ie/) for details. Basically if you get things working for SDR# or HDSDR then it will work with SDRangel.
<h3>MinGW64 tool-chain</h3>
It is possible to use a MinGW64 tool-chain by following these steps:
- Install MSys2 from [this page](http://msys2.github.io/). Follow all the steps.
- Install Qt5 from MSys2 command line:
- `pacman -Sy mingw-w64-x86_64-qt5`
- Install gcc/g++ from MSys2 command line:
- `pacman -Sy mingw64/mingw-w64-x86_64-gcc`
- Create a new "kit" in Qt Creator:
- Go to "Projects" sub-menu from the left menu bar
- Click on "Manage kits"
- In "Compilers" tab add a compiler naming it "MinGW64" for example. In the compiler path specify the path to `g++` in your MSys2 installation (ex: `D:\msys64\mingw64\bin\g++.exe`)
- In "Qt versions" tab add a Qt version and specify the path to the `qmake.exe` in your MSys2 installation (ex: `D:\msys64\mingw64\bin\qmake.exe`)
- In "Kits" tab add a new kit and name it "MinGW64" for example.
- In "Compiler" select the "MinGW64" compiler you created previously
- In "Qt version" select the Qt version you created previously
- You should now be able to use this "kit" for your build
- In the "Build steps" section add `CONFIG+=MINGW64` in the "Additional arguments"
Use the `windeployqt.exe` of the MSys2 distribution to copy the base files to your target installation directory in a similar way as this is done for MinGW32 (see above).
The final packaging is done with the `windows64.install.bat` utility. Assuming `D:\development\sdrangel` is the root directory of your cloned source repository, `D:\msys64` is the installation directory of MSys2, `D:\libusb-1.0.19\MinGW64` is your libusb installation directory and `D:\Programs\sdrangel64` is your target installation directory do: `D:\development\sdrangel\windows64.install.bat release D:\Programs\sdrangel`. Modify the script if your MSys2 and libusb locations are different.
<h1>Mac O/S</h1> <h1>Mac O/S</h1>
@ -434,9 +318,9 @@ See the v1.0.1 first official relase [release notes](https://github.com/f4exb/sd
<h2>To Do</h2> <h2>To Do</h2>
- Tx support for devices like Blade-RF or Hack-RF and simple file output (probably to start with) - Tx support for devices like Blade-RF or Hack-RF and simple file output (started)
- Tx channels to feed Tx devices - Tx channels to feed Tx devices (started)
- Possibility to connect channels for example Rx to Tx or single Rx channel to dual Rx channel supporting MI(MO) features like 360 degree polarization detection. - Possibility to connect channels for example Rx to Tx or single Rx channel to dual Rx channel supporting MI(MO) features like 360 degree polarization detection. Introduce the notion of ports of the same physical device.
- Specialize plugins into channel and sample source plugins since both have almost complete different requirements and only little in common - Specialize plugins into channel and sample source plugins since both have almost complete different requirements and only little in common
- 32 bit samples for the Channel Analyzer - 32 bit samples for the Channel Analyzer
- Enhance presets management (Edit, Move, Import/Export from/to human readable format like JSON). - Enhance presets management (Edit, Move, Import/Export from/to human readable format like JSON).

164
ReadmeWindowsBuild.md Normal file
View File

@ -0,0 +1,164 @@
<h2>Building and installing SDRangel for Windows</h2>
<h3>Introduction, limitations, warnings...</h3>
This is new in version 1.1.3 and also experimental. Use at your own risk! This may or may not work on your machine and version of Windows. It was tested more or less successfully in native Windows 7, 8 and 10 however it does not work in a Virtualbox guest supposedly because it uses OpenGL ES 2.0 instead of the OpenGL desktop version (OpenGL 4.3) when it is running native and I think the OpenGL code in SDRangel is still not quite right to be compatible with the ES version (use of QtGLWidget instead of QtOpenGLWidget).
You should take note that the Windows scheduler is just a piece of crap and not suitable for near real time applications like SDRs. In any case you should make sure that the sdrangel.exe process does not take more than 35% of the global CPU (check this with Task Manager). Unload channel plugins if necessary. Promoting sdrangel.exe process to real time via Task Manager may or may not help but usually not. If you encounter any problem just grab a Linux installation CD or .iso file and get yourself a decent OS first. You have been warned!
There are no plugins for both flavours of Funcubes since it uses Alsa interface which is Linux exclusively. Changing for the Qt audio portable interface instead could be a solution that will be investigated in the future.
The SDRdaemon plug-in is present only in the 64 bit build version since version 1.1.4. The messaging system based on nanomsg works only in the 64 bit environment. However please be aware that the SDRdaemon plugin is not working well mainly due to the fact that it needs an OS with a decent scheduler and Windows is definitely not this sort of OS (see my previous warning). In fact depending on the case your mileage may vary however the Linux version works always beautifully so you know the options if you really want to use it!
<h3>Build environment</h3>
You will have to use QtCreator and its environment for that purpose. Build was done with the `Desktop_Qt_5_5_1_MinGW_32bit` tool-chain. Some other flavors might work. Please refer to Qt documentation for Qt Creator details.
You will need to add `CONFIG+=MINGW32` to the `qmake` options. In QtCreator open the `Projects` menu (the file icon on the left bar) and in the `Build steps` section open the `qmake` details collapsed section (click on the caret icon). Choose the build configuration for which you run the build (`debug` or `release`) and add `CONFIG+=MINGW32` to the `Additional arguments` line.
<h3>Dependencies</h3>
<h4>Boost</h4>
You only really need the Boost headers so there is no need to compile Boost itself. Just download an archive from the Boost website and unpack it somewhere. In our example it will be installed in `D:\boost_1_58_0`.
You then need to update the .pro files that depend on Boost. They are:
- `sdrbase\sdrbase.pro`
- `plugins\channel\chanalyzer\chanalyzer.pro`
Just update the following line with the location of your Boost installation:
- `CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0"`
<h4>USB support (libusb)</h4>
You have to download an archive of libusb that supports MinGW32 from the following [location](https://sourceforge.net/projects/libusb/files/libusb-1.0/). You will have the choice among various versions and various archive formats in each version folder. It works with version `1.0.19` and is untested with later version(s). In our example it will be installed in `D:\libusb-1.0.19`.
You then need to update the .pro files that depend on libusb. They are:
- `libairspy\libairspy.pro`
- `libhackrf\libhackrf.pro`
- `librtlsdr\librtlsdr.pro`
- `libbladerf\libbladerf.pro`
Just update the following lines with the location of your libusb installation:
- `CONFIG(MINGW32):INCLUDEPATH += "D:\libusb-1.0.19\include\libusb-1.0"`
- `CONFIG(MINGW32):LIBS += -LD:\libusb-1.0.19\MinGW32\dll -llibusb-1.0`
<h4>Airspy library (libairspy)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\libairspy`. Copy the header files (`*.h`) from `D:\softs\libairspy\libairspy\src` to the directory above (`D:\softs\libairspy\libairspy`).
You then need to update the .pro files that depend on libairspy. They are:
- `libairspy\libairspy.pro`. Update the following line with the location of your libiarspy installation:
- `CONFIG(MINGW32):LIBAIRSPYSRC = "D:\softs\libairspy\libairspy"`
- `plugins\samplesource\airspy\airspy.pro`. Update the following line with the location of your libiarspy installation:
- `CONFIG(MINGW32):LIBAIRSPYSRC = "D:\softs\libairspy"`
<h4>HackRF library (libhackrf)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\hackrf`. Copy the header files (`*.h`) from `D:\softs\hackrf\host\libhackrf\src` to the directory above (`D:\softs\hackrf\host\libhackrf`).
You then need to update the .pro files that depend on libhackrf. They are:
- `libhackrf\libhackrf.pro`. Update the following line with the location of your libhackrf installation:
- `CONFIG(MINGW32):LIBHACKRFSRC = "D:\softs\hackrf\host\libhackrf"`
- `plugins\samplesource\hackrf\hackrf.pro`. Update the following line with the location of your libhackrf installation:
- `CONFIG(MINGW32):LIBHACKRFSRC = "D:\softs\hackrf\host"`
<h4>RTL-SDR library (librtlsdr)</h4>
Download the source code or clone the git repository somewhere. It our example it will be installed in `D:\softs\librtlsdr`.
You then need to update the .pro files that depend on librtlsdr. They are:
- `librtlsdr\librtlsdr.pro`. Update the following line with the location of your librtlsdr installation:
- `CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr"`
- `plugins\samplesource\rtlsdr\rtlsdr.pro`. Update the following line with the location of your librtlsdr installation:
- `CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr"`
<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 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"`
- `CONFIG(MINGW32):LIBBLADERFCOMMONSRC = "D:\softs\bladeRF-libbladeRF_v1.5.1\host\common"`
- `CONFIG(MINGW32):LIBBLADERFLIBSRC = "D:\softs\bladeRF-libbladeRF_v1.5.1\host\libraries\libbladeRF"`
- `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.
<h3>Installation</h3>
Then comes the tedious part of packaging everything in a single place so that you will just have to click on `sdrangel.exe` in the file explorer to start. Please follow the next steps for this purpose.
- Make yourself an installation directory say `D:\Programs\sdrangel`
- Assume the build directory is `D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release` (assuming you compiled SDRangel for release)
- Assume the source directory is `D:\development\sdrangel`
- From the Qt group in the Windows start menu select the `Qt 5.5 for Desktop (Mingw...` console box
- In this console type: `bin\windeployqt.exe --dir D:\Programs\sdrangel D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release\app\release\sdrangel.exe D:\development\build-sdrangel.windows-Desktop_Qt_5_5_1_MinGW_32bit-Release\sdrbase\release\sdrbase.dll`
- This copies all dependencies for Qt but alas nothing from our software so you will have to do this yourself. In the same console cd to the root of the build directory and type:
- `D:\development\sdrangel\windows.install.bat release D:\Programs\sdrangel`
- use `debug` in the place of `release` if you built the debug version
<h3>Running</h3>
You will need to install Zadig to get USB support for hardware devices. Please refer to [Zadig website](http://zadig.akeo.ie/) for details. Basically if you get things working for SDR# or HDSDR then it will work with SDRangel.
<h3>MinGW64 tool-chain</h3>
It is possible to use a MinGW64 tool-chain by following these steps:
- Install MSys2 from [this page](http://msys2.github.io/). Follow all the steps.
- Install Qt5 from MSys2 command line:
- `pacman -Sy mingw-w64-x86_64-qt5`
- Install gcc/g++ from MSys2 command line:
- `pacman -Sy mingw64/mingw-w64-x86_64-gcc`
- Create a new "kit" in Qt Creator:
- Go to "Projects" sub-menu from the left menu bar
- Click on "Manage kits"
- In "Compilers" tab add a compiler naming it "MinGW64" for example. In the compiler path specify the path to `g++` in your MSys2 installation (ex: `D:\msys64\mingw64\bin\g++.exe`)
- In "Qt versions" tab add a Qt version and specify the path to the `qmake.exe` in your MSys2 installation (ex: `D:\msys64\mingw64\bin\qmake.exe`)
- In "Kits" tab add a new kit and name it "MinGW64" for example.
- In "Compiler" select the "MinGW64" compiler you created previously
- In "Qt version" select the Qt version you created previously
- You should now be able to use this "kit" for your build
- In the "Build steps" section add `CONFIG+=MINGW64` in the "Additional arguments"
Use the `windeployqt.exe` of the MSys2 distribution to copy the base files to your target installation directory in a similar way as this is done for MinGW32 (see above).
The final packaging is done with the `windows64.install.bat` utility. Assuming `D:\development\sdrangel` is the root directory of your cloned source repository, `D:\msys64` is the installation directory of MSys2, `D:\libusb-1.0.19\MinGW64` is your libusb installation directory and `D:\Programs\sdrangel64` is your target installation directory do: `D:\development\sdrangel\windows64.install.bat release D:\Programs\sdrangel`. Modify the script if your MSys2 and libusb locations are different.

2
debian/changelog vendored
View File

@ -1,6 +1,6 @@
sdrangel (2.3.0-1) unstable; urgency=medium sdrangel (2.3.0-1) unstable; urgency=medium
* SDRPlay support: new input source plugin * SDRplay support: new input source plugin
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 13 Nov 2016 23:14:18 +0100 -- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 13 Nov 2016 23:14:18 +0100

View File

@ -1,36 +1,34 @@
<h1>SDRPlay plugin</h1> <h1>SDRplay plugin</h1>
<h2>Introduction</h2> <h2>Introduction</h2>
This plugin supports input from SDRPlay devices. SDRPlay is based on the MSi001 and MSi2500 chips from Mirics. The standard API provided by Mirics is closed source moreover it could not be implemented successfully in SDRangel. An open source API libmirisdr-2 has been written by Miroslav Slugen and later amended by Leif Asbrink SM5BSZ. Some enhancements and bug fixes have nade it to libmirisdr-4 in this repository. It is this API that is used to drive the SDRPlay. This plugin supports input from SDRplay devices. SDRplay is based on the MSi001 and MSi2500 chips from Mirics. The standard API provided by Mirics is closed source moreover it could not be implemented successfully in SDRangel. An open source API libmirisdr-2 has been written by Miroslav Slugen and later amended by Leif Asbrink SM5BSZ. This API uses a new flavour called [libmirisdr-4](https://github.com/f4exb/libmirisdr-4) in this very same Github space. It contains enhancements and bug fixes.
SDRPlay has a rather good performance in HF bands due to front end filtering and the MSi001 chip. This sets it apart from the other supported hardware and is an interesting addition to the collection. <b>Note to Windows users:</b> this plugin uses standard USB interface provided by [Zadig](http://zadig.akeo.ie) for example. It is not compatible with the drivers from Mirics so you will have to unistall (or you should not install) the Mirics software before you can use this plugin.
<b>Note to Windows users:</b> this plugin uses standard USB interface provided by Zadig (for example). It is not compatible with the drivers from Mirics so you will have to unistall (or you should not install) the Mirics software before you can use this plugin.
<h2>Build</h2> <h2>Build</h2>
As mentioned already the plugin depends on libmirisdr-4. You will have to specify the include and library paths on the cmake command line. Say if you install `libmirisdr-4` in `/opt/install/libmirisdr` you will have to add `-DLIBMIRISDR_INCLUDE_DIR=/opt/install/libmirisdr/include -DLIBMIRISDR_LIBRARIES=/opt/install/libmirisdr/lib/libmirisdr.so` on the cmake command line. As mentioned already the plugin depends on libmirisdr-4. You will have to compile it and install it in your system. When installed in non standard folders the include and library paths have to be specified on the cmake command line. Say if you install `libmirisdr-4` in `/opt/install/libmirisdr` you will have to add `-DLIBMIRISDR_INCLUDE_DIR=/opt/install/libmirisdr/include -DLIBMIRISDR_LIBRARIES=/opt/install/libmirisdr/lib/libmirisdr.so` on the cmake command line.
<h2>Interface</h2> <h2>Interface</h2>
![SDRPlay plugin GUI](../../../doc/img/SDRPlay_plugin.png) ![SDRplay plugin GUI](../../../doc/img/SDRPlay_plugin.png)
<h3>1. Common controls</h3> <h3>1. Common controls</h3>
Controls common to all source plugins. See ![main interface description](../../../sdrbase/readme.md). Controls common to all source plugins. See [main interface description](../../../sdrbase/readme.md).
<h3>2. Local oscillator frequency correction</h3> <h3>2. Local oscillator frequency correction</h3>
This is the correction in tenths of ppm steps. This is hardly useful with SDRPlay as it has been found on spot. It appears on many source plugins ans it has been kept as LO accuracy could depend on units. This is the correction in tenths of ppm steps. This is hardly useful with SDRplay as it has been found on spot. The MSi001 chip probably uses some sort of internal compensation. However this control is kept just in case.
<h3>3. DC and IQ imbalance correction</h3> <h3>3. DC and IQ imbalance correction</h3>
These are controls common to many source plugins too. IQ imbalance is hardly useful but SDRPlay is affected by DC bias when used at zero IF. These controls are also common with many source plugins. IQ imbalance is hardly useful but SDRplay is affected by DC bias when used at zero IF.
<h3>4. Band selection</h3> <h3>4. Band selection</h3>
This selects a frequency range corresponding to the hardware path in the SDRPlay. Bands available are: This selects a frequency range corresponding to the hardware path in the SDRplay. Bands available are:
- 10 kHz to 12 MHz - 10 kHz to 12 MHz
- 12 MHz to 30 MHz - 12 MHz to 30 MHz
@ -56,7 +54,7 @@ This selects the IF filter. Following bandwidths are available according to MSi0
<h3>6. IF frequency</h3> <h3>6. IF frequency</h3>
This select the IF frequency between these values: This selects the IF frequency between these values:
- 0 for zero IF - 0 for zero IF
- 450 kHz: you have to set sample rate to 1792 kHz (7) and use decimation (8) with an infradyne position (9) - 450 kHz: you have to set sample rate to 1792 kHz (7) and use decimation (8) with an infradyne position (9)
@ -85,24 +83,24 @@ Relative position of center frequency of decimated baseband relative to the orig
<h3>10. Tuner gain mode</h3> <h3>10. Tuner gain mode</h3>
Use this radiobuton to select a mode where the gain of LNA (or mixer buffer), mixer and baseband amplifiers is automatically selected depending on the tuner gain index (11). This index is the gain value in dB at nominal gain of all amplifiers. This is not the exact gain at all frequencies because the LNA gain decreases significantly at higher frequencies. Use this radiobutton to select a mode where the gain of the LNA (or mixer buffer below 50 MHz), mixer and baseband amplifiers are automatically selected depending on the tuner gain index (11). This index is the gain value in dB at the nominal gain of all amplifiers. This is not the exact gain at all frequencies because the LNA gain decreases significantly at higher frequencies.
<h3>11. Tuner gain setting<h3> <h3>11. Tuner gain setting</h3>
The tuner gain index can be set between 0 and 102. The tuner gain index can be set between 0 and 102 points (corresponds to dB in the nominal case).
<h3>12. Manual gain mode</h3> <h3>12. Manual gain mode</h3>
Use this radiobuton to select a mode where the gain of all amplifiers can be set independently Use this radiobutton to select a mode where the gain of all amplifiers can be set independently
<h3>13. LNA toggle</h3> <h3>13. LNA toggle</h3>
Toggle button to switch on or off the LNA (bands higher than 50 MHz) or mixer buffer (band lower than 50 MHz). The nominal gain is +24 dB Toggle button to switch on or off the LNA (bands above 50 MHz) or mixer buffer (bands below 50 MHz). The nominal gain is +24 dB.
<h3>14. Mixer amplifier toggle</h3> <h3>14. Mixer amplifier toggle</h3>
Toggle button to switch on or off the mixer amplifier. The gain of this amplifier is +19 dB Toggle button to switch on or off the mixer amplifier. The gain of this amplifier is +19 dB.
<h3>15. Baseband amplifier gain</h3> <h3>15. Baseband amplifier gain</h3>
Baseband amplifier gain from 0 to 59 dB Baseband amplifier gain from 0 to 59 dB.

View File

@ -123,7 +123,7 @@ public:
void decimate64_inf(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_inf(SampleVector::iterator* it, const T* buf, qint32 len);
void decimate64_sup(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_sup(SampleVector::iterator* it, const T* buf, qint32 len);
void decimate64_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_cen(SampleVector::iterator* it, const T* buf, qint32 len);
// separate I and Q input buffers (ex: SDRPlay) // separate I and Q input buffers
void decimate1(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len); void decimate1(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len);
void decimate2_u(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len); void decimate2_u(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len);
void decimate2_inf(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len); void decimate2_inf(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len);