ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

OpenAirInterface实战

OpenAirInterface实战 OpenAirInterface是由法国 EURECOM 发起的、基于 3GPP 标准协议栈的软件无线电 SDR 平台。Gitlab下载地址从 EURECOM 维护的 GitLab 上下载https://gitlab.eurecom.fr/oai/openairinterface5g.git本篇博客基于tag 2022-w13版本。编译下载完成后 OAI 的编译可以在 cmake_targets 文件夹中通过 build_oai 工具进行build_oai 为执行脚本可以用以下命令查看编译选项./build_oai-h#########The-Ioption is toinstallpre-requisites, you only need it the firsttimeyou build the softmodem or when some oai dependencies have changed. The-woption is toselectthe radioheadsupport you want to includeinyour build. Radioheadsupport is provided via a shared library,whichis called theoai deviceThe build script creates a softlinkfrom liboai_device.so to thetruedevicewhichwill be used at run-time(here the USRP one, liboai_usrpdevif.so). The RF simulatorRF simulator is implemented as a specific device replacing RF hardware, it can be specifically built using-wSIMU option, but is also built during any softmodem build.--eNBis to build the lte-softmodem executable and all required shared libraries--gNBis to build the nr-softmodem and nr-cuup executables and all required shared libraries--UEis to build the lte-uesoftmodem executable and all required shared libraries--nrUEis to build the nr-uesoftmodem executable and all required shared libraries--ninjais to use the ninja build tool,whichspeeds up compilation.-cis to clean the workspace and force a complete rebuild.编译安装依赖项项目首次需要用 -I 命令编译安装依赖项之后环境未改变的话只需要进行一次。部分库需要从网上下载。因为本机靠代理上网需先在命令行配置下代理若直接上网则不需要exporthttp_proxy代理地址端口exporthttps_proxy代理地址端口安装依赖项sudo-E./build_oai-I编译UEseNodeB 和 gNodeB可执行文件这里先选择使用 -w SIMU即使用RF simulator不需要实体的射频硬件例如 USRP :./build_oai-wSIMU--eNB--UE--nrUE--gNB编译完成后可执行文件在 targets/bin 下面。编译其他工具OAI还提供软件scope图形工具等其他辅助工具可以使用下面命令一起编译./build_oai --build-lib all若要开启scope图形功能之前步骤2需要添加选项 -x./build_oai-wSIMU--eNB--UE--nrUE--gNB-xRFSIM模拟示例使用 RF simulator 不需要实体的射频器件说明参考https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/radio/rfsimulator/README.md参数说明-O基站侧小区配置文件样例在targets/PROJECTS下--rfsim开启射频仿真时追加参数 --rfsim--rfsimulator.serveraddrserver为服务器模式作为客户端用配服务器ip地址默认模式为客户端模式地址127.0.0.1本机--phy-test无随机接入会在本地生成两个文件 reconfig.raw, rbconfig.raw, 为rrc的配置信息-d开启软件示波器功能示例# gNB 侧主机使用sudo./targets/bin/nr-softmodem.Rel15-O./targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf--rfsim--rfsimulator.serveraddrserver --phy-test-d# nrUE 侧主机使用假如 gNB 主机ip地址为192.168.0.1# reconfig.raw, rbconfig.raw 两个文件需要拷贝到nrUE 侧主机运行路径下sudo./target/bin/nr-uesoftmodem.Rel15--rfsim--rfsimulator.serveraddr192.168.0.1 --phy-test-dUSRP模拟示例测试USRP驱动UHD版本为3.15基站侧使用B210脚本使用gnb.band78.tm1.106PRB.usrpb210.conf对应40 MHz信号带宽UHD3.15 安装流程安装依赖库sudoapt-get-yinstallgitswig 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.14-0 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.0gitlibqt4-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 libqwtplot3d-qt5-dev pyqt4-dev-tools python-qwt5-qt4 cmakegitwgetlibxidev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq3-dev libzmq5 python-requests python-sphinx libcomedi-dev python-zmq libqwt-dev libqwt6abi1 python-six libgps-dev libgps23 gpsd gpsdclients python-gps python-setuptools本地编译安装UHDgitclone https://github.com/EttusResearch/uhdcduhdgitcheckout UHD-3.15.LTScdhostmkdirbuildcdbuild cmake../makemaketestsudomakeinstallsudoldconfig将image文件复制到 /user/local/share/uhd/images 下可以从官网下载在baschrc里设置环境变量exportUHD_IMAGES_DIR/user/local/share/uhd/images服务器连接上USRP后可以用 uhd_find_devices 命令寻找USRP可能会出现以下错误可以将host/utils/uhd-usrp.rules 拷贝到 /etc/udev/rules.d/sudocpuhd-usrp.rules /etc/udev/rules.d/sudoudevadm control --reload-rulessudoudevadm trigger然后重新插拔USRP使用命令寻找OAI 编译gNodeB可执行文件./build_oai-wUSRP--gNB-x执行 gNodeB 使用 -E 添加 3/4 滤波器信号由USRP发出sudo./targets/bin/nr-softmodem.Rel15-O/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf --phy-test-d-E
返回列表