说明,以下全部在ubuntu18.04环境下安装完成
1.下载依赖
sudo apt install libsctp-dev poppler-utils python3.8 libreoffice
ubuntu16.04无法直接安装py3.8,ubuntu18.04可以直接安装
安装好后,需要设置py启动为3.8
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3
python3 -version查看版本为3.8
安装高版本cmake
apt-get install gpg wget
wget -O -https://apt.kitware.com/keys/kitware-archive-latest.asc2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get install kitware-archive-keyring
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
sudo apt-get install cmake
2.克隆RIC仓库
git clone https://gitlab.eurecom.fr/mosaic5g/flexric.git
3.nokia asn1c v0.9.29安装
默认安装的0.9.28无法编译e2-ap
git clone https://github.com/nokia/asn1c.git
test -f configure || autoreconf -iv
./configure
make
./configure
若找不到autoreconf命令,执行
apt-get install autoconf automake libtool
4.nng库安装
git clone https://github.com/nanomsg/nng.git
mkdir build
cd build
cmake -G Ninja ..
ninja
ninja test
ninja install
若ninia命令不存在,执行
apt-get install -y ninja-build
5.编译e2-ap
cd src/lib/ap/ie/asn
python3 gen_asn.py path/to/O-RAN.WG3.E2AP-v01.01.pdf
6.编译工程
cd../../../../../&&mkdir build&&cd build&&cmake ..
ccmake ..
若找不到ccmake命令,执行
apt install cmake-curses-gui
接着执行
make-j
sudo makeinstall
./test/test_near_ric
执行test测试监本后,你会在log.txt里面看到MAC/RLC/PDCP与E2交互的消息
near-ric和agent可以分开运行,也可以单体式运行
单体式运行命令为
./test/near_ric_sa
若分开运行,两台机器都要make install,修改near-ric的ip的配置文件路径为/usr/lib/flexric/flexric.conf
通过wireshark查看e2ap协议
1.wireshark版本要高
2.SCTP协议的内容:
INIT,
INIT_ACK,
COOKIE_ECHO DATA,
COOKIE_ACK SACK..
3.Edit-Preferences-Protocols-E2AP you will see thedefault port for E2AP
(37646) which I had to change to 36421.
参考2
参考1
参考3