3.91 KB
Newer Older
1 2 3 4 5 6 7 8 9
# Controlling Your Experiment

The UE and all of the OAI services can be controlled from the command
line by logging into the appropriate nodes. In addition, all nodes in
the experiment can be rebooted or reloaded (reload means loading a
fresh disk image wiping out any changes) from the portal
interface. After any reboot, all services will automatically start and
the UE should attach and connect to provide end-to-end connectivity.

10 11 12 13 14 15 16
## Restarting without rebooting

If you want to restart all the services but don't want to reboot the
nodes themselves, you can run this script on either the `enb1` or `epc` nodes:

    sudo /local/repository/bin/

17 18 19 20 21
## UE Control

Log into the `adb-tgt` node on your experiment. This node links to the
UE via an adb proxy with this command:

    pnadb -a
23 24 25 26 27 28 29 30

Sometimes just after rebooting this command will fail to connect. If
so, try running it again after a few minutes. If it persists, you can
reboot or reload (reload means loading a fresh disk image) the UE and
try connecting again once it is complete.

You can log into the UE using adb:

    adb shell
32 33 34 35 36 37

From there, you can manipulate or run any system on the phone. To see
if there is end to end connectivity, try `ping` for example.

The adb node can be rebooted from the command line with:

    adb reboot
39 40 41 42 43 44 45 46 47

Any other adb command can be run as well.

## eNodeB Control

The startup script on the `enb1` node always waits for the EPC node
and then starts the enb service when booting. You can start the enb
service by hand by running:

    sudo /local/repository/bin/
49 50 51

Or you can kill a running enb service with:

    sudo /local/repository/bin/
53 54 55 56

The enb service should be started last because if it doesn't detect an
mme when it starts, it will never connect.

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
## Simulated UE+eNB control

When the experiment starts, necessary scripts are started with the required
configurations. You can monitor the logs by attaching to the screen:
    sudo screen -r sim_enb

To confirm if UE is connected, ping using the oip1 interface:

    ping -I oip1

To restart oaisim, use:

    sudo /local/repository/bin/ -r SIM_ENB

The code for oaisim can be found in `/opt/oai/openairinterface5g`.
You can build the latest version of the code by using following steps:

    cd ~
    git clone
    cd openairinterface5g
    source oaienv
    cd cmake_targets
    ./build_oai -I  --oaisim -x --install-system-files
    ./build_oai --oaisim -c
    cd tools
    sudo ./run_enb_ue_virt_s1 -c <conf_file>

You can use the config file `/usr/local/etc/oai/enb.conf` and update any
necessary parameters like interfaces, MCC, MNC etc.
Please note that current profile has been tested with the default binaries
and not with other versions of OAI.

90 91
## EPC Control

92 93
To manually start any of the EPC services, run one of these scripts on
the `epc` node:

95 96 97
    sudo /local/repository/bin/
    sudo /local/repository/bin/
    sudo /local/repository/bin/
98 99 100 101 102

When starting them all by hand, make sure to start them in that order.

To kill these scripts, just run one of these on the `epc` node:

103 104 105
    sudo /local/repository/bin/
    sudo /local/repository/bin/
    sudo /local/repository/bin/
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120

## Tweaking Configuration

The source templates for the configuration files are at
`/local/repository/etc/*.conf`. These are used only once when the
experiment boots for the first time. They in turn generate the
configuration files which are located at `/usr/local/etc/oai/*.conf`
on both the `epc` and `enb1` nodes. The generated configuration files
can be modified, but those changes will be lost if the node is
reloaded, the experiment ends, or you force them to be regenerated
from the templates.

To change configuration permanently, you will want to fork the
repository for this profile, make a copy of it, and change the
configuration files in your forked repo.