Skip to content
Josh Blum edited this page Feb 12, 2016 · 33 revisions

Pothos SDR environment tutorial

This tutorial will guide users through downloading and installing the pre-built Windows Pothos SDR development environment. Users will make sure that their SDR devices are installed properly and can communicate with the environment. And finally, the tutorial will cover building a simple visualization application in the Pothos GUI. Lets get started!

http://i.imgur.com/439SXp1.png

Note 1: Some users may get the following message: Warning! PATH too long installer unable to modify PATH! There is a known issue with the NSIS installer where it cannot modify the PATH environment variable over a certain length. The workaround is to manually modify the PATH to contain the bin directory (example C:\PothosSDR\bin). A program like Rapid Environment Editor can make it easy to edit very long PATH environment variables.

Note 2: Some of the pre-built DLLs used to build this environment (such as pthreads) require the Visual Studio 2010 x64 Runtime to be installed. This is a very small package and many systems will already have it installed. If you get an error about "msvcr110.dll", this missing runtime is probably the cause.

http://i.imgur.com/87e5Oib.png

Once the development environment is installed, you should ensure that your SDR device is visible to the system. Typically this step involves installing system drivers (PCIe/USB) or configuring network interfaces, depending upon your device's PC interface. Since its not possible to document the instructions for every device and every driver here, we recommend following the instructions from the manufacturer's website or the device driver's home page.

USB-based SDR devices typically use libusb. The first thing to do for a USB device is to make it available under libusb using Zadig. Simply attach your SDR device via USB and run Zadig on every unrecognized device. A copy of Zadig is included in the start menu shorcuts for the development environment.

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/start_menu.png

Standard command line utilities for your device will be available in C:\PothosSDR\bin In the example below, we use rtl_eeprom.exe to demonstrate that the RTL device can be detected and communicated with through its device driver.

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/rtl_eeprom.png

Next, we will confirm that Soapy SDR can find your device on the system. If Soapy SDR can locate the device, then it will be usable within Pothos through the SDR source and sink blocks. After installing the device's system drivers or configuring the network interface appropriately (as per the manufacturer instructions), use the SoapySDRUtil.exe command line utility to locate the device:

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/soapy_find.png

Once the device can be found on the system through the SoapySDRUtil.exe, it can be instantiated using the same discovered key/value identifiers:

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/soapy_make.png

Lets get started by visualizing sample data from the SDR device!

Launch the Pothos GUI from the start menu or Desktop short-cut (this was an installer option). Or open C:\PothosSDR\bin in the windows explorer and double click on the PothosGui.exe launcher:

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/pothos_launch.png
  • Users may get a warning about firewall rules when launching the Pothos GUI. The GUI launches various sub-processes and communicates with them over TCP. Make sure to allow the firewall exception for Pothos GUI for proper operation.
  • Pothos may print an initialization error about loading the Python support module. This is a harmless error that happens when the Python environment is not installed. To create and use Python-based processing IP, read more in the development section.

To visualize spectrum, we will the SDR source block for collecting samples, and the Spectrogram plotter for visualizing the sample stream. Locate these blocks in the block tree using the search feature, drag and drop them into the editor, and connect the source to the plotter.

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/source_dnd.png

Before continuing, the SDR source block must be configured. Double click on the source block, and enter the desired device arguments, sample rate, gain, and tune frequency. Device arguments are key/value pairs used to identify a specific device. If this is the only SDR device on the system, then empty brackets "{}" will suffice. Read more about the block properties on the SDR blocks tutorial.

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/properties_panel.png

After instantiating, configuring, and connecting both blocks, right click on the editor and select "Insert graph widgets" to insert the plotter. Then click "Activate topology" in the toolbar or menu to visualize the spectrum.

https://raw.githubusercontent.com/wiki/pothosware/PothosSDR/images/simple_plotter.png http://i.imgur.com/tNFnezY.png
  • Checkout the Pothos GUI tutorial to learn about instantiating and connecting blocks, inserting graphical widgets, and much more.
  • Looking for example topologies and demonstration applications? Checkout projects on the Pothos demos wiki page.
  • Interested in creating custom processing blocks or driver development? Checkout the Developing IP wiki page.