2018년 12월 2일 일요일

Install OpenLTE on Ubuntu wih USRP B210

referred from https://www.tansokun920.com/entry/2018/05/30/232201

1. Prerequisite
- USRP B210 (strong recommendation, you can use your own USRP or SDR, but it needs some level of modification).
- Powerful computer (CPU Intel i5, i7 or equivalent / RAM 8GB+ / USB3.0 interface / Ubuntu 14.04 or later).

2. You have to know
- Using licensed spectrum without permission is ILLEGAL on most of the countries in the world.

3. Install Ubuntu
- I installed Ubuntu 16.04, (I tried 14.04, 17.04, 18.04 - unless you have special preference you 16.04 just use 16.04 it will save your days maybe weeks).
- Don't use VM, its performance drops dramatically in VM.

4. Install OpenLTE
Once your Ubuntu is ready, you can install openLTE, basically follows below.
https://sourceforge.net/p/openlte/wiki/Home/
https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux

4.1 install GNURADIO
- $sudo apt-get update
-$sudo apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.13-0v5 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git-core libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4 cmake git-core wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq

*modify the command based on your Ubuntu version (https://kb.ettus.com/Building_and_Installing_the_USRP_OpenSource_Toolchain_(UHD_and_GNU_Radio)_on_Linux)

4.1.1 Building and installing UHD from source code
-4.1.1.1, make a folder to hold the repository.
      cd $HOME mkdir workarea-uhd cd workarea-uhd

-4.1.1.2, clone the repository and change into the cloned directory.
      git clone https://github.com/EttusResearch/uhd cd uhd

-4.1.1.3, checkout the desired UHD version. You can get a full listing of tagged releases by running the command:
      git tag -l
      
      Example truncated output of git tag -l:
$ git tag -l ... release_003_009_004 release_003_009_005 release_003_010_000_000

      Example: For UHD 3.11.0.1: (*what I did and working version)
      git checkout release_003_011_000_001

-4.1.1.4, create a build folder within the repository.
      cd host mkdir build cd build

-4.1.1.5, invoke CMake to create the Makefiles.
      cmake ../

-4.1.1.6, run Make to build UHD.
      make

-4.1.1.7, you can optionally run some basic tests to verify that the build process completed properly.
   make test 
 
-4.1.1.8, install GNU Radio, using the default install prefix, which will install GNU Radio under the /usr/local/lib folder. You need to run this as root due to the permissions on that folder.
      sudo make install

-4.1.1.9, update the system's shared library cache.
   sudo ldconfig
 
-4.1.1.10, make sure that the LD_LIBRARY_PATH environment variable is defined and includes the folder under which UHD was installed. Most commonly, you can add the line below to the end of your $HOME/.bashrc file:
      export LD_LIBRARY_PATH=/usr/local/lib

-4.1.1.11 If the LD_LIBRARY_PATH environment variable is already defined with other folders in your $HOME/.bashrc file, then add the line below to the end of your $HOME/.bashrc file to preserve the current settings.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

-4.1.1.12 For this change to take effect, you will need to close the current terminal window, and open a new terminal.
At this point, UHD should be installed and ready to use. You can quickly test this, with no USRP device attached, by running uhd_find_devices. You should see something similar to the following.
       uhd_find_devices

Below is my example, mine is B210
       [INFO] [UHD] linux; GNU C++ version 5.4.0 20160609; Boost_105800;      UHD_3.11.0.HEAD-0-ga1b5c4ae
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: XXXXXXXX
    name: MyB210
    product: B210
    type: b200


4.1.2 Configuring USB
On Linux, udev handles USB plug and unplug events. The following commands install a udev rule so that non-root users may access the device. This step is only necessary for devices that use USB to connect to the host computer, such as the B200, B210, and B200mini. This setting should take effect immediately and does not require a reboot or logout/login. Be sure that no USRP device is connected via USB when running these commands.
    cd $HOME/workarea-uhd/uhd/host/utils
    sudo cp uhd-usrp.rules /etc/udev/rules.d/
    sudo udevadm control --reload-rules sudo udevadm trigger

4.1.3 Connect the USRP
The installation of UHD and GNU Radio should now be complete. At this point, connect the USRP to the host computer.
If the interface is USB, then open a terminal window, and run "lsusb". You should see the USRP listed on the USB bus with a VID of 2500 and PID of 0020, 0021, 0022, for B200, B210, B200mini, respectively. Also try running "uhd_find_devices" and "uhd_usrp_probe".

4.2. Install PolarSSL 
4.2.1 recommended command but failed in my case
$ sudo apt-get install libpolarssl-dev

wget  http://launchpadlibrarian.net/195987839/libpolarssl7_1.3.9-2.1_amd64.deb
wget http://launchpadlibrarian.net/195987837/libpolarssl-dev_1.3.9-2.1_amd64.deb
$ sudo dpkg -i libpolarssl7_1.3.9 -2.1_ amd64 . deb
$ sudo dpkg -i libpolarssl-dev_1.3.9-2.1_ amd64 . deb

4.3 Install openLTE
Download latest version from the link https://sourceforge.net/projects/openlte/files/
- I downloaded "openlte_v00-20-05.tgz" and unzip it
- tar -xvzf openlte_v00-20-05.tgz

4.4 Install osmocom Gnu Radio Blocks
https://osmocom.org/projects/gr-osmosdr/wiki/GrOsmoSDR

GNURADIO INSTALL
https://github.com/gnuradio/gnuradio

$pybombs prefix init ~/prefix/default/ --> $pybombs prefix init /home/ai2s/prefix
 


댓글 없음: