LimeSDR环境安装与测试

五迷三道 提交于 2020-12-19 18:46:11

虚拟机:ubuntu虚拟机建议4g内存,64g硬盘,usb3.0已开启     //否则编译过程耗尽内存

1 换阿里云源(加速)
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

2 官方命令--limesuite和soapysdr安装
sudo add-apt-repository -y ppa:myriadrf/drivers
sudo apt-get update
sudo apt-get install limesuite liblimesuite-dev limesuite-udev limesuite-images
sudo apt-get install soapysdr soapysdr-module-lms7

3 探测命令
#make sure that STREAM is one of the available connections
LimeUtil --info
#now run LimeUtil with --find to locate devices on the system
LimeUtil --find

或者

#Example print output from LimeUtil
* [module=STREAM, media=USB, name=USB 3.0 (LimeSDR-USB), addr=241:1204]
Similarly, when working with SDR ecosystem applications, its also good to verify that the LimeSDR can be found by SoapySDRUtil:

#make sure that lime is one of the available factories
SoapySDRUtil --info

#now run SoapySDRUtil with --find to locate devices on the system
SoapySDRUtil --find                    //发现lime
SoapySDRUtil --probe=lime                  //连接lime

4 pybombs切换清华源(安装gnuradio会快很多)
apt-get install git python-pip cmake
pip install pybombs
pybombs recipes remove gr-recipes
pybombs recipes remove gr-etcetera
pybombs recipes add gr-recipes git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-recipes.git
pybombs recipes add gr-etcetera git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-etcetera.git
make /root/gnuradio-prefix
cd /root/gnuradio-prefix
pybombs prefix init

5 安装,设置环境变量,并启动gnuradio
pybombs install gnuradio
source /root/gnuradio-prefix/setup_env.sh
gnuradio-companion
开机自动设置环境变量,把source命令写入/etc/profile文件,这样每次开机都会自动设置环境变量。
$ echo 'source /root/gnuradio-prefix/setup_env.sh'>>/etc/profile

6 源码安装gr-osmosdr                  //不建议pybombs安装
首先 安装gr-osmosdr 的支持包
sudo apt-get install libsoapysdr-dev
sudo apt install gr-fcdproplus
接下来clone源码
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../
make
sudo make install
sudo ldconfig

7 测试limesdr执行gnuradio
网上找的grc示例
wget http://www.0xroot.cn/SDR/signal-record.grc
gnuradio-companion signal-record.grc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!