LimeSDR 上手指南

1. 163 source
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse


2. ubuntu 18 chinese
sudo apt install ibus-pinyin


sudo apt install fcitx
sudo apt-get install fcitx fcitx-googlepinyin

3. LimeSDR 上手指南
https://zhuanlan.zhihu.com/p/43645629

https://www.cnblogs.com/k1two2/p/6702353.html

3.1 uhd
Wiki:http://files.ettus.com/manual/page_build_guide.html
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-mako doxygen python-docutils cmake build-essential git
git clone https://github.com/EttusResearch/uhd
or
git clone https://gitee.com/xxJian/uhd
cd uhd
cd host && mkdir build && cd build
cmake ../
make -j4
sudo make install
sudo ldconfig

3.2 安装SoapySDR
Wiki:https://github.com/pothosware/SoapySDR/wiki/BuildGuide
sudo apt-get install cmake g++ libpython-dev python-numpy swig
git clone https://github.com/pothosware/SoapySDR.git
or
git clone https://gitee.com/xxJian/SoapySDR
cd SoapySDR
git pull origin master
mkdir build && cd build
cmake ..
make -j4
sudo make install
sudo ldconfig

3.3 安装SoapyUHD
Wiki:https://github.com/pothosware/SoapyUHD/wiki
git clone https://github.com/pothosware/SoapyUHD.git
or
git clone https://gitee.com/xxJian/SoapyUHD
cd SoapyUHD
mkdir build && cd build
cmake ..
make
sudo make install

3.4 安装LimeSuite
Wiki:http://wiki.myriadrf.org/Lime_Suite
#sudo add-apt-repository -y ppa:myriadrf/drivers
#sudo apt-get update
sudo apt-get install git g++ cmake libsqlite3-dev libsoapysdr-dev libi2c-dev libusb-1.0-0-dev libwxgtk3.0-dev freeglut3-dev
git clone https://github.com/myriadrf/LimeSuite.git
or
git clone https://gitee.com/xxJian/LimeSuite
cd LimeSuite
mkdir builddir && cd builddir
cmake ../
make -j4
sudo make install
sudo ldconfig

3.5 输入下列命令使非ROOT用户可以访问LimeSDR这样基于USB的设备

$ cd LimeSuite/udev-rules
$ sudo sh ./install.sh
LimeUtil -- info
SoapySDRUtil --info
SoapySDRUtil --find
uhd_find_devices

3.6 安装GNU Radio、gr-osmosdr

Wiki:https://www.gnuradio.org/doc/doxygen/build_guide.html

3.6.1 从源码构建(失败,请跳至3.6.5)

sudo apt-get -y install git-core cmake g++ python-dev swig \
pkg-config libfftw3-dev libboost-all-dev libcppunit-dev libgsl0-dev \
libusb-dev libsdl1.2-dev python-wxgtk3.0 python-numpy \
python-cheetah python-lxml doxygen libxi-dev python-sip \
libqt4-opengl-dev libqwt-dev libfontconfig1-dev libxrender-dev \
python-sip python-sip-dev python-qt4 python-sphinx libusb-1.0-0-dev \
libcomedi-dev libzmq-dev
git clone --recursive https://github.com/gnuradio/gnuradio.git
or
git clone --recursive https://gitee.com/xxJian/gnuradio
cd gnuradio && mkdir build && cd build
#######################################################################
3.6.2 插曲:cmake error: no pybind11
git clone https://gitee.com/brt2/pybind11


pip install pytest
sudo apt install python3-pip
pip3 install pytest
mkdir ~/.pip
vim ~/.pip/pip.conf
    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
mkdir build
cd build
cmake ..
make -j4
sudo make install

3.6.3 volk
git clone https://gitee.com/xxJian/volk
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make test
$ sudo make install

# volk_profile will profile your system so that the best kernel is used
$ volk_profile

3.6.4 log4cpp
自行到http://log4cpp.sourceforge.net/下載源碼包
下载源码包 log4cpp-1.1.2rc1.tar.gz
$tar xzvf log4cpp-1.1.2rc1.tar.gz
$cd log4cpp
sudo su
$./configure --with-pthreads
$make
$make check
$make install


