Gnu radio companion для windows

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.

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.

Читайте также:  Microsoft windows server enterprise edition

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:

Gnu radio companion для windows

GNU Radio – the Free and Open Software Radio Ecosystem

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

GNU Radio is a free & open-source software development toolkit that provides signal processing blocks to implement software radios. It can be used with readily-available, low-cost external RF hardware to create software-defined radios, or without hardware in a simulation-like environment. It is widely used in hobbyist, academic, and commercial environments to support both wireless communications research and real-world radio systems.

Please visit the GNU Radio website at https://www.gnuradio.org/ and the wiki at https://wiki.gnuradio.org/. Bugs and feature requests are tracked on GitHub’s Issue Tracker. If you have questions about GNU Radio, please search the discuss-gnuradio mailing list archive, as many questions have already been asked and answered. Please also subscribe to the mailing list and post your new questions there.

Читайте также:  Не работает smb linux

How to Install GNU Radio

The recommended way to install GNU Radio on most platforms is using available binary package distributions.

The following command is for Debian, Ubuntu, and derivatives. Consult your distribution information to obtain the version of GNU Radio which is included.

For other operating systems and versions, see Installing from Binaries

PyBOMBS is good at building GNU Radio, UHD, and various Out of Tree (OOT) modules from source and then installing into a specified user directory rather than in the system files. PyBOMBS detects the user’s Operating System and loads all of the prerequisites in the first stage of the build.

For a quick start, open a terminal window and enter the following commands. This will install Release 3.8 with Python3.

Wait. The terminal will show the progress.

To run GNU Radio Companion, enter:

Complete PyBOMBS instructions are in the PyBOMBS README.

Complete instructions for building Gnuradio from source code are detailed in Installing GR From Source.

Some files have been changed many times throughout the years. Copyright notices at the top of source files list which years changes have been made. For some files, changes have occurred in many consecutive years. These files may often have the format of a year range (e.g., «2006 — 2011»), which indicates that these files have had copyrightable changes made during each year in the range, inclusive.

About

GNU Radio – the Free and Open Software Radio Ecosystem

Software Defined Radio — как это работает? Часть 4

В третьей части было рассказано, как получить доступ к SDR-приемнику посредством языка Python. Сейчас мы познакомимся с программой GNU Radio — системой, позволяющей создать достаточно сложную конфигурацию радиоустройства, не написав ни единой строчки кода.

Для примера рассмотрим задачу параллельного приема нескольких FM-станций на один приемник. В качестве приемника будем использовать все тот же RTL SDR V3.

Продолжение под катом.

Установка

Для начала работы GNU Radio необходимо установить, дистрибутив для Windows можно скачать здесь. Система эта кроссплатформенная, версии есть также под Linux и под OSX (вроде бы GNU Radio успешно запускали и на Raspberry Pi, но 100% гарантии дать не могу).

По сути, GNU Radio это целый фреймворк для цифровой обработки сигналов, в котором программа «собирается» из отдельных модулей. Есть большое количество уже готовых блоков, при желании также можно создавать свои собственные. Сами модули написаны на С++, а для взаимодействия блоков друг с другом используется Python. Желающие могут посмотреть на API более подробно, но на практике это, скорее всего, не пригодится — все действия можно делать визуально в программе GNU Radio Companion.

Система ориентирована на обработку потоков данных, так что каждый блок обычно имеет вход и выход. Далее, соединяя блоки в редакторе, мы получаем готовую систему. Сам интерфейс GNU Radio довольно простой, сложность состоит в понимании того, что делает тот или иной блок. Как говорилось ранее, низкоуровневая работа с SDR имеет высокий порог входа и требует некоторого знания в DSP и математике. Но мы рассмотрим простую задачу, для которой никаких специальных знаний не потребуется. Итак, приступим.

Начало работы

Запускаем GNU Radio Companion, создаем новый проект, тип проекта выбираем WX GUI, добавляем на экран и соединяем два блока, как показано на скриншоте.

Мы видим два типа блоков — Source (источник) и Sink (выход, «слив»). RTL-SDR — это наш приемник, FFT GUI — это виртуальный спектроанализатор.

Переменную Sample Rate устанавливаем в 2048000, это частота дискретизации нашего приемника. Частоту RTL-SDR оставляем по умолчанию равной 100МГц.

Запускаем проект — все работает, мы видим спектр FM-станций. Первая программа для GNU Radio готова!

Если мы посмотрим лог, то увидим такие строки.

Generating: ‘D:\\MyProjects\\GNURadio\\top_block.py’
Executing: C:\Python27\python.exe -u D:\MyProjects\GNURadio\top_block.py

Да, мы можем посмотреть файл top_block.py, который сгенерил нам GNU Radio Companion. Истинные джедаи могут писать непосредственно в Python, но требуемый код, как мы видим, довольно большой. Мы же создали его за 1 минуту.

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

