... | @@ -327,7 +327,7 @@ mobile_network_code = "92"; |
... | @@ -327,7 +327,7 @@ mobile_network_code = "92"; |
|
|
|
|
|
where mme_ip_address is network interface's IP address of your EPC/HSS, and NETWORK_INTERFACE is your eNB related network interface information.
|
|
where mme_ip_address is network interface's IP address of your EPC/HSS, and NETWORK_INTERFACE is your eNB related network interface information.
|
|
|
|
|
|
##### 1.2.1.2 Configure EPC machine (update config files)
|
|
##### 1.2.2.2 Configure EPC machine (update config files)
|
|
|
|
|
|
Copy the EPC config files in /usr/local/etc/oai
|
|
Copy the EPC config files in /usr/local/etc/oai
|
|
```
|
|
```
|
... | @@ -458,24 +458,42 @@ MYSQL_pass = "linux"; #Put here the root password of mysql database that was p |
... | @@ -458,24 +458,42 @@ MYSQL_pass = "linux"; #Put here the root password of mysql database that was p |
|
|
|
|
|
|
|
|
|
Note that PGW_IPV4_ADDRESS_FOR_SGI is the address used by EPC to access the (external) Internet.
|
|
Note that PGW_IPV4_ADDRESS_FOR_SGI is the address used by EPC to access the (external) Internet.
|
|
#### 1.3.1 Running eNB, EPC and HSS (Assuming eNB, EPC, HSS are on same machine)
|
|
|
|
|
|
|
|
##### Compile & Run EPC:
|
|
#### 1.3.1 Running eNB, EPC and HSS (Assuming eNB, EPC, HSS are on different machines)
|
|
|
|
|
|
|
|
##### Install certificates:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd ~/openair-cn/SCRIPTS
|
|
|
|
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter/ hss.openair4G.eur
|
|
|
|
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter/ nano.openair4G.eur
|
|
|
|
```
|
|
|
|
|
|
|
|
##### Compile & Run HSS (**ALWAYS RUN HSS FIRST**):
|
|
|
|
|
|
```shell
|
|
```shell
|
|
cd ~/openair-cn
|
|
cd ~/openair-cn
|
|
cd SCRIPTS
|
|
cd SCRIPTS
|
|
./build_epc -c -l
|
|
./build_hss -c
|
|
./run_epc -i -r
|
|
./run_hss
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
##### Compile & Run EPC:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
cd ~/openair-cn/SCRIPTS
|
|
|
|
./build_mme -c
|
|
|
|
./run_mme
|
|
```
|
|
```
|
|
|
|
|
|
##### Compile & Run HSS:
|
|
##### Compile & Run SP-GW:
|
|
|
|
|
|
```shell
|
|
```shell
|
|
cd ~/openair-cn
|
|
cd ~/openair-cn
|
|
cd SCRIPTS
|
|
cd SCRIPTS
|
|
./build_hss -c -l
|
|
./build_spgw -c
|
|
./run_hss
|
|
./run_spgw
|
|
```
|
|
```
|
|
|
|
|
|
After EPC is connected to HSS (you should see both enter STATE_OPEN from the terminal), compile and start eNB with the following commands below:
|
|
After EPC is connected to HSS (you should see both enter STATE_OPEN from the terminal), compile and start eNB with the following commands below:
|
... | @@ -487,8 +505,6 @@ cd ~/openairinterface5g |
... | @@ -487,8 +505,6 @@ cd ~/openairinterface5g |
|
source oaienv
|
|
source oaienv
|
|
./cmake_targets/build_oai -w USRP -x -c --eNB
|
|
./cmake_targets/build_oai -w USRP -x -c --eNB
|
|
cd cmake_targets/lte_build_oai/build
|
|
cd cmake_targets/lte_build_oai/build
|
|
sudo ifconfig eth0:3 192.170.0.2 up
|
|
|
|
sudo ifconfig eth0:4 192.170.1.2 up
|
|
|
|
sudo -E ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECT/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf -d
|
|
sudo -E ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECT/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf -d
|
|
sudo -E ./lte-softmodem -h #(to see help options)
|
|
sudo -E ./lte-softmodem -h #(to see help options)
|
|
```
|
|
```
|
... | @@ -502,7 +518,9 @@ You may print out the help message to see other options. A summary of the above |
... | @@ -502,7 +518,9 @@ You may print out the help message to see other options. A summary of the above |
|
|
|
|
|
__Note__: some other options are very useful for debugging purposes, such as `-V`, which enables VCD and generates a log file (/tnp/openair_dump_eNB.vcd) with a lot of details, and `-d`, which enables software oscilloscope with interactive graphic interfaces. Since both consume a lot of computing resources (one is heavy on file access, the other one is heavy on graphics), you are recommended to disable them for normal use.
|
|
__Note__: some other options are very useful for debugging purposes, such as `-V`, which enables VCD and generates a log file (/tnp/openair_dump_eNB.vcd) with a lot of details, and `-d`, which enables software oscilloscope with interactive graphic interfaces. Since both consume a lot of computing resources (one is heavy on file access, the other one is heavy on graphics), you are recommended to disable them for normal use.
|
|
|
|
|
|
If the first run is not successful and you are recommended to lower RX gain by some value, change rx_gain to a lower value in eNB configuration file. When eNB is successfully connected, you should see something like the following on eNB terminal:
|
|
**Do not change tx_gain/rx_gain parameters in config file, unless you know what you are doing. These parameters are calibrated w.r.t UHD version and also w.r.t band you are using**
|
|
|
|
|
|
|
|
When eNB is successfully connected, you should see something like the following on eNB terminal:
|
|
|
|
|
|
```
|
|
```
|
|
...
|
|
...
|
... | @@ -514,24 +532,41 @@ TYPE <CTRL-C> TO TERMINATE |
... | @@ -514,24 +532,41 @@ TYPE <CTRL-C> TO TERMINATE |
|
Entering ITTI signals handler
|
|
Entering ITTI signals handler
|
|
```
|
|
```
|
|
|
|
|
|
#### 1.3.2 Running eNB, EPC and HSS (Assuming eNB, {EPC, HSS} are on different machines)
|
|
#### 1.3.2 Running eNB, EPC and HSS (Assuming eNB, {EPC, HSS} are on same machines. We assume in our case that this machine is calisson as described above)
|
|
|
|
|
|
##### Compile & Run EPC:
|
|
##### Install certificates:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd ~/openair-cn/SCRIPTS
|
|
|
|
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter/ hss.openair4G.eur
|
|
|
|
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter/ calisson.openair4G.eur
|
|
|
|
```
|
|
|
|
|
|
|
|
##### Compile & Run HSS (**ALWAYS RUN HSS FIRST**):
|
|
|
|
|
|
```shell
|
|
```shell
|
|
cd ~/openair-cn
|
|
cd ~/openair-cn
|
|
cd SCRIPTS
|
|
cd SCRIPTS
|
|
./build_epc -c -l
|
|
./build_hss -c
|
|
./run_epc -r
|
|
./run_hss
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
##### Compile & Run EPC:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
cd ~/openair-cn/SCRIPTS
|
|
|
|
./build_mme -c
|
|
|
|
./run_mme
|
|
```
|
|
```
|
|
|
|
|
|
##### Compile & Run HSS:
|
|
##### Compile & Run SP-GW:
|
|
|
|
|
|
```shell
|
|
```shell
|
|
cd ~/openair-cn
|
|
cd ~/openair-cn
|
|
cd SCRIPTS
|
|
cd SCRIPTS
|
|
./build_hss -c -l
|
|
./build_spgw -c
|
|
./run_hss
|
|
./run_spgw
|
|
```
|
|
```
|
|
|
|
|
|
After EPC is connected to HSS (you should see both enter STATE_OPEN from the terminal), compile and start eNB with the following commands below:
|
|
After EPC is connected to HSS (you should see both enter STATE_OPEN from the terminal), compile and start eNB with the following commands below:
|
... | @@ -544,41 +579,16 @@ source oaienv |
... | @@ -544,41 +579,16 @@ source oaienv |
|
./cmake_targets/build_oai -w USRP -x -c --eNB
|
|
./cmake_targets/build_oai -w USRP -x -c --eNB
|
|
cd cmake_targets/lte_build_oai/build
|
|
cd cmake_targets/lte_build_oai/build
|
|
sudo -E ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECT/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf -d
|
|
sudo -E ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECT/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf -d
|
|
|
|
sudo -E ./lte-softmodem -h #(to see help options)
|
|
```
|
|
```
|
|
|
|
|
|
### 1.4 Possible Issues
|
|
|
|
|
|
|
|
#### Issue 1: EPC Fails to Connect to HSS (1)
|
|
|
|
|
|
|
|
If you miss Step 2 in Section 1.1, your EPC may fail to connect to HSS. Check the following configurations. Assume your hostname is "labuser" (/etc/hostname) and your FQDN is "labuser.111.111" in /etc/hosts (see tutorial for this part). Then in EPC configuration file,
|
|
|
|
|
|
|
|
```
|
|
|
|
REALM = "111.111"
|
|
|
|
HSS_HOSTNAME = "labuser"
|
|
|
|
```
|
|
|
|
|
|
|
|
In /usr/etc/freeDiameter/hss_fd.conf:
|
|
|
|
|
|
|
|
```
|
|
|
|
Identity="labuser.111.111"
|
|
|
|
Realm="111.111"
|
|
|
|
ConnectPeer = "labuser.111.111" {ConnectTo = "127.0.1.1"; Realm="111.111"; No_IPv6; No_TLS; port = 3870;}
|
|
|
|
```
|
|
|
|
|
|
|
|
In /usr/etc/freeDiameter/mme_fd.conf:
|
|
|
|
|
|
|
|
```
|
|
|
|
Identity="labuser.111.111"
|
|
|
|
Realm="111.111"
|
|
|
|
```
|
|
|
|
|
|
|
|
If this is the issue, the easiest way is to specify FQDN and rebuild EPC using the "build_oai" script in `~/openairinterface5g/cmake_targets` with the -C or -c option (which removes all previously compilations):
|
|
### 1.4 Possible Issues
|
|
|
|
|
|
```shell
|
|
#### Issue 1: MME Fails to Connect to HSS (1)
|
|
./build_oai -c --eNB -w USRP
|
|
This is often due to errors/mismatch between hostname/REALM settings in /etc/hosts, /etc/hostname and MME/HSS config files. Please make sure that certificates are installed with with correct FQDN for both MME/HSS
|
|
```
|
|
|
|
|
|
|
|
#### Issue 2: EPC Fails to Connect to HSS (2)
|
|
#### Issue 2: MME Fails to Connect to HSS (2)
|
|
|
|
|
|
Another possible cause is that mobile country code (MCC), mobile network code (MNC)
|
|
Another possible cause is that mobile country code (MCC), mobile network code (MNC)
|
|
and tracking area code (TAC) are not matched in configuration files for eNB and EPC.
|
|
and tracking area code (TAC) are not matched in configuration files for eNB and EPC.
|
... | @@ -656,12 +666,9 @@ as binary in the database. Use the following commands as a guide. |
... | @@ -656,12 +666,9 @@ as binary in the database. Use the following commands as a guide. |
|
shell > mysql -u root -p
|
|
shell > mysql -u root -p
|
|
# The password is "linux"
|
|
# The password is "linux"
|
|
mysql > use oai_db;
|
|
mysql > use oai_db;
|
|
mysql > INSERT INTO users (`imsi`, `msisdn`, `imei`, `imei_sv`, `ms_ps_status`, `rau_tau_timer`,
|
|
mysql > INSERT INTO users (`imsi`, `msisdn`, `imei`, `imei_sv`, `ms_ps_status`, `rau_tau_timer`, `ue_ambr_ul`, `ue_ambr_dl`, `access_restriction`, `mme_cap`, `mmeidentity_idmmeidentity`, `key`, `RFSP-Index`, `urrp_mme`, `sqn`, `rand`, `OPc`) VALUES ('208930000000001', '33638060010', NULL, NULL, 'PURGED', '120', '50000000', '100000000', '47', '0000000000', '3', 0x8BAF473F2F8FD09487CCCBD7097C6862, '1', '0', '', 0x00000000000000000000000000000000, '');
|
|
-> `ue_ambr_ul`, `ue_ambr_dl`, `access_restriction`, `mme_cap`, `mmeidentity_idmmeidentity`,
|
|
|
|
-> `key`, `RFSP-Index`, `urrp_mme`, `sqn`, `rand`, `OPc`)
|
|
mysql > INSERT INTO pdn (`id`, `apn`, `pdn_type`, `pdn_ipv4`, `pdn_ipv6`, `aggregate_ambr_ul`, `aggregate_ambr_dl`, `pgw_id`, `users_imsi`, `qci`, `priority_level`,`pre_emp_cap`,`pre_emp_vul`, `LIPA-Permissions`) VALUES ('60', 'oai.ipv4','IPV4', '0.0.0.0', '0:0:0:0:0:0:0:0', '50000000', '100000000', '3', '208930000000001', '9', '15', 'DISABLED', 'ENABLED', 'LIPA-ONLY');
|
|
-> VALUES ('208930000000001', '33638060010', NULL, NULL, 'PURGED', '120', '50000000', '100000000',
|
|
|
|
-> '47', '0000000000', '3', 0x8BAF473F2F8FD09487CCCBD7097C6862, '1', '0', '',
|
|
|
|
-> 0x00000000000000000000000000000000, '');
|
|
|
|
```
|
|
```
|
|
|
|
|
|
There are a couple of things to note:
|
|
There are a couple of things to note:
|
... | @@ -674,9 +681,9 @@ There are a couple of things to note: |
... | @@ -674,9 +681,9 @@ There are a couple of things to note: |
|
#### Step 3: Update Tables oai_db.mmeidentity and oai_db.pdn
|
|
#### Step 3: Update Tables oai_db.mmeidentity and oai_db.pdn
|
|
|
|
|
|
You can directly insert a record to oai_db.mmeidentity via phpmyadmin. In this case,
|
|
You can directly insert a record to oai_db.mmeidentity via phpmyadmin. In this case,
|
|
"idmmeidentity" is 3, "mmehost" is "labuser.111.111" and "mmerealm" is "111.111".
|
|
"idmmeidentity" is 3, "mmehost" is "nano.openair4G.eur" and "mmerealm" is "openair4G.eur".
|
|
|
|
"idmmeidentity" is 4, "mmehost" is "calisson.openair4G.eur" and "mmerealm" is "openair4G.eur".
|
|
|
|
|
|
Also, you need to insert a record to oai_db.pdn for the user via phpmyadmin.
|
|
|
|
|
|
|
|
### 2.4 Connect UE to eNB
|
|
### 2.4 Connect UE to eNB
|
|
|
|
|
... | | ... | |