Visilbe Light Communication (VLC) module for ns3.30

232 views
Skip to first unread message

k tsik

unread,
Oct 16, 2019, 5:22:25 AM10/16/19
to ns-3-users
Dear all, 

Do you may know if there is available a Visilbe Light Communication (VLC) module which is compatible with ns3.29 or ns3.30? I have found and tried one VLC module available in the link below  https://github.com/Aldalbahias/VLC
but according to the authors that was applied to ns3.24 and I experienced problems when trying to incorporate the vlc model in ns3.30. 

In particular the relevant script example (VPPMtest.cc) is running and produces few results, but the phy callbacks (listed below) aren't triggered:

ndRelay_Mt.Get(1)->TraceConnectWithoutContext("PhyRxEnd", MakeCallback(&RxEnd)); //traces to allow us to see what and when data is sent through the network
ndRelay_Mt.Get(1)->TraceConnectWithoutContext("PhyTxEnd", MakeCallback(&TxEnd)); //traces to allow us to see what and when data is received through the network

The amended script example (myVPPMtest.cc) is provided. Please note that I have replaced the  NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default(); in the original script:
with  WifiMacHelper wifiMac = WifiMacHelper();    since  NqosWifiMacHelper is no longer supported in ns3.30

Best regards,
Ktsik
myVPPMtest.cc

Tom Henderson

unread,
Oct 16, 2019, 12:12:14 PM10/16/19
to ns-3-...@googlegroups.com
On 10/16/19 2:22 AM, k tsik wrote:
Dear all, 

Do you may know if there is available a Visilbe Light Communication (VLC) module which is compatible with ns3.29 or ns3.30? I have found and tried one VLC module available in the link below  https://github.com/Aldalbahias/VLC
but according to the authors that was applied to ns3.24 and I experienced problems when trying to incorporate the vlc model in ns3.30.


I don't know of an update, but if it were to be updated, we could look into putting it on the app store.



In particular the relevant script example (VPPMtest.cc) is running and produces few results, but the phy callbacks (listed below) aren't triggered:

ndRelay_Mt.Get(1)->TraceConnectWithoutContext("PhyRxEnd", MakeCallback(&RxEnd)); //traces to allow us to see what and when data is sent through the network
ndRelay_Mt.Get(1)->TraceConnectWithoutContext("PhyTxEnd", MakeCallback(&TxEnd)); //traces to allow us to see what and when data is received through the network

The amended script example (myVPPMtest.cc) is provided. Please note that I have replaced the  NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default(); in the original script:
with  WifiMacHelper wifiMac = WifiMacHelper();    since  NqosWifiMacHelper is no longer supported in ns3.30

If you find that callbacks are not triggered, the usual way to debug this is to instrument your code (or use a debugger) to confirm that the statement in the code that invokes the callback is invoked.  If so, the problem is not how the callback is hooked, but if the statement is executed but the callback isn't called, then it usually means there is an incorrect hookup such as an invalid path to the trace.  In your case, you are using the pointer to directly access the object and hook the callback (rather than a config path), so I suspect that you will find that the program never calls for the callback, and then you need to debug why that may be the case.

- Tom



Best regards,
Ktsik
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/d7ccca4e-a437-450b-9484-ea6db6a6b8ee%40googlegroups.com.


k tsik

unread,
Oct 17, 2019, 6:10:10 AM10/17/19
to ns-3-...@googlegroups.com
Hi Tom,

Many thanks for your reply. I followed your advice and I saw that the code reaches the callbacks, but the associated to the callback functions are never called. So I tried to identify the problem through the  path to the destination (see fig 3 as taken from paper:  "Extending ns3 To Simulate Visible Light Communication at Network-Level"  ). 

image.png
I can see that thepackets are successfully received by Relay A (via ndAp_Relay DeviceContainer) but they do not  received by Relay B (via ndRelayAp_RelayMt2 device container, VLC Channel in yellows). However, I don' t know how to trace/debug futher into this, because my expertise in this particular module implementation is very limited.
I am think to experiment the same script with an old ns3 version (v3.24) and see if it works there since it is the original version for which the VLC module was written.  Please let me know what you think.

Best regards,
Ktsik


k tsik

unread,
Oct 18, 2019, 5:53:09 AM10/18/19
to ns-3-...@googlegroups.com
Hi again,

I tried the VLC model described in my thread with ns version 3.25 (the original version which, according to the authors was implemented), but I get exactly the same error. So, it seems there is a problem with the original VLC model implementation. 

Best reegards,
Ktsik

mayahi...@gmail.com

unread,
Mar 23, 2021, 7:00:47 AM3/23/21
to ns-3-users
Look for exact version of packages required by ns3.25. I even installed older version of my operating system to comply with the requirements and it works quite fine!
Reply all
Reply to author
Forward
0 new messages