Так что в принципе, это можно написать вручную. Но мышью оно все-таки быстрее. Хотя возможность поменять код иногда может пригодиться, если захочется добавить какую-то нестандартную логику.

Читайте также:  Операционные системы windows sp3

Принимаем FM-радио

Теперь попробуем принять одну из станций. Как было видно из скриншотов, центральная частота приемника 100МГц и ширина полосы пропускания около 2МГц. На спектре мы видим две станции, на 100.1МГц и 100.7МГц соответственно.

Первым шагом необходимо перенести спектр станции в центр, сейчас он отстоит вправо на 100КГц. Для этого вспоминаем школьную формулу умножения косинусов — в результате будет две частоты, сумма и разность — нужная станция сдвинется в центр, что нам и нужно (а лишнее мы потом отфильтруем).

Создаем две переменные для хранения частоты freq_center=100000000 и freq_1=100100000, также добавляем генератор сигналов с частотой freq_center — freq_1.

Т.к. система построена на базе Python, то в полях ввода параметров мы можем использовать выражения, что достаточно удобно.

Схема в итоге должна выглядеть так:

Теперь необходимо добавить сразу несколько блоков — уменьшить тактовую частоту входного сигнала (она равна 2048КГц), отфильтровать сигнал, подать его на FM-декодер, затем еще раз уменьшить тактовую частоту до 48КГц.

Результат показан на картинке:

Считаем внимательно. Мы делим тактовую частоту 2048КГц в 4 раза блоком Rational Resampler (получаем 512КГц), затем после Low Pass фильтра стоит WBFM-декодер с децимацией 10 (получаем 51.2КГц). В принципе, этот сигнал уже можно подать на звуковую карту, но высота тона будет чуть отличаться. Еще раз меняем тактовую частоту в 48/51, в результате будет тактовая частота 48.2КГц, разницей уже можно пренебречь.

Второй важный момент — тип входов. С приемника поступает комплексный IQ-сигнал (входы-выходы синего цвета), с FM-декодера выходит вещественный сигнал — входы и выходы желтого цвета. Если перепутать, ничего не заработает. Подробнее уже было на Хабре, нам достаточно понять общий принцип.

В общем, запускаем, убеждаемся что все работает. Можно запустить программу и слушать радио. Мы пойдем дальше — у нас же все-таки Software Defined радио — добавим одновременный прием второй станции.

Многоканальный прием

Второй приемник добавляется любимым программистским методом — Ctrl+C/Ctrl+V. Добавляем переменную freq_2, копируем блоки и соединяем их точно также.

Результат вполне сюрреалистичный — две FM-станции можно слушать одновременно. Тем же самым методом (Ctrl+V) можно добавить и третью станцию.

Запись

Слушать две станции оригинально, но на практике мало полезно. Сделаем что-то более нужное, например добавим запись звука в отдельные файлы. Это может быть достаточно удобно — с одного физического приемника можно параллельно записывать несколько каналов.

Добавим к каждому выходу компонент File Sink, как показано на скриншоте.

Windows-версия почему-то требует абсолютные пути файлов, иначе запись не работает. Запускаем, убеждаемся что все нормально. Размер сохраняемых файлов довольно большой, т.к. по умолчанию записывается формат float. Запись в формате int оставлю читателям в качестве домашнего задания.

Получившиеся файлы можно открыть в Cool Edit и убедиться, что звук записался нормально.

Разумеется, число записываемых каналов можно увеличить, оно ограничено только полосой пропускания приемника и мощностью компьютера. Кроме File Sink можно использовать и UDP Sink, так что программу можно использовать для трансляции по сети.

Запуск из командной строки

И последнее. Если использовать программу автономно, например для многоканальной записи, то UI в принципе и не нужен. В верхнем левом блоке Options меняем параметр Run Options на No UI. Запускаем программу еще раз, убеждаемся что все работает. Теперь сохраняем сгенерированный файл top_block.py — мы можем просто запускать его из командной строки, например из bat-файла или из консоли.

Если кому интересно, сгенерированный файл сохранен под спойлером.

Удобно и то, что система является кросс-платформенной, и получившаяся программа может работать на Linux, Windows и OSX.

Заключение

Можно сказать, что GNU Radio достаточно сложная система, не в плане рисования блоков конечно, а в плане понимания того, как все это работает. Но какие-то несложные вещи сделать вполне посильно и интересно. GNU Radio также удобно использовать как «виртуальную лабораторию» для обучения — к любой части схемы можно подключить виртуальный осциллограф или спектроанализатор и посмотреть, как выглядит сигнал.

Если не будет каких-то отдельных пожеланий, тему SDR-приема наверно можно закрыть — все основные моменты уже рассмотрены, да и количество просмотров от первой к третьей части падает почти по экспоненте (хотя еще можно написать про передачу, но оно требует более дорогого «железа» для тестов чем RTL SDR). Надеюсь все же, что некоторое понимание того как это работает, у читателей осталось. Ну и всем удачных экспериментов.

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