编译和仿真命令
基于版本:OAI_develop_210827。对nr-softmodem,也就是 gnb进行解析。
下载后编译 先用git init命令,然后chmod 777 -R把文件夹内权限设置一下。
develop的编译:
sudo ./build_oai -w USRP --eNB --nrUE --gNB -g -G -V -x -P --ue-trace --ue-timing --build-lib telnetsrv --build-lib all
NR_UE_SA的编译:
sudo ./build_oai -w USRP --eNB --nrUE --gNB -g -G -P --build-lib all
分别用-P和取消-P分别编译一次。
gdb 调试和仿真:
ue端:
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --rfsim --phy-test --rrc_config_path ./ -d
server端: (在ubuntu终端中输入export RFSIMULATOR=server,并用env命令查看)
sudo cgdb --args ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --rfsim --phy-test -d --command set enviroment RFSIMULATOR=server --rfsimulator.options saviq
读取配置
调试命令:
对NR_SSB的一些配置(读取nr_init_frame_parms()运行后的fp结构体):
{freq_range = nr_FR1, N_RB_DL = 106, N_RB_UL = 106, N_RBG = 0 '\000', N_RBGS = 0 '\000',
nr_band = 78, dl_CarrierFreq = 3619080000, ul_CarrierFreq = 3619080000, att_tx = 0, att_rx
= 0, frame_type = TDD, tdd_config = 0 '\000', Nid_cell = 0, subcarrier_spacing = 30000,
threequarter_fs = 0 '\000', ofdm_symbol_size= 2048, nb_prefix_samples = 144,
nb