Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Readme to include more complete instructions on running S1AP tester #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,55 @@ S1APTester binary can be generated by executing below compilation steps:
$ cd TestCntlrApp/build
$ make cleanall
$ make
$ sudo cp ../lib/libtfw.so /usr/lib
$ cd ../../
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is not needed here: cd ../../

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of cd ../../, specify the path from the folder created from "git clone "
If get code by command "https://github.com/facebookexperimental/S1APTester.git" S1APTester is folder created. You can specify path from S1APTester

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we compile S1ap tester code within magma_test VM, generated library libtfw.so is copied to path "/home/vagrant/s1ap-tester/bin".
Even I didn't locate libtfw.so file in path /usr/lib/
So in what context libtfw.so is copied to /usr/lib/?

Copy link
Member

@VinashakAnkitAman VinashakAnkitAman Dec 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of using S1APTester with normal magma setup, the steps of copying the libtfw.so file to /home/vagrant/s1ap-tester/bin/ is part of VM provisioning and the python scripts are importing directly from this path.

As of now, the stub binary "testCntrlr" is trying to search the libtfw.so file in default lib folders as the path is not specified with the binary. This is why we need to copy the .so file in /usr/lib/ folder.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we compile S1ap tester code within magma_test VM, generated library libtfw.so is copied to path "/home/vagrant/s1ap-tester/bin".
Even I didn't locate libtfw.so file in path /usr/lib/
So in what context libtfw.so is copied to /usr/lib/?

```
On successful compilation, the “libtfw.so” library gets generated under
TestCntlrApp/lib folder.
TestCntlrApp/lib folder which is copied to ``/usr/lib``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is copied to => which needs to be / should be copied to
The copying of .so file does not happen automatically as part of compilation and needs to be done separately as shown in steps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VinashakAnkitAman Referring line number 56, libtfw.so is getting copied to /usr/lib
So sentence in line number 60 looks to be fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VinashakAnkitAman Referring line number 56, libtfw.so is getting copied to /usr/lib
So sentence in line number 60 looks to be fine


## Compile Traffic Generator
```
$ cd Trfgen/build
$ make clean
$ make
$ sudo cp ../lib/libtrfgen.so /usr/lib
$ cd ../../
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is not needed here: cd ../../

```
On successful compilation, the “libtrfgen.so” library gets generated under
Trfgen/lib folder.
Trfgen/lib folder which is copied to ``/usr/lib``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is copied to => which needs to be / should be copied to
The copying of so file does not happen automatically as part of compilation and needs to be done separately as shown in steps.


## Compile Test Controller Stub
```
$ cd TestCntlrStub/build
$ make clean
$ make
$ cd ../bin/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is not needed here in the steps: cd ../bin/

```
Upon successful compilation, an executable binary ``testCntrlr`` is created in the ``bin`` directory.


## Configure eNodeB Parameters
Example eNodeB configuration file can be found in ``TestCntlrApp/cfg/nbAppCfg.txt``,

In this file you will need to put in the parameters for your EPC, such as Cell ID, TAC, MCC/MNC, IP Addresses, etc.

## Configure UE Parameters
Example UE parameter file can be found in ``TestCntlrApp/cfg/ueCfg.txt``,

In this file you will need to put in the crypto parameters for your HSS, such as OP key and K Keys.

Each IMSI you want to test will need to be defined in ``TestCntlrApp/cfg/imsi.txt``

## Running S1AP Test
After configuring your eNodeB & UE parameters, you can run the ``TestCntlrStub`` with one of the example test cases,
```
$ cd TestCntlrStub/bin
$ sudo ./testCntrlr -f testCaseList_1.txt
```

Log messages will be shown on screen and in the text file ``log`` created in the same directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen => terminal




# Testing with Magma
Following points should be considered when using S1APTester with
Expand Down