How to trace packet which through LTE Enb

667 views
Skip to first unread message

hongyu deng

unread,
Mar 7, 2017, 1:45:34 AM3/7/17
to ns-3-users
Hi all,

I want to trace packet which pass the lte enb. I do like this:
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteEnbPhy/UlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteEnbPhy/DlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));

but i can get nothing in console!When i do the same in UE, i can get the packet UE rx.
  //Config::Connect ("/NodeList/8/DeviceList/*/$ns3::LteNetDevice/$ns3::LteUeNetDevice/LteUePhy/DlSpectrumPhy/RxEndOk",MakeCallback (&ReceivePacket));

what happen? am i configure the path wrong?
Any answer is appreciated!

Best,
Hong.
Message has been deleted

Biljana Bojović

unread,
Mar 7, 2017, 10:16:43 AM3/7/17
to ns-3-users
Hi Hong,

thank you very much for pointing out this.  Some paths are deprecated with recent changes in LTE model. I will check if it is possible to maintain these paths along with the new ones. I opened a bug for this issue:https://www.nsnam.org/bugzilla/show_bug.cgi?id=2666.

Until this is solved please use the paths from https://www.nsnam.org/doxygen/classns3_1_1_lte_spectrum_phy.html that contain "ComponentCarrierMap", e.g.:
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/ComponentCarrierMap/*/LteEnbPhy/UlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacketUl));

The other paths will be either removed soon or we will be functional again.

Cheers,
Biljana

hongyu deng

unread,
Mar 7, 2017, 8:55:36 PM3/7/17
to ns-3-users
Hi Biljana,

Thanks for your reply. and opened a bug for the problem.
But even i try the path your write, i can get nothing too. I go to the doxygen and follow the path all the Enb can use, and get nothing.
My network topology is the remotehost sends packet to UE through LTE network, and i want to trace the packet which pass the Enb to the UE IN node Enb.
my tracesurce function is
uint16_t cnt = 0;
void ReceivePacket (std::string context, Ptr<const Packet> packet)
{
    cnt++;  
    std::cout << "CG Rx from Enb ok " << cnt << " times, and packet size is: " << packet->GetSize() << std::endl;
}
and the confing like this
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/ComponentCarrierMap/*/LteEnbPhy/UlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/ComponentCarrierMap/*/LteEnbPhy/DlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));

My ns version is ns-3.26. So what should i do to get how many packets pass the Enb IN node Enb.
Thanks very much.

Best,
Hong.

Biljana Bojovic

unread,
Mar 8, 2017, 2:09:43 AM3/8/17
to ns-3-...@googlegroups.com
Hi Hong,

your approach is good, I do not see from these lines a possible reason for not getting getting any indication of the packets being received. It is hart to say without a script. Could you share a minimal script to reproduce the issue?

What about lte traces, e.g. MAC DL/UL traces? Check there whether you have some traffic.

Check if you have routing properly set up, the duration of the simulation, and when the application starts. Check if UE gets connected to eNodeB.

Cheers,
Biljana



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

hongyu deng

unread,
Mar 8, 2017, 4:10:24 AM3/8/17
to ns-3-users
Hi Biljana,

I am assure that the UE can RX data from RemoteHost, and the lte traces and flowmonitor can get the packet the UE rx.
I attach a script to test, and hope to solve the problem. The network topology almost like the shown below.
Thanks!

Have fun,
Hong.


test.cc

Biljana Bojovic

unread,
Mar 8, 2017, 6:06:02 AM3/8/17
to ns-3-...@googlegroups.com
Hi Hong,

in your simulation setup you have the traffic configured from eNodeB to UE, so downlinik spectrum, and you are interested in Rx event/traces, so you need to connect it at UE side. The correct Config in this case is:
   Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteUeNetDevice/ComponentCarrierMapUe/*/LteUePhy/DlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));

Hope this helps,
Biljana

hongyu deng

unread,
Mar 8, 2017, 6:58:19 AM3/8/17
to ns-3-users
Hi Biljana,

Thanks to test the script, i follow the path your give and it get nothing output in console, but when i change to
 Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/$ns3::LteUeNetDevice/LteUePhy/DlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket)); OR
 Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteUeNetDevice/LteUePhy/DlSpectrumPhy/RxEndOk", MakeCallback (&ReceivePacket));

it works and THE UE can trigger the function ReceivePacket() and show how mang packets itreceived.
BUT i want to trace there are how many packets through the Enb to UE in Enb. is there exist a way to get how many packets through the Enb in LTE module? 
And when i change the datarate to 512kbps in the script the flowmonitor shows all UE has PLR! WHY?   

Thanks for your patience answer,
Hong.

Biljana Bojovic

unread,
Mar 8, 2017, 7:24:21 AM3/8/17
to ns-3-...@googlegroups.com
You can use e.g. tracesources

https://www.nsnam.org/doxygen/classns3_1_1_lte_spectrum_phy.html#a689d4909a1da1d10727e382ad8b04a91

But, this is to track what is sent by eNodeB in the downlink spectrum. So here we speak about the radio link.  Please check LTE design: https://www.nsnam.org/docs/models/html/lte-design.html#design-criteria

So, if you would like traces from the other side, from point-to-point link I suggest that you check RLC, and PDCP traces. If these trace files are not giving you information that you need, than you should look into the code of RadioBearerStatsCalculator and adjust it to your needs.

Cheers,

Biljana


--

hongyu deng

unread,
Mar 8, 2017, 8:22:26 AM3/8/17
to ns-3-users
Hi Biljana,
Ok,thanks,i will have a try later.
I found a new problem when i run this script and change numberOfPUs to 10; the initial value is 3, and i found that when the numberOfPUs bigger than 9 it will trigger a problem.
assert failed. cond="cur->tid != tag.GetInstanceTypeId ()", msg="Error: cannot add the same kind of tag twice.", file=../src/network/model/packet-tag-list.cc, line=250
why this happen? I don't change anything about tag!

BR,
Hong.

Biljana Bojovic

unread,
Mar 8, 2017, 9:26:08 AM3/8/17
to ns-3-...@googlegroups.com
Hi Hong,

I am not sure from where is coming this error. You should use GDB debugger to and check from where it comes the error. The quickest way is to run the script under gdb and check backtace:
 ./waf --command-template="gdb %s" --run test
(gdb)run
(gdb)backtrace
If you see that it is not related to the issue of this thread, please then start the new thread so other users/maintainers can follow up.

Cheers,
Biljana


--

hongyu deng

unread,
Mar 8, 2017, 10:13:24 PM3/8/17
to ns-3-users
Hi Biljana,

Thanks your hint, it is my problem, I forget to configure the routing path.
It works now.

Best,
Hong.

Biljana Bojović

unread,
Mar 9, 2017, 11:38:56 PM3/9/17
to ns-3-users
This is just to inform that the bug #2666 is resolved, deprecated variables and config paths are removed and the change is pushed into changeset 12754:e6323b59eef8.

Thanks for help in detecting the issue.

Best regards,

Biljana

On Tuesday, March 7, 2017 at 7:45:34 AM UTC+1, hongyu deng wrote:

hongyu deng

unread,
Mar 10, 2017, 7:48:40 AM3/10/17
to ns-3-users
Hi Biljana,

I have a problem about packet burst out of range in LTE, i open o thread in https://groups.google.com/forum/#!topic/ns-3-users/jnAj1wqvqXE
do you know why this happen? Could you give some advice?
Thanks!

BR,
Hong.


Reply all
Reply to author
Forward
0 new messages