Unipisa / Simu5G

Simu5G - 5G NR and LTE/LTE-A user-plane simulation model for OMNeT++ & INET
https://simu5g.org
Other
146 stars 83 forks source link

NR Multicast Not Working #62

Closed JFrandon closed 2 years ago

JFrandon commented 2 years ago

Hi All,

First of all I realize that I'm probably making a mistake somewhere but I can't figure out why.

I have the following simulation: omnetpp.ini

[General]
image-path=../../../images
output-scalar-file-append = false
sim-time-limit=20s
**.routingRecorder.enabled = false

############### Statistics ##################
output-scalar-file = ${resultdir}/${configname}/${repetition}.sca
output-vector-file = ${resultdir}/${configname}/${repetition}.vec
seed-set = ${repetition}
**.vector-recording = false

################ Mobility parameters #####################
# *

**.mobility.constraintAreaMaxX = 1000m
**.mobility.constraintAreaMaxY = 1000m
**.mobility.constraintAreaMinX = 0m
**.mobility.constraintAreaMinY = 0m
**.mobility.constraintAreaMinZ = 0m
**.mobility.constraintAreaMaxZ = 0m
**.mobility.initFromDisplayString = false

############### Number of Resource Blocks ################
**.numBands = 50 # this value should be kept equal to the number of RBs

############### Transmission Power ##################
**.ueTxPower = 26
**.eNodeBTxPower = 40
**.targetBler = 0.01
**.blerShift = 5  

############### IPv4 configurator config #################
*.configurator.config = xmldoc("./demo.xml")

#------------------------------------#
# Config Standalone
#
# Topology configuration for the exemplary scenario for NR Standalone deployment
#
[Config Standalone]
network = simu5g.simulations.NR.networks.SingleCell_Standalone
sim-time-limit=20s

############### e/gNodeB configuration #################
*.gnb.mobility.initialX = 450m
*.gnb.mobility.initialY = 300m

############## UE configuration ##################
*.numUe = 3

# connect the UE's NIC to the corresponding serving eNB
*.ue[*].macCellId = 1
*.ue[*].masterId = 1
*.ue[*].nrMacCellId = 1
*.ue[*].nrMasterId = 1

# UE position
*.ue[*].mobility.initialX = 450m
*.ue[*].mobility.initialY = 350m
#------------------------------------#

[Config UdpSend]
extends=Standalone

# one UDP application for each user
*.ue[*].numApps = 1

# the amount of UDP applications on server should be equal to (numUEs)*(ue[*].numApps) 
*.server.numApps = 1

#============= Application Setup =============
*.server.app[0].typename = "inet.applications.udpapp.UdpEchoApp"
*.server.app[0].localPort = 1000

*.ue[1..2].app[0].typename = "inet.applications.udpapp.UdpEchoApp"
*.ue[1..2].app[0].localPort = 1000

*.ue[0].app[0].typename = "ether_tic_toc.apps.udp_send.UdpSendApp"
*.ue[0].app[0].destAddress = "224.0.0.10" 
*.ue[0].app[0].destPort = 1000
#------------------------------------#

With the following network config: demo.xml

<config>
    <interface hosts='*' address='10.x.x.x' netmask='255.x.x.x'/>
    <multicast-group hosts="ue[*]" interfaces="cellular" address="224.0.0.10"/>
</config>

And ether_tic_toc.apps.udp_send.UdpSendApp is a UDP app that sends a single packet to the port and destination

But When I run it it crashes at LteAmc::existTxParams() with cRuntimeError("LteAmc::existTxparams(): Unrecognized direction")

Then I tried adding

**.usePreconfiguredTxParams = true
**.d2dCqi = 7
**.amcMode = "D2D"

to my config.ini But then it looks like the packet is never sent or received

I'm using the latest commit of Simu5G, INET 4.4.0 and Omnet 6

giovanninardini commented 2 years ago

Hello,

if I understood well, you would like to simulate downlink multicast transmissions. However, unfortunately at the moment Simu5G implements multicast transmissions for device-to-device transmissions only.

Giovanni

JFrandon commented 2 years ago

Not really.

In this scenario, I have 1 NRUe (ue[0]) sending a UDP packet to the other UEs (ue[1..2]). If I understand correctly that should be a device-to-device transmission.

I put this scenario together by copying simulations/LTE/d2d_multicast/ and porting it to an NR network

giovanninardini commented 2 years ago

Oh, I am sorry, I overlooked the UE acting as sender in your configuration.

You should probably also configure the UEs such that they are "registered" to the multicast group. Please try to change your demo.xml file as follows:

<config>
    <interface hosts='*' address='10.x.x.x' netmask='255.x.x.x'/>

    <!-- all D2D-capable UEs participate in the multicast group --> 
    <multicast-group hosts="ue[*]" interfaces="cellular" address="224.0.0.1"/>
</config>
JFrandon commented 2 years ago

I added those in but it still doesn't seem to be working (I edited the original post to show this change)

Are you able to reproduce this setup on your end ?

giovanninardini commented 2 years ago

I tried your configuration and I was able to make it work by changing the position of the UEs:

*.ue[0].mobility.initialX = 450m
*.ue[0].mobility.initialY = 350m
*.ue[1..2].mobility.initialX = 450m
*.ue[1..2].mobility.initialY = 360m

You set the same position for all the UEs, and apparently this makes the channel model compute an infinite value for the path loss, hence causing all packets to be dropped at the receivers.

JFrandon commented 2 years ago

Thanks for the solution, It works now