天天看点

在Ubuntu上面安装支持LimeSDR的GNURadio

为了帮助大家更好的使用LimeSDR和GNURadio

文章最后有python安装脚本!

测试安装环境,Ubuntu16.04LTS, LImeSDR带有LMS7002M

已测试树莓派ubuntu mate(ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi),ubuntu server(ubuntu-16.04-preinstalled-server-armhf+raspi3)系统可用GUNRadio和LimeSDR,但是WX插件不能用。

软件结构:

在Ubuntu上面安装支持LimeSDR的GNURadio

source: http://wiki.myriadrf.org/Lime_Suite

在Ubuntu上面安装支持LimeSDR的GNURadio

source: https://myriadrf.org/blog/limesdr-application-ecosystem/

根据上图,limesuite是driver,需要首先安装。

1, 安装limesuite

sudo add-apt-repository -y ppa:myriadrf/drivers
sudo apt-get update
sudo apt-get install limesuite liblimesuite liblimesuite-dev limesuite-udev limesuite-images
sudo apt-get install soapysdr soapysdr-module-lms7
           

2,安装SoapySDR

     添加PPA

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

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

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

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

sudo add-apt-repository -y ppa:ettusresearch/uhd

sudo apt-get update
           

     安装依赖

sudo apt-get install python-dev swig
           

    添加Pothos和toolkits

sudo apt-get install pothos-all

sudo apt-get install python-pothos

sudo apt-get install python3-pothos

sudo apt-get install pothos-python-dev
           

    安装Soapy SDR runtime

sudo apt-get install soapysdr

sudo apt-get install python-soapysdr python-numpy

sudo apt-get install python3-soapysdr python3-numpy

sudo apt-get install soapysdr-module-remote soapysdr-server
           

    安装Soapy SDR驱动

sudo apt-get install osmo-sdr soapysdr-module-osmosdr

sudo apt-get install rtl-sdr soapysdr-module-rtlsdr

sudo apt-get install bladerf soapysdr-module-bladerf

sudo apt-get install hackrf soapysdr-module-hackrf

sudo apt-get install uhd-host uhd-soapysdr soapysdr-module-uhd

sudo apt-get install umtrx uhd-host uhd-soapysdr soapysdr-module-uhd

sudo apt-get install miri-sdr soapysdr-module-mirisdr

sudo apt-get install soapysdr-module-rfspace

sudo apt-get install airspy soapysdr-module-airspy
           

    可选:测试安装

PothosUtil --system-info

SoapySDRUtil --info
           

3,安装GNURadio的依赖

sudo apt-get -y install git cmake libboost-dev libcppunit-dev libfftw3-dev python-numpy doxygen python-cheetah python-gtk2-dev python-qt4 python-qwt5-qt4 libxi-dev libqt4-opengl-dev libqwt5-qt4-dev python-lxml
           

4,安装GNURadio

sudo apt-get install gnuradio
           

5,安装gr-osmosdr 的支持包

sudo apt-get install libsoapysdr-dev

sudo apt install gr-fcdproplus
           

6,编译安装gr-osmosdr 

git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../
make
sudo make install
sudo ldconfig
           

安装之后,会看到Soapysdr support在enable里。

在Ubuntu上面安装支持LimeSDR的GNURadio
在Ubuntu上面安装支持LimeSDR的GNURadio
在Ubuntu上面安装支持LimeSDR的GNURadio

注意:第一打开会提示Xterm is missing。 

解决办法:

sudo vi /etc/gnuradio/conf.d/grc.conf
xterm_executable = 1
           

Python安装脚本,帮助大家更快的安装。

#!/usr/bin/env python
#coding=utf-8

import shlex
import subprocess
aa = ['sudo add-apt-repository -y ppa:myriadrf/drivers', \
 'sudo apt-get update', \
 'sudo apt-get -y install limesuite liblimesuite17.06-1 liblimesuite-dev limesuite-udev limesuite-images', \
 'sudo apt-get -y install soapysdr soapysdr-module-lms7',\
 'sudo add-apt-repository -y ppa:pothosware/framework',\
 'sudo add-apt-repository -y ppa:pothosware/support',\
 'sudo add-apt-repository -y ppa:myriadrf/drivers',\
 'sudo add-apt-repository -y ppa:bladerf/bladerf',\
 'sudo add-apt-repository -y ppa:ettusresearch/uhd',\
 'sudo apt-get update',\
 'sudo apt-get -y install python-dev swig'\
 'sudo apt-get -y install pothos-all',\
 'sudo apt-get -y install python-pothos',\
 'sudo apt-get -y install python3-pothos',\
 'sudo apt-get -y install pothos-python-dev'\
 'sudo apt-get -y install soapysdr',\
 'sudo apt-get -y install python-soapysdr python-numpy',\
 'sudo apt-get -y install python3-soapysdr python3-numpy',\
 'sudo apt-get -y install soapysdr-module-remote soapysdr-server',\
 'sudo apt-get -y install osmo-sdr soapysdr-module-osmosdr',\
 'sudo apt-get -y install rtl-sdr soapysdr-module-rtlsdr',\
 'sudo apt-get -y install bladerf soapysdr-module-bladerf',\
 'sudo apt-get -y install hackrf soapysdr-module-hackrf',\
 'sudo apt-get -y install uhd-host uhd-soapysdr soapysdr-module-uhd',\
 'sudo apt-get -y install umtrx uhd-host uhd-soapysdr soapysdr-module-uhd',\
 'sudo apt-get -y install miri-sdr soapysdr-module-mirisdr',\
 'sudo apt-get -y install soapysdr-module-rfspace',\
 'sudo apt-get -y install airspy soapysdr-module-airspy',\
 'PothosUtil --system-info',\
 'SoapySDRUtil --info',\
 'sudo apt-get -y install git cmake libboost-dev libcppunit-dev libfftw3-dev python-dev swig python-numpy doxygen python-cheetah python-gtk2-dev python-qt4 python-qwt5-qt4 libxi-dev libqt4-opengl-dev libqwt5-qt4-dev python-lxml',\
 'sudo apt-get -y install gnuradio',\
 'sudo apt-get -y install libsoapysdr-dev',\
 'sudo apt-get -y install gr-fcdproplus',
 ]
for i in aa:
	args=shlex.split(i)
	p=subprocess.Popen(args)
	p.wait()

sub = subprocess.call('git clone git://git.osmocom.org/gr-osmosdr && cd gr-osmosdr/ && mkdir build && cd build && cmake .. && make && sudo make install && sudo ldconfig', shell=True)
if sub == 0:
	print 'Sucessfull!'
           

参考:

https://github.com/osmocom/gr-osmosdr
http://osmocom.org/projects/sdr/wiki/GrOsmoSDR
https://gnuradio.org/doc/doxygen/build_guide.html
https://myriadrf.org/blog/limesdr-application-ecosystem/
http://wiki.myriadrf.org/Lime_Suite
https://github.com/pothosware/pothos/wiki/Ubuntu
https://github.com/pothosware/SoapySDR/wiki/PythonSupport
https://github.com/pothosware/SoapySDR/wiki