项目作者: adjacentlink

项目描述 :
EMANE LTE Model
高级语言: C++
项目地址: git://github.com/adjacentlink/emane-model-lte.git
创建时间: 2019-01-31T01:30:24Z
项目社区:https://github.com/adjacentlink/emane-model-lte

开源协议:BSD 3-Clause "New" or "Revised" License

下载


EMANE LTE Model

The EMANE LTE Model project contains EMANE radio model implementations
for the LTE ENB and UE waveforms. The models are used in conjunction with
the srsLTE-emane
project applications to emulate LTE networks within EMANE.

The EMANE UE and ENB LTE models are not implemented as individual
EMANE plugins, departing from from all prior EMANE models. Both
are contained in the libemanelte.so library. srsenb-emane
and srsue-emane use a feature, introduced in EMANE
1.2.3, to embed an EMANE emulator instance internally; emane does
not run as a separate application. The
emane-embedded-example
project provides a small example, for those interested.

The lastest stable version: 1.0.11.


Install Instructions

The easiest way to get running with the EMANE LTE model is to install packages
directly from the latest pre-built EMANE bundle.

Build Instructions

  1. Install the latest pre-built EMANE bundle.
    This will install the build dependencies - EMANE, OpenTestPoint and OpenStatistic.

  2. Build and install emane-model-lte.

  3. Build and install srsRAN-emane.

