-
Notifications
You must be signed in to change notification settings - Fork 0
Atempt at "Add 5G MAC slice with NVS algo & RC ran func" MR setup
Apbk20 edited this page Nov 27, 2024
·
29 revisions
cd ~
git clone https://github.com/swig/swig.git
cd swig
git checkout release-4.1
./autogen.sh
./configure --prefix=/usr/
make -j 8
make install
sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python3-dev
git clone https://gitlab.eurecom.fr/oai/openairinterface5g ~/MAC_slicing_oai_MR
cd ~/MAC_slicing_oai_MR
git fetch origin
git checkout 2b588dd4540dc6dca79e7e454e705ce243b88c0c
cd ~/MAC_slicing_oai_MR/cmake_targets/
./build_oai -I
./build_oai -w USRP --gNB --build-e2 --ninja -C
cd
git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
cd flexric/
git checkout 7e2887222eb53bcb52d3032cb7971584e061eece
code ~/flexric/examples/xApp/c/ctrl/xapp_rc_slice_ctrl.c
Insert the following into line 131
char plmnid_str[] = "00101";
cd ~/flexric && mkdir build && cd build && cmake .. && make -j 8
sudo make install
ctest
By default the service model libraries will be installed in the path /usr/local/lib/flexric while the configuration file in /usr/local/etc/flexric.
sudo nano ~/../../usr/local/etc/flexric/flexric.conf
Insert the following
[NEAR-RIC]
NEAR_RIC_IP = 192.168.10.15
[XAPP]
DB_DIR = /tmp/
~/MAC_slicing_oai_MR/openair2/E2AP/flexeic
git checkout 01d85049f5196eec77db315bb68747dd1891b1d9
Please, add the following block in OAI's configuration file:
code ~/MAC_slicing_oai_MR/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf
e2_agent = {
near_ric_ip_addr = "192.168.10.15";
sm_dir = "/usr/local/lib/flexric/"
}
And change the IP of AMF and RU USRP to X30xx
RUs = (
{
local_rf = "yes"
nb_tx = 2;
nb_rx = 2;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
##beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights = [0x00007fff, 0x0000];
#clock_src = "internal";
# sdr_addrs = "addr=192.168.20.2,clock_source=internal,time_source=internal"
sdr_addrs = "type=n3xx";
clock_src = "internal";
}
);
////////// AMF parameters:
amf_ip_address = (
{ipv4 = "192.168.71.132";} );
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.10.15";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.10.15";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
}
}
);
Change the PLMN_list in line 13 in gnb conf from
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }); });
to
plmn_list = ({
mcc = 001;
mnc = 01;
mnc_length = 2;
snssaiList = ( {
sst = 1;
sd = 0x000001; // 0 false, else true
},
{
sst = 1;
sd = 0x000005; // 0 false, else true
}
);
});
I am using this tutorial
cd ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/
docker compose pull
Change all xxx.xxx.70.xxx to xxx.xxx.71.xxx and 127.0.0.1 to 192.168.10.15 in
code ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/conf/config.yaml
code ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/docker-compose.yaml
navigate to
code ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/database/oai_db.sql
change SD to 1 or 5 in line 213 - 221
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.101\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.102\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.103\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
('001010000000004', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.104\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
cd ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/
docker compose up -d
Wait a few seconds. comfirm it is set up correct
cd ~/MAC_slicing_oai_MR/doc/tutorial_resources/oai-cn5g/
docker compose ps -a
Monitor AMF
docker logs oai-upf -f
in a new terminal
cd ~/MAC_slicing_oai_MR/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1
In a new terminal
cd ~/flexric/build/examples/
./ric/nearRT-RIC
Set up the UE as How-to-setup-UE,-from-SIMcard-to-the-internet