Gnu radio установка windows

GNU Radio

GNU Radio – свободная платформа цифровой обработки сигналов. GNU Radio представляет собой набор программ и библиотек, которые позволяют создавать произвольные радиосистемы, схемы модуляции, формы принимаемых и отправляемых сигналов в которых задаются программно, а для захвата и генерации сигналов применяются простейшие аппаратные устройства.

Проект распространяется под лицензией GNU General Public License version 3. Код большинства компонентов GNU Radio написан на языке Python, а части, критические к быстродействию и времени задержки, написанные на языке С ++, что позволяет использовать пакет при решении задач в режиме реального времени.

В сочетании с универсальными программируемыми приемопередатчиками USRP2, не привязанными к полосе частот и типов модуляции сигнала, платформа может быть использована для создания таких устройств, как базовые станции для GSM-сетей, устройства для дистанционного чтения RFID-меток (электронные удостоверения и пропуски, смарт-карты), GPS-ресиверы, Wi-Fi, приёмники и передатчики FM-радио, TV-декодеры, пассивные радары, спектральные анализаторы и тому подобное.

Кроме USRP, пакет может использовать и другие аппаратные компоненты для ввода и вывода сигналов, например, доступны драйверы для звуковых карт, TV-тюнеров, устройств Softrock, Comedi, Funcube и S-Mini.

В состав также входит коллекция фильтров, канальных кодеков, модулей синхронизации, демодуляторов, эквалайзеров, голосовых кодеков, декодеров и других элементов, необходимых для создания радиосистем. Указанные элементы могут быть использованы как кирпичики для построения готовой системы, в сочетании с возможностями по определению потоков данных между блоками, позволяет проектировать радиосистемы даже без навыков программирования.

Building and Installing the USRP Open Source Toolchain (UHD and GNU Radio) on Windows

Contents

Application Note Number

Abstract

This Application Note provides a step-by-step guide for building, installing, and updating the open-source toolchain, specifically UHD and GNU Radio, for the USRP from source code on Windows.

UHD on Windows

UHD is fully supported on Windows 7, 8, 8.1, and 10 and can be compiled using Visual Studio 2013, 2015, or 2017. The future target is to support the latest three OS and Visual Studio releases.

Setup the Environment

The following dependencies are required for a regular build.

  • Microsoft Windows (7, 8, 8.1, 10)
  • Microsoft Visual Studio (2013, 2015, 2017)
  • CMake (2.8.0 or later)
  • Boost (1.53 or later)
  • LibUSB (1.0 or later)
  • Python (2.7.x)
  • Mako (0.5.0 or later)
  • Doxygen (1.8 or later, optional)
  • NSIS (2.50 or later, optional)

Installing the dependencies

Microsoft Visual Studio

The free version of Visual Studio is sufficient for building UHD. This guide was tested using Windows 10 x64 and Microsoft Visual Studio Community 2017 (v15.9).

Users will need to install the «Desktop Development for C++» Workload for Visual Studio. This can be found in:

Tools >> Get Tools and Features. >> Workloads

CMake

CMake is a cross-platform build system used to configure and generate the files necessary to compile and test UHD for a particular computer environment.

Made sure to download the «.msi» file, not the «.zip» file. During installation select the option to «Add CMake to the system PATH for the current user» or for «all users», depending on which is more applicable for your Windows usage.

CMake 3.13.2 (win64-x64) was used for the guide. UHD has been tested to work through CMake 3.17.2.

Boost

Boost is a set of C++ libraries providing useful algorithms and data structures.

UHD builds with Boost through 1.72.0. From the link below, select the version of Boost you wish to build against. At the bottom of the directory listing will be a file «DEPENDENCY_VERSIONS.txt». Review this file to determine the correct version of the Boost installer to download for your specific MSVC version. The Boost binary installer must be selected to match the version of MSVC being used to compile UHD and architecture of Windows being run — 32 or 64 bit. Watch out as Microsoft has done the version numbering of MSVC such that the year and version number do not match. Here are the recent entries in the noted file:

Note that VS2019 support (MSVC Toolset 14.2) starts unofficially with Boost 1.70.0, and then officially with 1.71.0.

After the Boost installer executable is downloaded, find it in the Windows File Explorer, right click on it and «Run as administrator». During the install, select the destination location of «C:\Program Files\Boost\» for the install; the installer will append the Boost directory and version info, such that the full destination will actually be, for example, «C:\Program Files\Boost\boost_1_68_0».

