|
|
# Set up and run the FlexRAN Realtime Controller
|
|
|
|
|
|
From Source:
|
|
|
```bash
|
|
|
./build_m5g -f
|
|
|
cd flexran
|
|
|
./start_controller.sh
|
|
|
```
|
|
|
From Snap :
|
|
|
```bash
|
|
|
./build_m5g -F
|
|
|
flexran.status
|
|
|
flexran.help
|
|
|
```
|
|
|
|
|
|
The controller will be ready once the message “Now listening on http://0.0.0.0:9999” shows up.
|
|
|
|
|
|
# Set up and run the OAI-CN
|
|
|
|
|
|
Refer to the [OAI CN tutorial](oai-cn).
|
|
|
|
|
|
# Set up and run the OAI-RAN
|
|
|
|
|
|
Refer to the [OAI RAN tutorial](oai-ran).
|
|
|
|
|
|
# Connecting a UE
|
|
|
Once the FlexRAN, OAI-CN, and OAI-RAN are running properly, you simply need to wait for a bit for the UE to attach to the network. Once the UE is attached, a list of UE capabilities will show up at the ENB side and some log messages about a UE state change should show up at the controller.
|
|
|
|
|
|
To verify that the UE was attached without problems, we can connect to it and ping some external IP, or ping UE from the OAI-CN machine.
|
|
|
|
|
|
# FlexRAN Northbound APIs
|
|
|
The FlexRAN controller provides a northbound RESTful API for issuing control commands and for obtaining statistics and reports for the underlying base stations using simple HTTP requests. Below we provide two example usage of such APIs, and the complete API documentation can can be found [in the apidocs](http://mosaic-5g.io/apidocs/flexran/).
|
|
|
|
|
|
## Radio Resource Management
|
|
|
Reconfigure the MAC scheduling based on the JSON policy file in the payload for the most recently added agent as follows:
|
|
|
```bash
|
|
|
curl -X POST http://FlexRAN_PUBLIC_IPADDR:9999/slice/enb/-1 --data-binary @filepath/filename.json
|
|
|
```
|
|
|
Replace `FlexRAN_PUBLIC_IPADDR` with the correct IP.
|
|
|
|
|
|
An example of policy file is provided below, in which two slices in UL/DL with 25%/75% of resources (RBs) are assigned on the basis of a 50 RB LTE configuration. In this example, slices don't share resources, and users are assigned not more than the slice's resources divided by the user count of this slice. A detailed description of the parameters can be found [here](http://mosaic-5g.io/apidocs/flexran/#api-SliceConfiguration-ApplySliceConfiguration).
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"dl": [
|
|
|
{
|
|
|
"id": 0,
|
|
|
"percentage": 25,
|
|
|
"maxmcs": 28
|
|
|
},
|
|
|
{
|
|
|
"id": 3,
|
|
|
"percentage": 75,
|
|
|
"maxmcs": 28
|
|
|
}
|
|
|
],
|
|
|
"ul": [
|
|
|
{
|
|
|
"id": 0,
|
|
|
"percentage": 25,
|
|
|
"maxmcs": 20,
|
|
|
"firstRb": 0
|
|
|
},
|
|
|
{
|
|
|
"id": 3,
|
|
|
"percentage": 75,
|
|
|
"maxmcs": 20,
|
|
|
"firstRb": 13
|
|
|
}
|
|
|
],
|
|
|
"intrasliceShareActive": false,
|
|
|
"intersliceShareActive": false
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The following responses are standard HTTP response code:
|
|
|
* Successful: HTTP Code : 200 "OK"
|
|
|
* Unsuccessful: HTTP Code: 404 "Bad Request". There was a problem with the request, a JSON error message indicating the cause.
|
|
|
|
|
|
|
|
|
# Get eNB and UE Configuration and statistics
|
|
|
To obtain all the agent's statistics, simply issue the command:
|
|
|
```bash
|
|
|
$ curl -X GET http://FlexRAN_PUBLIC_IPADDR:9999/stats/
|
|
|
```
|
|
|
Replace `FlexRAN_PUBLIC_IPADDR` with the correct IP. More information about statistics can be found [here](http://mosaic-5g.io/apidocs/flexran/#api-Stats).
|
|
|
|
|
|
This should return all the information for all eNBs and their connected UEs that are
|
|
|
currently available at the controller RIB.
|
|
|
The following responses are standard HTTP response code:
|
|
|
* Successful: HTTP Code : 200 "OK".
|
|
|
* Unsuccessful: This should always succeed and possible give empty lists for the eNodeB configs and UE statistics. |