<b><fontsize = "5">OAI 5G NR SA tutorial with multiple OAI nrUE in RFSIM</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB with single/multiple OAI nrUE(s) in the RFsimulator.
Minimum hardware requirements:
- Laptop/Desktop/Server for OAI CN5G and OAI gNB and UE
Channel models in the context of wireless communication refer to mathematical models that simulate the effects of transmission mediums on signal propagation. These models account for factors such as attenuation, interference, and fading, which can affect the quality of communication between transmitter and receiver. Different channel models represent different real-world scenarios, such as urban environments, indoor spaces, or rural areas. By using these models, researchers and engineers can predict and evaluate the performance of wireless systems under various conditions. Here a simple scenario based on the noise of the chanel is described. The following steps are descreibed below.
- For the gNB configuration file, follow the link to the configuration files: [Configurations](../ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.conf)
- Add this line to the bottom of the conf file for including the channel models in your simulations.
```bash
@include "channelmod_rfsimu.conf"
```
You can check the example run 2(RFSIMULATOR) in the Launch gNB in one window part in this link: [RFSIMULATOR Tutorial](../radio/rfsimulator/README.md)
- For the channel model configuration, follow the link to the configurtion files: [Configurations](../ci-scripts/conf_files/channelmod_rfsimu.conf)
- In the rfsimu_channel_enB0 model part, edit the noise power as the following:
```bash
noise_power_dB =-10;
```
-In the rfsimu_channel_ue0 model part, edit the noise power as the following:
```bash
noise_power_dB =-20;
```
and the rest of the channelmod_rfsimu.conf remains unchanged.
# 5. OAI UE
For the UE configuration file, follow the link to the configuration files: [Configurations](../ci-scripts/conf_files/ue.sa.conf)
- Edit the IMSI as the following
```bash
imsi="0010100000001";
```
- Add this line to the bottom of the conf file for including the channel models in your simulations.
```bash
@include "channelmod_rfsimu.conf"
```
You can check the example run 1(RFSIMULATOR) in the Launch UE in another window part in this link: [RFSIMULATOR Tutorial](../radio/rfsimulator/README.md)
# 5.2 OAI multiple UE
## 5.1 Testing OAI nrUE with multiple UEs in RFsimulator
Important notes:
- This should be run on the same host as the OAI gNB
- It only applies when running OAI gNB with RFsimulator
- Use the script (multi-ue.sh) in [RFSIMULATOR Tutorial](../radio/rfsimulator) to make namespaces for
multiple UEs.
- For the first UE, create the namespace ue1 (-c1) and then execute bash inside (-e):
```bash
sudo ./multi-ue.sh -c1-e
sudo ./multi-ue.sh -o1
```
- After entering the bash environment, run the following command to deploy your first UE
telnet 10.201.1.1 9095 ### For accessing to the first UE
telnet 10.202.1.2 9096 ### For accessing to the second UE
```
After entering to the bash environment you can type help and see the possible options to change the channelmodels and other available options in RFSIM.
### 5.4 Monitoring by nr-scope
In order to verify the effects of the changes, the nr-scope constellation tool can be used to track and analyze the modulation constellation points. This tool allows users to visualize the modulation scheme being used and assess the quality of the received signals. By observing the constellation points, users can verify whether the changes made to the system configuration have resulted in.