Unipisa / Simu5G

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

RNIService: L2Meas::toJsonUe - Response with "Address not found" #167

Closed paulojna closed 1 year ago

paulojna commented 1 year ago

Hello,

I'm developing a MEC application that consumes both the Location and RNI Services within a scenario populated by Car elements. From the LS, I get the updated User List for each gNodeB from the "...queries/users" resource. Regarding the RNIS, I'm trying to get the L2Meas values by sending the list gathered from the LS as a parameter with the URI ".../queries/layer2meas".

It seems to be accepted by the RNIS, but every time I ask for the resource, it returns the following (or similar): {"timestamp":{"seconds":0,"nanoSeconds":0},"cellUEInfo":["Address: 10.0.4.199 Not found.","Address: 10.0.5.20 Not found."]} This behavior seems odd to me since the addresses were obtained by means of the LS.

I think the problem is on the L2Meas.cc at this part of the code:

if(eit->second->hasUeCollector(nrNodeId))
               {
                   UeStatsCollector *ueColl = eit->second->getUeCollector(nrNodeId);
                   CellUEInfo cellUeInfo = CellUEInfo(ueColl, eit->second->getEcgi());
                   ueArray.push_back(cellUeInfo.toJson());
                   found = true;
                   break; // next ue id
               }

I'm trying to solve it, but nothing is working. I wonder if the problem might be the lack of some configuration on omnet.ini (the RNIS support is set to true), if it is something known, or if I'm missing something.

Thank you for your time, Best Regards

linofex commented 1 year ago

Hi, after some investigation I found that a previous commit changed the way module names are retrieved. Before doing a new commit I will write here the few lines to change that should solve your problem:

at line 1256: change enb = getParentModule()->getSubmodule(getModuleNameByMacNodeId(cell)); to enb = getParentModule()->getModuleByPath(getModuleNameByMacNodeId(cell));

and at line 1280: change cModule *oldEnb = getParentModule()->getSubmodule(cellModuleName); // eNobe module to cModule *oldEnb = getParentModule()->getModuleByPath(cellModuleName); // eNobe module

Now the RNIService should find the information about the UEs!

Let us know, best regards

Alessandro

paulojna commented 1 year ago

Hi Alessandro,

The solution solved the problem - I'm now obtaining info from the RNIS! Thank you.

Best Regards, Paulo