===============================================================================
***************************** OAISIM_MME v0.3 *********************************
===============================================================================

MME + P-GW + S-GW implementation of 3GPP standard.

|-----|       |------|
| MME | ----- | eNBs |
|-----|       |------|

Controle plane:

              eNB                                    MME                                     HSS

                                       |----------------------------|
                                       |    MME Application layer   |
                                       |----------------------------|
                                       |------------|                          |-------------|  |-------------|     |--------------|
                                       |     NAS    |                          |     AUC     |--|    Mysql    | --- |   Database   |
                                       |------------|                          |-------------|  |-------------|     |--------------|
|------------|   |------------|        |------------|  |--------------|        |------------------------------|
|    RRC     | - | S1AP layer | ------ | S1AP layer |  | S6A/Diameter | ------ |          S6A/Diameter        |
|------------|   |------------|        |------------|  |--------------|        |------------------------------|
                 |------------|        |------------------------------|        |------------------------------|
                 | SCTP layer | ------ |           SCTP layer         | ------ |           SCTP layer         |
                 |------------|        |------------------------------|        |------------------------------|


Non-UE associated control plane goes directly from S1AP to MME application layer.

User plane:

      eNB                   MME

|------------|        |------------|
|    PDCP    |        |     MAL    |
|------------|        |------------|
|------------|        |------------|
|    S1-U    | ------ |    S1-U    |
|------------|        |------------|
|------------|        |------------|
|  GTPV1-U   | ------ |   GTPV1-U  |
|------------|        |------------|
|------------|        |------------|
|  UDP layer | ------ |  UDP layer |
|------------|        |------------|

Current development:

- NAS  layer: under development
- S1AP layer: compliant with 3GPP TS36.413-8a0 and TS36.413-980 and TS35.413-a50
- SCTP layer: SEQ_PACKET socket types

For now the MME is able to register new eNBs on SCTP layer,
and handles S1 Setup request, Initial UE message, UplinkNASTransport on
S1AP layer.

The MME needs some libraries and tools:
- libsctp-dev (SCTP support)
- libpthread-dev
- asn1c utility (patched with Aligned PER support, see README in
S1AP/MESSAGES/ASN1)
- flex
- bison
To install the dependencies:
sudo apt-get install libsctp-dev libpthread-dev flex bison g++ gcc make -y

A script is present in S6A/freediameter to install required packages for
S6A interface over diameter. Run it as a sudoer.   

install_openvswitch1.9.0.bash
cd S6A/freediameter/README

Compilations steps for use with oaisim 4G emulation environment:
./autogen.sh or autoreconf -i --force --install
mkdir objs && cd objs
../configure [options]
make

Compilations steps for oaisim_mme use alone:
./autogen.sh
./configure [options]
make

Current options supported for configure:
--enable-r8: disable R9 and R10 S1AP messages updates
--enable-r9: disable R10 updates
code build switch: UPDATE_RELEASE_9 and UPDATE_RELEASE_10
NOTE: Release 10 is enabled by default
--enable-standalone-epc: all-in-one package, MME, S-GW and P-GW are compiled in a single
executable and S11 interface is not used; messages are exchanged internally,
linking MME applicative layer to S+P-GW applicative layer

How to run EPC environnement ?

If you avec enabled the standalone option
the package is called oai_epc in the OAI_EPC directory.

If you have decided to use the S11 interface,
two executables should be run on different machines

* oai_sgw in OAI_SGW
* oaisim_mme in OAISIM_MME

For example to rum mme:
./OAISIM_MME/oaisim_mme [options]
Avalaible options:
-h: print help
-v: enable verbosity level [1-2]
-V: print current executable version and return

Before any commit:
make maintainer-clean

MME SCTP port for S1AP messages is 36412
SGW and eNB GTP-u port is 2152
SGW and MME GTP-c port is 2123

-------- Adding new files to build system --------
1) When adding a new file to compile, edit the Makefile.am of the corresponding
   directory.
2) Execute ./autogen.sh
3) make
WARNING: do not edit directly Makefiles and Makefile.in, they are re-generated by
         autoconf/automake.

Bugs:
report any bug to openair_admin@eurecom.fr
