Skip to main content

An Intel powered Wireless Multi-tool for the IoT: Part 2

title

New front panel, LimeSDR upgrade, Pothos install and Bluetooth Low Energy demo.

This is the second post in a two part series (part 1) that looks at how an Intel Core i5 NUC, together with low cost SDR hardware and open source software, can be used to create a powerful wireless development platform for IoT applications, packaged in a familiar test equipment form factor.

The plain front panel is first replaced with one that has been engraved. The single channel SDR transceiver based on the LMS6002D is replaced with a brand new dual-channel board based on the next generation device, LMS7002M. The Pothos dataflow framework is installed next, along with the LimeSDR host driver and three excellent demo applications put together by Josh Blum.

The Pothos applications demonstrate how the hardware and software platform can be used to decode Bluetooth Low Energy packets and control a 433MHz RC mains switch. Thereby hinting at just some of the uses that it could be put to in developing and testing wireless IoT applications.

Engraved front panel

title

When we previously CNC plasma cut front and rear enclosure panels we made a few extra, so that we could later attempt to engrave these and in-fill with paint, to give a more professional look.

The engraving was carried out using a Denford Novamill that my colleague, Stuart, has previously wrote about converting to use Machinekit for control.

title

After the panel was engraved it was cleaned and dried, before filling the engraved areas with enamel paint and wiping clean. This worked out reasonably well for a first attempt.

LimeSDR

title

The BladeRF board was swapped out for LimeSDR, providing a significant upgrade to the RF capability; in short, adding a second TX and second RX port — 2x2 MIMO! — while extending coverage down to 100kHz, amongst numerous other benefits.

A new acrylic mounting plate was cut, with the LimeSDR board then attached, before securing the plate in place and connecting up the four U.FL to panel mount SMA cables.

Software strategy

We previously used the GNU Radio install management system, PyBOMBS, to install this along with the driver for the BladeRF board and gr-fosphor FFT application. However, as great as PyBOMBS is, it was decided to move to using Ubuntu packages of software instead, since this should make it just that bit simpler and quicker for an end user to update installed software.

Removing everything that PyBOMBS had installed was incredibly straightforward and simply involved running the uninstall command:

$ sudo ./pybombs uninstall

Packaged software install

Next we added the Private Package Archives (PPAs) from which we were able to install certain driver dependencies, along with GNU Radio and Pothos, plus their dependencies.

$ sudo apt-add-repository ppa:myriadrf/drivers

$ sudo apt-add-repository ppa:bladerf/bladerf

$ sudo apt-add-repository ppa:myriadrf/gnuradio

$ sudo apt-add-repository ppa:pothosware/support

$ sudo apt-add-repository ppa:pothosware/framework

$ sudo apt-add-repository ppa:keithw/glfw3

Following which we could update the APT cache and install most of the packaged software:

$ sudo apt-get update

$ sudo apt-get install build-essential git cmake sqlite3 libsqlite3-dev libusb-1.0-0-dev libwxgtk3.0-dev libqwt6-qt5 gnuradio gr-osmosdr pothos-all libpothos-dev libpothos-serialization-dev soapysdr uhd-soapysdr libsoapysdr-dev libpoco-dev

At the time of writing the gr-fosphor application is not available from the repositories, but it has been packaged for the upcoming Ubuntu 16.04 release, so the corresponding source package was downloaded, updated accordingly and built. Then installed with:

$ sudo dpkg -i libgnuradio-fosphor3.7.0_3.7.0.1.e1eb11b-1_amd64.deb gr-fosphor_3.7.0.1.e1eb11b-1_amd64.deb

$ sudo apt-get -f install

There are plans to add backported packages to the Myriad-RF GNU Radio PPA — as configured earlier — which would make installation on 14.04 much easier. However, it would probably make more sense to just install 16.04 in the first place as soon as this becomes available.

Driver install

title

The LimeSDR driver is built on top of the vendor and platform neutral SDR support library, SoapySDR. This brings with it all manner of benefits, including the ability to transparently provide access to the transceiver hardware over the network, to applications running on remote hosts. It also enables use with an extensive ecosystem of applications that support the UHDTM API.

This was built and installed with the following steps:

$ git clone https://github.com/limemicro/lms7suite.git

$ cd lms7suite

$ git checkout IconnectionIntegration

$ git submodule update --init --recursive

$ cd src/build

$ cmake ../

$ make

$ sudo make install

Note that the git branch, or indeed the repository location, may be subject to change. However, the driver will be packaged soon and available via the Myriad-RF SDR Drivers PPA.

The driver also provides an executable, lms7suite, that can be used to configure and read back registers on the LMS7002M, amongst other uses, including programming the FPGA.

title

The USB 3.0 controller can also be reprogrammed should the need arise, although this requires use of the Cypress FX3 SDK, which is free to download.

The FPGA RTL and FX3 firmware sources will both be published under open source licences, along with the LimeSDR hardware design, via the Myriad-RF initiative.