RockyLinux 8

  1. sudo dnf install epel-release dnf-plugins-core
  2. sudo dnf config-manager --set-enabled powertools
  3. sudo dnf install autoconf automake git libtool libxml2-devel libpcap-devel pcre-devel libuuid-devel python-devel python-setuptools rpm-build make gcc-c++
  4. git clone https://github.com/adjacentlink/emane-model-lte.git
  5. cd emane-model-lte
  6. ./autogen.sh
  7. ./configure
  8. make rpm
  9. sudo dnf install .rpmbuild/RPMS/x86_64/*rpm

RockyLinux 9

  1. sudo dnf install epel-release dnf-plugins-core
  2. sudo dnf config-manager --enable crb
  3. sudo dnf install autoconf automake git libtool libxml2-devel libpcap-devel pcre-devel libuuid-devel python-devel python-setuptools rpm-build make gcc-c++
  4. git clone https://github.com/adjacentlink/emane-model-lte.git
  5. cd emane-model-lte
  6. ./autogen.sh
  7. ./configure
  8. make rpm
  9. sudo dnf install .rpmbuild/RPMS/x86_64/*rpm

Fedora 41

  1. sudo dnf install autoconf automake git libtool libxml2-devel libpcap-devel pcre-devel libuuid-devel python-devel python-setuptools rpm-build make gcc-c++
  2. git clone https://github.com/adjacentlink/emane-model-lte.git
  3. cd emane-model-lte
  4. ./autogen.sh
  5. ./configure
  6. make rpm
  7. sudo dnf install .rpmbuild/RPMS/x86_64/*rpm

Ubuntu 22.04 and 24.04

  1. sudo apt-get install gcc g++ autoconf automake libtool libxml2-dev libprotobuf-dev python-protobuf libpcap-dev libpcre3-dev uuid-dev debhelper pkg-config python-setuptools protobuf-compiler git dh-python
  2. git clone https://github.com/adjacentlink/emane-model-lte.git
  3. cd emane-model-lte
  4. ./autogen.sh
  5. ./configure
  6. make deb
  7. sudo dpkg -i .debbuild/emane-model-lte*.deb

Demonstration

The EMANE LTE demonstration is written as
an letce2 project. If you
installed the EMANE bundle, you’ve already installed the tools
to run the demos.

The demonstration is contained in the emane-model-lte/demo
subdirectory. It is also installed to /usr/share/emane-model-lte
if you installed from a binary package instead of working with the
github source repository.

Demonstration

The demonstration, emane-model-lte/demo/two_ues, launches a
an LTE network with two UEs and 1 ENB. The srsLTE-emane applications run inside four
LXC Containers, one for the LTE EPC, one
for the ENB and one for each UE. The containers also run sshd and
are reachable at the backchannel addresses over the letce0 Linux
bridge created by the demo:

  1. # lxc container backchannel addresses
  2. 10.88.1.101 lxc-epc-01
  3. 10.88.1.91 lxc-enb-01
  4. 10.88.1.1 lxc-ue-01
  5. 10.88.1.2 lxc-ue-02
  6. # radio network addresses
  7. 172.16.0.101 epc-01
  8. 172.16.0.1 ue-01
  9. 172.16.0.2 ue-02

The srsepc-emane and srsue-emane applications create Linux tuntap
devices (the 172.16.0.x addreses) as IP entry points into the
LTE network. The terminal snippets that follow use the hostnames (above)
in the prompt to show where the command is executed. host means
the computer host computer where you run the demo.

The ENB and UE radio models running inside the emane instance embedded
in srsenb-emane and srsue-emane take a single XML configuration file
(default name: emanelte.xml) instead of the usual hierarchy of XML
files when running emane standalone. Here is two_ues/ue-01/emanelte.xml:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <emanelte>
  3. <platform id="1"
  4. loglevel="2"
  5. logfile="/home/me/working/emane-model-lte/demo/two_ues/persist/ue-01/var/log/emane.log"
  6. otamanagerdevice="backchan0"
  7. eventservicedevice="backchan0">
  8. <radiomodel pcrcurveuri="pcr.xml"
  9. resourceblocktxpower="0.0"></radiomodel>
  10. <phy noisemode="all"
  11. propagationmodel="precomputed"
  12. subid="12"></phy>
  13. </platform>
  14. </emanelte>

Use letce2 to build and start the demo:

  1. [me@host working]$ cd emane-model-lte/demo/two_ues
  2. [me@host two_ues]$ letce2 lxc build bootstrap.cfg
  3. [me@host two_ues]$ letce2 lxc start
  4. host: waiting for letce0
  5. host: letce0 found
  6. Cannot change rx-checksumming
  7. Actual changes:
  8. tx-checksumming: off
  9. tx-checksum-ip-generic: off
  10. tcp-segmentation-offload: off
  11. ...
  12. running host start.local
  13. setting initial pathloss to 200 for 1:30 on device letce0 at 11:23:10
  14. finished pathloss on device letce0 at 11:23:10

Inspect the network devices on one of the UE nodes. srsue-emane creates
the srsue device once attached to the EPC:

  1. [me@host two_ues]$ ssh lxc-ue-01
  2. [me@ue-01 ~]$ ifconfig
  3. backchan0 Link encap:Ethernet HWaddr e2:b3:86:0a:09:a6
  4. inet addr:10.88.1.1 Bcast:10.88.1.255 Mask:255.255.255.0
  5. inet6 addr: fe80::e0b3:86ff:fe0a:9a6/64 Scope:Link
  6. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  7. RX packets:111908 errors:0 dropped:0 overruns:0 frame:0
  8. TX packets:37041 errors:0 dropped:0 overruns:0 carrier:0
  9. collisions:0 txqueuelen:1000
  10. RX bytes:47777410 (47.7 MB) TX bytes:7940042 (7.9 MB)
  11. lo Link encap:Local Loopback
  12. inet addr:127.0.0.1 Mask:255.0.0.0
  13. inet6 addr: ::1/128 Scope:Host
  14. UP LOOPBACK RUNNING MTU:65536 Metric:1
  15. RX packets:13 errors:0 dropped:0 overruns:0 frame:0
  16. TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
  17. collisions:0 txqueuelen:1
  18. RX bytes:2333 (2.3 KB) TX bytes:2333 (2.3 KB)
  19. srsue Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
  20. inet addr:172.16.0.1 P-t-P:172.16.0.1 Mask:255.255.255.0
  21. UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
  22. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  23. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  24. collisions:0 txqueuelen:500
  25. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Ping the EPC:

  1. [me@ue-01 ~]$ ping epc-01
  2. PING epc-01 (172.16.0.101) 56(84) bytes of data.
  3. 64 bytes from epc-01 (172.16.0.101): icmp_seq=1 ttl=64 time=457 ms
  4. 64 bytes from epc-01 (172.16.0.101): icmp_seq=2 ttl=64 time=37.2 ms
  5. 64 bytes from epc-01 (172.16.0.101): icmp_seq=3 ttl=64 time=36.1 ms
  6. 64 bytes from epc-01 (172.16.0.101): icmp_seq=4 ttl=64 time=34.8 ms
  7. ...

All of the srsLTE-emane applications expose shared code statistics at
an OpenStatistic
endpoint. The endpoint default port is 47100. Use ostatistic to
inspect values:

  1. [me@host two_ues]$ ostatistic -p 47100 lxc-epc-01 get table
  2. BearerTable
  3. | Dst | eNBTEID | eNBAddr | IMSI | EBI | Time |
  4. DownlinkDropTrafficTable
  5. | Src | Dst | Count | Bytes | Time |
  6. DownlinkTrafficTable
  7. | Src | Dst | Count | Bytes | Time |
  8. | 172.16.0.1 | 172.16.0.2 | 13 | 1372 | 1548764479 |
  9. | 172.16.0.1 | 172.16.0.3 | 12 | 1344 | 1548764479 |
  10. | 172.16.0.2 | 172.16.0.3 | 12 | 1008 | 1548764479 |
  11. | 172.16.0.3 | 172.16.0.2 | 12 | 1008 | 1548764479 |
  12. UplinkTrafficTable
  13. | Src | Dst | Count | Bytes | Time |
  14. | 172.16.0.2 | 172.16.0.1 | 3 | 252 | 1548764466 |
  15. | 172.16.0.2 | 172.16.0.3 | 12 | 1008 | 1548764479 |
  16. | 172.16.0.3 | 172.16.0.2 | 12 | 1008 | 1548764479 |

The embedded EMANE instances running in srsenb-emane and
srsue-emane expose radio model statistics via the EMANE Control
Port. Access these with emanesh using the default port, 47000:

  1. [me@host two_ues]$ emanesh lxc-ue-01 get table nems mac UplinkTxPUSCHFrequencyCounts
  2. nem 1 mac UplinkTxPUSCHFrequencyCounts
  3. | Frequency | 0.1 | 0.2 | 1.1 | 1.2 | 2.1 | 2.2 | 3.1 | 3.2 | 4.1 | 4.2 | 5.1 | 5.2 | 6.1 | 6.2 | 7.1 | 7.2 | 8.1 | 8.2 | 9.1 | 9.2 |
  4. | 2566259936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  5. | 2566079936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  6. | 2565899936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53047 | 53047 |
  7. | 2565719936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 8 | 8 |
  8. | 2565539936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 8 | 8 |
  9. | 2565359936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 1 | 1 | 8 | 8 |
  10. | 2565179936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 1 | 1 | 8 | 8 |
  11. | 2564999936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 1 | 1 | 8 | 8 |
  12. | 2564819936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 0 | 1 | 1 | 8 | 8 |
  13. | 2564639936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 1 | 1 | 0 | 0 | 3 | 3 | 1 | 1 | 15 | 15 | 8 | 8 |
  14. | 2564459936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 1 | 1 | 1 | 1 | 3 | 3 | 3 | 3 | 15 | 15 | 8 | 8 |
  15. | 2564279936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 1 | 1 | 1 | 1 | 3 | 3 | 3 | 3 | 20 | 20 | 8 | 8 |
  16. | 2564099936 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 1 | 1 | 1 | 1 | 3 | 3 | 3 | 3 | 20 | 20 | 8 | 8 |
  17. | 2563919936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  18. | 2563739936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

OpenTestPoint
enables access to both sets of statistics via one uniform data
stream. OpenTestpoint LTE probes
defines the probes specific to LTE. Follow the build and install directions
there if building from source.

The OpenTestPoint Daemon, otestpointd runs in each LXC
container. It takes an XML configuration file, otestpointd.xml, that
lists the probes to load. Here is the file for enb-01:

  1. <otestpoint id="enb-01" discovery="0.0.0.0:8881" publish="0.0.0.0:8882">
  2. <probe configuration="probe-srslte-enb.xml">
  3. <python module="otestpoint.lte.srsenb" class="SRSENB"></python>
  4. </probe>
  5. <probe configuration="probe-emanelte-enb.xml">
  6. <python module="otestpoint.lte.emaneenb" class="EMANEENB"></python>
  7. </probe>
  8. </otestpoint>

In this case, otestpointd loads probes that collect shared code
statistics from the OpenStatistic endpoint (enb-01/probe-srslte-enb.xml):

  1. <probe-srslte-enb address="127.0.0.1" port="47100">
  2. <probes>
  3. <SRSLTE.ENB.Tables.Counts enable="yes"></SRSLTE.ENB.Tables.Counts>
  4. <SRSLTE.ENB.Tables.MAC enable="yes"></SRSLTE.ENB.Tables.MAC>
  5. <SRSLTE.ENB.Tables.PHY enable="yes"></SRSLTE.ENB.Tables.PHY>
  6. <SRSLTE.ENB.Tables.RLC enable="yes"></SRSLTE.ENB.Tables.RLC>
  7. <SRSLTE.ENB.Tables.Upper enable="yes"></SRSLTE.ENB.Tables.Upper>
  8. </probes>
  9. </probe-srslte-enb>

and probes that collect radio model statistics from the Control Port
(enb-01/probe-emanelte-enb.xml):

  1. <probe-emane-lte address="127.0.0.1" port="47000">
  2. <probes>
  3. <EMANE.LTE.ENB.Counters.General enable="yes"></EMANE.LTE.ENB.Counters.General>
  4. <EMANE.LTE.ENB.Tables.Counts enable="yes"></EMANE.LTE.ENB.Tables.Counts>
  5. <EMANE.LTE.ENB.Tables.Downlink.Control enable="no"></EMANE.LTE.ENB.Tables.Downlink.Control>
  6. <EMANE.LTE.ENB.Tables.Downlink.Data enable="no"></EMANE.LTE.ENB.Tables.Downlink.Data>
  7. <EMANE.LTE.ENB.Tables.Events enable="yes"></EMANE.LTE.ENB.Tables.Events>
  8. <EMANE.LTE.ENB.Tables.Uplink.Control enable="no"></EMANE.LTE.ENB.Tables.Uplink.Control>
  9. <EMANE.LTE.ENB.Tables.Uplink.Data enable="no"></EMANE.LTE.ENB.Tables.Uplink.Data>
  10. </probes>
  11. </probe-emane-lte>

Query the otestpointd discovery endpoint for a list of running probes:

  1. [me@host two_ues]$ otestpoint-discover lxc-enb-01:8881
  2. tcp://0.0.0.0:8882
  3. EMANE.LTE.ENB.Counters.General.enb-01
  4. EMANE.LTE.ENB.Tables.Counts.enb-01
  5. EMANE.LTE.ENB.Tables.Events.enb-01
  6. SRSLTE.ENB.Tables.Counts.enb-01
  7. SRSLTE.ENB.Tables.MAC.enb-01
  8. SRSLTE.ENB.Tables.PHY.enb-01
  9. SRSLTE.ENB.Tables.RLC.enb-01
  10. SRSLTE.ENB.Tables.Upper.enb-01

Inspect current probe values from the publish endpoint:

  1. [me@host two_ues]$ otestpoint-dump lxc-enb-01:8882 SRSLTE.ENB.Tables.RLC
  2. [1548773090] enb-01/0 9fec768d-185d-456e-9a47-b811fa83f234
  3. otestpoint.lte.srsenb Measurement_srslte_enb_tables_rlc v1 1077 bytes
  4. SRSLTE.ENB.Tables.RLC.enb-01
  5. [] rlcmrbthruputtable
  6. |RNTI|LCID|DLKbps|Type|Cap|Size|HighWater|NumPush|NumPushFail|NumPop|NumPopFail|Cleared|Time|
  7. --
  8. [] rlcthruputtable
  9. |RNTI|LCID|DLKbps|ULKbps|Type|Cap|Size|HighWater|NumPush|NumPushFail|NumPop|NumPopFail|Cleared|Time |
  10. |70 |3 |0.0 |0.0 |UM |128|0 |0 |0 |0 |0 |0 |0 |1548773089|
  11. |70 |2 |0.0 |0.0 |AM |128|0 |0 |0 |0 |0 |0 |0 |1548773089|
  12. |70 |1 |0.0 |0.0 |AM |128|0 |1 |5 |0 |5 |0 |0 |1548773089|
  13. |70 |0 |0.0 |0.0 |TM |16 |0 |1 |1 |0 |1 |0 |0 |1548773089|
  14. |71 |1 |0.0 |0.0 |AM |128|0 |1 |5 |0 |5 |0 |0 |1548773089|
  15. |71 |0 |0.0 |0.0 |TM |16 |0 |1 |1 |0 |1 |0 |0 |1548773089|
  16. |71 |3 |0.0 |0.0 |UM |128|0 |0 |0 |0 |0 |0 |0 |1548773089|
  17. |71 |2 |0.0 |0.0 |AM |128|0 |0 |0 |0 |0 |0 |0 |1548773089|

Stop and clean the demo.

  1. [me@host two_ues]$ letce2 lxc stop
  2. host is not running
  3. running host stop.local
  4. [me@host two_ues]$ letce2 lxc clean

ENB and UE Radio Model Configuration Parameters

The ENB and UE Radio Model accept the same set of configuration parameters.

maxpropagationdelay

LTE defines a timing advance measurement reported from the ENB to each
UE. Each UE advances its transmit frame timing relative to its receive
frame timing based on the measurement, so that all UE transmissions
are received, roughly, coincidentally at the ENB, irrespective of UE
distance from the ENB. The LTE timing advance measurement numeric range
can correct for UE distances up to a maximum of 100 kilometers from the ENB.

Currently, EMANE LTE does not implement dynamic timing
advance. Propagation delays reported by the EMANE PHY for RF
receptions are ignored for the purpose of calculating the start of
reception time, essentially resulting in 0 propagation delay and
perfect timing advance. However to avoid allowing arbitrarily large
cell sizes, receive processing drops any receptions with
progagation delay greater than the maxpropagationdelay (microseconds)
setting. The default value, 0, disables this check.

Type: uint64
Running-State Modifiable: no
Occurrence Range: [0,1]
Value Range: [0,18446744073709551615]
Default Value: 0

pcrcurveuri

Defines the URI of the LTE Packet Completion Rate (PCR) curve
file. The PCR curve file contains probability of reception curves as a
function of Signal to Interference plus Noise Ratio (SINR).

Type: string
Running-State Modifiable: no
Occurrence Range: [1,1]

resourceblocktxpower

The transmit power per LTE Resource Block (dBm).

Type: float
Running-State Modifiable: no
Occurrence Range: [0,1]
Value Range: [1.17549e-38,3.40282e+38]
Default Value: 0.0