- 新建一个srsRAN_4G文件夹
xiaqiu@xz:~$ mkdir srsRAN_4G
xiaqiu@xz:~$ cd srsRAN_4G/
xiaqiu@xz:~/srsRAN_4G$
- 安装相关的依赖的库
sudo apt-get install build-essential cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev
- srsGUI安装
sudo apt-get install libboost-system-dev libboost-test-dev libboost-thread-dev libqwt-qt5-dev qtbase5-dev
- 安装sysGUI
git clone https://github.com/srsLTE/srsGUI.git
cd srsgui
mkdir build
cd build
cmake ../
make -j8
make test
sudo make install
sudo ldconfig
- 安装ZeroMQ
sudo apt-get install libzmq3-dev
- 安装srsRAN_4G
git clone https://github.com/srsRAN/srsRAN_4G.git
cd srsRAN_4G
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
make -j8
sudo make install
srsran_install_configs.sh user
- 网络命名空间创建
sudo ip netns add ue1
验证新的“ue1”网络是否存在
sudo ip netns list
- 运行核心网EPC
sudo srsepc /home/xiaqiu/.config/srsran/epc.conf --hss.db_file=/home/xiaqiu/.config/srsran/user_db.csv
- 打开另外一个WSL终端运行基站eNodeB
sudo srsenb --rf.device_name=zmq --rf.device_args="fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,-base_srate=23.04e6" /home/xiaqiu/.config/srsran/enb.conf --enb_files.sib_config=/home/xiaqiu/.config/srsran/sib.conf --enb_files.rr_config=/home/xiaqiu/.config/srsran/rr.conf --enb_files.rb_config=/home/xiaqiu/.config/srsran/rb.conf
- 打开另外一个WSL终端运行终端UE
sudo srsue --rf.device_name=zmq --rf.device_args="tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate=23.04e6" --gw.netns=ue1 /home/xiaqiu/.config/srsran/ue.conf
- 打开另外一个WSL终端生成downlink traffic
ping 172.16.0.2
能ping通说明可以了
uplink 的traffic
sudo ip netns exec ue1 ping 172.16.0.1
- 安装wireshark抓包工具
sudo apt install wireshark-qt
- 运行wireshark进行配置()
如果界面字体太小在~/目录下添加.Xresources 写入Xft.dpi: 220
在.bashrc 最后一行添加xrdb -merge ~/.Xresources
DLT=149
Payload Protocol=udp
DLT=148
Payload Protocol=nas-eps
DLT=150
Payload Protocol=s1ap
- wireshark any抓取LTE数据
s1ap or mac-lte-framed or udp or nas-eps or mac-lte
参考:https://docs.srsran.com/projects/4g/en/latest/general/source/1_installation.html