Reorganize directories and switch libaries to using asn1c
[it/test.git] / simulators / e2sim / README.md
1 #/*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 # Copyright 2019 Nokia                                                       *
5 #                                                                            *
6 # Licensed under the Apache License, Version 2.0 (the "License");            *
7 # you may not use this file except in compliance with the License.           *
8 # You may obtain a copy of the License at                                    *
9 #                                                                            *
10 #      http://www.apache.org/licenses/LICENSE-2.0                            *
11 #                                                                            *
12 # Unless required by applicable law or agreed to in writing, software        *
13 # distributed under the License is distributed on an "AS IS" BASIS,          *
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
15 # See the License for the specific language governing permissions and        *
16 # limitations under the License.                                             *
17 #                                                                            *
18 #******************************************************************************/
19
20
21 # INSTALLATION (tested on Ubuntu 16.04)
22   1. Install dependencies
23     $ sudo apt-get update
24     $ sudo apt-get install -y
25         build-essential
26         git
27         cmake
28         libsctp-dev
29         lksctp-tools
30         autoconf
31         automake
32         libtool
33         bison
34         flex
35         libboost-all-dev
36     $ sudo apt-get clean
37
38   2. SET ENVIRONMENT VARIABLE
39     Add this line to `~/.bashrc`
40       export E2SIM_DIR=<your e2sim directory>
41
42   3. Build the official e2sim
43     $ ./build_e2sim
44
45 # USAGE
46   $  $E2SIM_DIR/build/e2sim [SERVER IP] [PORT]
47
48   By default, SERVER IP = 127.0.0.1, PORT = 36421
49
50 # DOCKER
51   Note: The commands in this section must be run from $E2SIM_DIR
52
53   * Build docker image
54   $ sudo docker build -f docker/Dockerfile -t [DOCKER_IMAGE]:[TAG] .
55
56   * Example how to run docker container
57   $ sudo docker run --rm --net host -it [DOCKER_IMAGE]:[TAG] sh -c "./build/e2sim [SERVER IP] [PORT]"
58
59 # SUPPORTED MESSAGE FLOWS
60
61 - RIC INDICATION            (RAN -> RIC)      version 1.3.0   September 13, 2019
62     SgNBAdditionRequest
63
64 - RIC SUBSCRIPTION REQUEST  (RIC -> RAN)      version 1.2.0   May 24, 2019
65 - RIC SUBSCRIPTION RESPONSE (RAN -> RIC)
66 - RIC SUBSCRIPTION FAILURE  (RAN -> RIC)
67
68 - ENDC X2 SETUP REQUEST     (RIC -> RAN)
69 - ENDC X2 SETUP RESPONSE    (RAN -> RIC)
70
71 - X2 SETUP REQUEST          (RIC -> RAN)
72 - X2 SETUP RESPONSE         (RAN -> RIC)
73
74 # GENERATING ASN1C CODES FOR E2AP, E2SM, X2AP
75  1. Install asn1c compiler
76  ./tools/install_asn1c
77
78  2. Generate asn1c codes using e2ap, e2sm and x2ap specs
79  Download the following files into tools/asn_defs
80   - e2ap-v031.asn
81   - e2sm-gNB-X2-release-1-v041.asn
82   - x2ap-no-desc-15-04.asn
83
84 # Change logs:
85   03/12/2019: currently supports sending and receiving X2 SETUP messages
86   05/21/2019: add support for ENDC X2 SETUP   
87               no longer use asn1c
88               all X2AP and E2AP messages are encapsulated into E2AP-PDU
89   05/24/2019: add support for RIC SUBSCRIPTION REQUEST, RESPONSE, and FAILURE