Читайте также:  Control panel view windows

VS2017 uses the MSVC Toolset 14.1 so boost_1_68_0-msvc-14.1-64 was selected for this tutorial, and installed as «C:\Program Files\Boost\boost_1_68_0».

LibUSB

LibUSB is a cross-platform library providing access to USB devices. UHD is compatible through LibUSB 1.0.23 (the current release as of this update).

LibUSB releases are distributed as 7zip or tar.bz2 archives. There are plenty of free «unzip» programs available that can extract the files in either archive type; Windows does not provide this capability, so you’ll need to download one of these programs. We are using the «7Zip» program as linked in the “Setting Up the Environment” Section. After installing 7zip the LibUSB release archive can be extracted by right clicking on the downloaded file and selecting 7zip >> Extract files.

LibUSB 1.0.22 was used for the guide and extracted to C:\Users\username\libusb-1.0.22 .

Note: The directory to which you extract libusb must not contain spaces. This is to say that C:\Users\user name\libusb-1.0.22 will cause compile issues moving forward.

Python

Python is a widely-used general-purpose, high-level programming language. UHD includes several utilities written in Python and has several scripts which are part of the build process. UHD is compatible with Python 2.7, and 3.5 through 3.8. The default Python install will be 32 bit. To get the 64-bit install, you have to select it specifically — «Download Windows x86-64 executable installer» for Python 3.0+ or «Download Windows x86-64 MSI installer» for Python 2.7 (any version). When installing Python make sure to add to the PATH so that «python.exe» is available from the commandline.

The Python 2.7.15 was used for this tutorial.

Mako is a python template library used to generate source files and is distributed using a Python package management system.

Open a command line (Ctrl-X, select Run, type cmd . exe and click OK)

This installed version 1.0.7 at the time of writing this guide.

Doxygen

Doxygen is a documentation generator which creates the HTML manual from text in the source code. It optional for building UHD.

Version 1.8.14 was used for this guide.

NSIS is a toolkit for creating Windows installers. NSIS is used for creating binary packages of UHD enabling easy distribution and installation of UHD, associated utilities, and examples.

Version 3.03 was used for this guide.

Obtain the UHD source code

The UHD source code is stored in a GIT repository: https://www.github.com/EttusResearch/uhd . From this link, one can download an archive of the UHD source code for any release, the current public codebase itself, and the code state for some branches or tags. Which one you download is up to your needs. We generally recommend the latest release, which can be downloaded from our Github repository or from our website as noted below.

For the purposes of this guide, the archive was downloaded from our website, and extracted as C:\Users\username\uhd-release\ . Please note that most UHD archives will extract to a directory name that corresponds to the UHD version; for example the one noted extracts to «uhd_3.15.0.0-release». After extraction, we change the directory name to that as noted («uhd-release») and move it into the directory as noted. You can install the UHD source wherever you want to, of course; for this article we choose this location and use it later as such.

From a release source archive

Archives of the source code for each stable release can be downloaded from the Ettus website.

7zip can be used to extract the tar.gz archive to a location of your choosing.

This guide used the Git repository to obtain the newest release of UHD, read on for details.

From the Git repository

The latest development code, as well as tagged releases, is available from the git repository hosted on GitHub

For step-by-step instructions using a git client, see section Building and installing UHD from source code in the UHD Linux Installation Guide. Return to this document after you have successfully checked out your desired release of UHD, and note that some directory names moving forward may differ slightly.

Building

All prerequisites have now been installed and downloaded. You are encouraged to restart your machine before continuing.

Configuring the Building

  • Open the Cmake GUI
  • Select source code directory C:\Users\username\uhd-release\host\
  • Select binary build directory (this may require creating the folder \build\) C:\Users\username\uhd-release\host\build\
  • Check the Advanced checkbox
  • Click Configure
    • Set Visual Studio 15 2017 Win64 as the compiler
    • Click “Finish” and allow CMake to Generate
  • Change or add the following entries Boost_INCLUDE_DIR C:\Program Files\Boost\boost_1_68_0\
  • Add the following entries with type PATH Boost_LIBRARY_DIRS C:\Program Files\Boost\boost_1_68_0\lib64-msvc-14.1\ LIBUSB_INCLUDE_DIRS C:\Users\username\libusb-1.0.22\include\libusb-1.0\
  • Add the following entry with type FILEPATH LIBUSB_LIBRARIES C:\Users\username\libusb-1.0.22\MS64/dll\libusb-1.0.lib
  • Click Generate