cmake ../
make -j5
make test
sudo make install

3.6.5 從源碼編譯卡在了log4cpp這個包了。於是用apt安裝的方法:
sudo apt insatll gnuradio
在Activites中手动打开gnu radio,看到版本是3.7.11


3.6.6 gr-limesdr plugin for gnuradio
参考:https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio
sudo apt-get install libboost-all-dev swig
sudo apt-get install gnuradio-dev
git clone https://gitee.com/xxJian/gr-limesdr
To build and install for GNURadio3.7 enter the following commands in terminal:

cd gr-limesdr
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

3.6.7 dvbt
git clone https://github.com/BogdanDIA/gr-dvbt.git
or
git clone https://gitee.com/xxJian/gr-dvbt
cd gr-dvbt
mkdir build
cd build
cmake ../
make && sudo make install
if gr-dvbt is installed for the first time:
sudo ldconfig

然后是sdr-example
git clone https://github.com/argilo/sdr-examples

 然后在sdr-example文件夹里

---------------------------------------------------------------------------
3.6.7 安装gr-osmosdr支持包

Wiki:http://osmocom.org/projects/gr-osmosdr/wiki

$ sudo apt-get install libsoapysdr-dev gr-fcdproplus

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

https://wiki.gnuradio.org/index.php/InstallingGR#Step_1:_Installing_Dependencies
For Ubuntu 18.04

An easy way to install GNU Radio 3.8 on many Ubuntu systems is to use the following commands (note that this skips the setup for UHD hardware):

    sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-pip
    pip3 install git+https://github.com/pyqtgraph/pyqtgraph@develop
    pip3 install numpy scipy
    echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH' >> ~/.bashrc
    echo 'export LD_LIBRARY_PATH=/user/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
    echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:usr/local/lib/python2.7/site-packages:$PYTHONPATH' >> ~/.profile
    echo 'export LD_LIBRARY_PATH=/user/local/lib:$LD_LIBRARY_PATH' >> ~/.profile
    cd ~/
    git clone --recursive https://github.com/gnuradio/gnuradio
    cd gnuradio
    git checkout maint-3.8
    mkdir build
    cd build
    git pull --recurse-submodules=on
    git submodule update --init
    cmake -DENABLE_GR_UHD=OFF ..
    make -j $(nproc --all)
    sudo make install
    sudo ldconfig

3.7 srsLTE
參考:LimeSDR srsLTE实验,https://blog.csdn.net/OpenSourceSDR/article/details/1057079412
(1)依赖包安装
sudo apt-get install git cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libboost-thread-dev libconfig++-dev libsctp-dev

(2)下载、编译、安装srsLTE
git clone https://gitee.com/xxJian/srsLTE
cd srsLTE
mkdir build
cd build
cmake ../
make -j4
----------------
SoapySDR引用文件的默認路徑是/usr/local/include/SoapySDR,要移動到/usr/include/SoapySDR,編譯srsLTE才不會報錯。否則會提示找不到Type.h的
make test
sudo make install
srslte_install_configs.sh user
(3)基本测试srsLTE
cd build/lib/examples
 
./pdsch_enodeb

3.8 LTE实验操作
在一台电脑上运行srsENB和srsEPC【电脑插上一个LimeSDR-USB】,你自己的手机作为srsUE来接入LimeSDR搭建的LTE基站。srsENB和srsEPC配置在同一台计算机上运行(即核心网与eNodeB基站运行在同一台电脑+LimeSDR上),手机作为UE终端。
3.8.1 修改默认配置文件

cp srsepc/epc.conf.example build/srsepc/epc.conf
cp srsepc/user_db.csv.example build/srsepc/user_db.csv

cp srsenb/drb.conf.example build/srsenb/drb.conf
cp srsenb/enb.conf.example build/srsenb/enb.conf
cp srsenb/rr.conf.example build/srsenb/rr.conf

未完,待续。

dvbt的例子未跑完。gr-limesdr的例子未跑。srsLTE例子未跑。OpenAirInterface的例子未跑。

特别鸣谢老邵的开源世界

猜你喜欢

转载自blog.csdn.net/qq_27158179/article/details/107574597