Demo install

title

The demo applications are comprised of Pothos “topologies” made up of interconnected blocks, which make use of some custom/new blocks. The topologies and blocks were installed with:

$ git clone https://github.com/DesignSparkrs/sdr-ble-demo.git

$ cd sdr-ble-demo

$ mkdir build

$ cmake ../

$ make

$ sudo make install

Setting up the Intel Edison

title

The Intel Edison with Mini Breakout board were used to generate Bluetooth Low Energy packets. These were powered from a LiPo battery pack and housed in an acrylic enclosure. A push button was added and wired up to the Edison's GPIO, in order to give us a simple external input.

The Edison was first updated with the latest Yocto Linux image, before logging in over the USB UART console to configure the hostname and WiFi etc. Next the advertise.exe program and temp-monitor.sh script from the sdr-ble-demo repository were copied across to the Edison, using scp:

$ scp -rp intel-edison/* root@blesensor.local

Transmitting Bluetooth Low Energy advertisement packets was then started with:

# ./temp-monitor.sh EA06

Whereby EA06 is the 16-bit UUID to be used in advertisements.

title

Now we have the Intel Edison transmitting BLE advertisement packets containing the SoC temperature, it was time to see if we could receive and decode these!

Running the applications

title

In addition to the Intel Edison, we have a Brennenstuhl 3600 RC mains socket with a lamp connected, so that we can test a transmit application on a different band and with a completely different waveform and system also.

The Pothos GUI application was started and the btle_printer_float32.pth topology was loaded. This tunes the frequency of the first RX channel of the LimeSDR transceiver to 2.426GHz, brings the received samples into Pothos, removes the DC component, applies low pass filtering, then performs frequency demodulation before decoding the BLE packets and printing these out.

title

Once configuration of the LimeSDR had completed, the Activate topology button was selected. Shortly afterwards we could observe Edison SoC temperature readings in the message window.

Which is pretty great, considering that no Bluetooth hardware is being used here on the receive side. We're simply capturing a slice of radio spectrum as digital samples, with all the subsequent signal processing and decoding being done in software, on the NUC's Core i5 processor.

Next the brennenstuhl_3600_control.pth topolology was loaded. This time, instead of using the LimeSDR as a signal source, it uses it as a sink and tunes the frequency to 433.92MHz. Buttons are provided which allow you to select one of four switch groups or all of them, before selecting to power these on or off. Thereby triggering the Brennenstuhl 3600 block to generate a control packets burst, which then have a low pass filtered applied before the signal is transmitted via the LimeSDR.

title

The topology was once again activated and following which the buttons could be used to switch the lamp on and off, with the transmitted signal also plotted via the Wave Monitor block.

Finally, the btle_monitor_control.pth topology combines the functionality in the previous two, while also adding the ability to configure activation and deactivation set points, which trigger the RC switch and lamp to turn on and off accordingly, as the temperature increases and decreases.

title

Accelerating IoT development

Bluetooth is obviously a standard, whereas the Brennenstuhl RC switches use their own proprietary system and the codes for these were extracted from remote captures. However, in the case of both standardised and proprietary systems, it is easy to see how SDR together with tools such as those provided by the Pothos dataflow programming suite, can be used to expedite development and even prototype integrated multi-band and multi-system solutions.

Of course, SDR is notably compute and throughput intensive, requiring a reasonably high performance host in order to support many modern wireless systems. The Intel Core i5 NUC is a great fit here, providing a 2.9GHz dual-core processor benefiting from Streaming SIMD Extensions (SSE) that are great for many DSP tasks, plus OpenGL accelerated graphics. It's compact size and support for M.2 SSD storage also making it perfect for embedded applications such as this.

The new LimeSDR board equally packs a great deal into a small space and thanks to its USB 3.0 interface will support impressive data rates when used together with a host such as the Core i5 NUC. With the onboard Altera FPGA enabling high throughput DSP tasks, such as decimation and interpolation (up/down conversion), to be carried out between the transceiver and host computer.

Final thoughts

It really is incredible to consider how it's now possible to create advanced wireless development platforms based on commodity and low cost — yet high performance — hardware, together with open source software such as GNU Radio and Pothos. With capabilities that were previously the reserve of well funded R&D labs, now within the reach of even hobbyists and experimenters.

This was a really fun project to work on and it was great to get to combine different mechanical engineering processes, together with electronics, computing and, of course, fantastic SDR software and examples from Josh, to create a pretty compelling demonstrator. Thanks again to RS Components and Intel for the opportunity, and to Lime Microsystems also for providing the LimeSDR board!

Andrew Back

Open source (hardware and software!) advocate, Treasurer and Director of the Free and Open Source Silicon Foundation, organiser of Wuthering Bytes technology festival and founder of the Open Source Hardware User Group.
DesignSpark Electrical Logolinkedin