Читайте также:  How to turn off windows security

Compiling UHD

Open Visual Studio 2017 and open the UHD project file generated by CMake.

File > Open Project C:\Users\username\uhd-release\host\build\UHD.sln

Change the build type from Debug to Release. The ALL_BUILD project should be selected in the Solution Explorer, select it if this is not the case. Run the build, Build > Build ALL_BUILD.

Installing UHD

Select the INSTALL project in the Solution Explorer and run the build, Build > Build INSTALL.

Visual Studio must be run as Administrator for this to succeed as it needs write permission for the C : \ Program Files directory.

Compiling a binary installer

Building the PACKAGE project will produce a binary installer if NSIS is installed. This installer with be for either 64 bit or 32 bit as chosen during the CMake step. Select the PACKAGE project in the Solution Explorer and run the build, Build > Package.

Running UHD

Running programs using UHD requires the Visual Studio C++ Runtime Redistributable to be installed. The version of the C++ Runtime Redistributable must match the version of Visual Studio used to compile the program.

Installing the USB driver

If a USB connected USRP is used then the USB drivers must be installed. The drivers are located at http://files.ettus.com/binaries/misc/erllc_uhd_winusb_driver.zip.

There is a known issue with Windows 10 where an error message is shown at the end of driver installation. However resetting or power cycling the USRP enables full functionality.

Note on Dependencies for Current and Previous Versions

It should be noted that this guide is intended to serve as an example; the software versions and dependencies listed above are not the only possible combinations. Be sure to review the Build Dependencies in the USRP Hardware Driver and USRP Manual for information regarding the minimum required driver versions for your build of UHD. To preserve the software stack from the previous iteration of this Application Note, here is an example driver stack for Windows 7 + VS 2013:

  • Microsoft Windows 7 x64
  • Microsoft Visual Studio 2013
  • CMake 3.4.1 win32-x86
  • Boost 1.58.0 msvc-12.0 x64
  • LibUSB 1.0.20
  • Python 2.7.11
  • Mako 1.0.3
  • Doxygen 1.8
  • NSIS 2.50

GNU Radio and UHD

Building GNU Radio from source on Windows is still an involved process due to the large number of dependencies. A set of scripts have been developed to automate the process by Geof Nieboer. The links below will detail the process to building GNU Radio + UHD.

Note: The linked instructions below will build GNU Radio along with UHD, which is separate from the instructions above within this Application Note. The scripts linked below are not maintained by Ettus Research, and are considered third-party binary packages, and are not directly supported by Ettus Research.

WindowsInstall

Contents

Windows Installation [ edit ]

Binary Installers [ edit ]

There are a few different unofficial GNU Radio binary installers that are maintained by the community:

1) Geof Nieboer’s installer hosted at gcndevelopment.com. This is a binary installer for 64-bit Windows 7/8/10 that includes all dependencies for Windows, a custom python distro, commonly used SDR drivers, and several OOT blocks.

2) Radioconda installer. This binary installer tends to be the most up-to-date but currently includes fewer SDR drivers and OOT modules. It utilizes the conda package/environment manager and provides easy access to thousands of Python and other packages that are not strictly related to GNU Radio. This also lets you stay up-to-date without having to re-install. Since this provides the same conda-forge packages available without the installer, the conda install guide might be useful for additional instructions, including how to build OOT modules from source.

3) Pothos SDR development environment installer. This binary installer includes GNU Radio, Pothos, CubicSDK, and other tools. It has historically been updated about once or twice per year.

Current Windows Status [ edit ]

Installing core GNU Radio and USRP on Windows is becoming more routine. Many OoT modules may still require compiling locally. Please report any success or failures. Patches and enhancements are especially welcome!

Windows Porting Issues [ edit ]

Considerable effort has been put into making the GNU Radio code portable among various operating systems, but there are several reasons why it cannot be «simply» compiled and run under Windows:

  • The build and install procedures are based on Linux scripts and tools
  • Several third-party libraries are used, each with its own, often system-dependent, installation procedure
  • Most GNU Radio applications must interface to hardware (e.g., a sound card or USRP) which require system-dependent drivers and installation procedures
  • Because GNU Radio is written as an extension to Python, there are potential problems on Windows if different runtime libraries are used for GNU Radio and Python

The following sections show how these issues can be addressed.

Читайте также:  Усилитель звука для mac os

Installation Options [ edit ]

GNU Radio is designed to be flexible. It has a number of modules, capabilities, and options that can be enabled or disabled to suit the needs of the user, and the user can add custom blocks or modules to the system.

To support this flexibility, it comes with a set of files and scripts to be used with GNU software build tools (sh, make, autoconf, automake, etc.). These tools use Linux-like commands and filenames that are not normally available on Windows systems.

Fortunately, we are not the first to face this problem, and several solutions exist. These are presented in order of increasing difficulty:

Building on Windows with Native Tools [ edit ]

Ettus Application note [1] describes how to build from source. Similar is a post at [2] for OOT modules.

Powershell scripts are now available at https://www.github.com/gnieboer/gnuradio_windows_build_scripts that fully automate the build process for GNURadio 3.7.9.2+. A few build dependencies are required (MSVC 2015, Git, Doxygen, CMake, Perl, Wix) but all are free. The script has two options:

  1. Build all dependencies from source (including python itself)
  2. Download a prebuilt custom dependency package and then build only GNURadio and a few OOT modules on top.

The binary installers described above are built with these scripts. They ensure that all dependencies are built with the same toolchain against the same runtime libraries, and handle the patches and configuration «tweaks» needed to build them on Windows.
If option 1 is desired, note that to build scipy, the non-free Intel Fortran compiler is required, gfortran cannot build objects that can link with MSVC C objects. If you do not have said compiler, the scripts will download pre-compiled wheels instead.

More information on the build process is available on the GitHub repo readme, and also at http://www.gcndevelopment.com/gnuradio.

MinGW/MSYS [ edit ]

MinGW (http://www.mingw.org/) provides GNU compilers and Window-specific header files for compiling native Windows applications.
MSYS (http://www.mingw.org/msys.shtml) is a companion set of Linux-like commands, shell, and build tools.
MinGW does not include a Linux programming interface; programs should be smaller and faster than with Cygwin (in theory), but will require more Windows-specific code.
MSYS is intended primarily as a build environment, making it more compact than Cygwin.

Because there is no Linux API emulation, GNU Radio built with MinGW should be used with standard Windows versions of Python and the third-party libraries.
MinGW does not provide as much support as Cygwin for installing third-party libraries, but in many cases precompiled binaries are available.

For detailed installation instructions using MinGW and MSYS see Installing GNU Radio with MinGW.

Cygwin [ edit ]

Cygwin (http://www.cygwin.com/) is a Linux-like environment for Windows.
It provides the Linux-like shell, file naming, and build tools we need and also makes it easy to install many of the third-party libraries required by GNU Radio. It also provides a Linux programming interface (API); this is not required by GNU Radio, but it lets us use the better-tested Linux versions of some functions.

Because the Linux API uses its own C runtime library, it is best to use Cygwin versions of Python and the third-party libraries when building GNU Radio with Cygwin.

For detailed installation instructions using Cygwin see Installing GNU Radio with Cygwin.

Chocolatey [ edit ]

To quote from the [|https://chocolatey.org/ Chocolatey homepage]: Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind..

There are packages for gnuradio (and its dependencies) available in a separate repository (currently the best known source is: https://github.com/ariovistus/chocolatey-packages)

To install, open an Administrative command line session and run:

Now you need to install a source which has the recipes for gnuradio and dependents. The easiest method is to clone the chocolatey-packages from the github repository listed above (https://github.com/ariovistus/chocolatey-packages), then add the local source from within an Administrative command line session:

Create the numpy package:

Create the gnuradio package:

Now install the gnuradio package:

Follow the command prompts.

WSL | Ubuntu [ edit ]

Enable WSL from windows features.

Install Ubuntu from Microsoft Store.

Using the Ubuntu terminal, install gnuradio as you would on linux [3]

Install additional package «libgtk-3-dev»

Install an X server, either VcXsrv [4] or Xming [5] as WSL does not come with an X server. VcXsrv is recommended as it is open source and self-contained instead of being tied to Cygwin, whereas Xming «asks for donations» to the developer as a dubious «sale» for non-existent support.

Launch VcXsrv, making sure to select «Disable access control» option in the Extra settings so that any application can export to X11.

Edit bashrc to set up the display by adding the following line at the bottom of the file

Restart the Ubuntu terminal and run

Known Windows Build Issues [ edit ]

So far, we have workarounds for all reported problems:

Оцените статью