Disable carrier sense mechanism

264 views
Skip to first unread message

Rajed Buli

unread,
Oct 2, 2014, 4:05:27 AM10/2/14
to ns-3-...@googlegroups.com
Hi,

I am working on wi-ap.cc simulation, in NS-3.19 using yans-wifi-phy.
And i want to disable the carrier sense mechanism.

Can anyone know on which files should i look to disable it  ?


Regards,
Rejed.

Tommaso Pecorella

unread,
Oct 2, 2014, 1:47:30 PM10/2/14
to ns-3-...@googlegroups.com
Hi,

you can't simply "disable" the CCA, it's too deeply connected with the MAC status. What you could do is to reduce the backoff timers. Check the DcfManager class.

T.
Message has been deleted

Rajed Buli

unread,
Oct 5, 2014, 2:51:25 AM10/5/14
to ns-3-...@googlegroups.com
Hi Tommaso,

Thanks for your reply.
Sorry for the late reply.

I looked for the backoff timer parameter in the dcf-manager.cc file, but I am not sure with parameter i should modified.
Can you focus me on that parameter ?

Thanks,
Rajed.

Steve Chiou

unread,
Dec 29, 2014, 11:43:02 AM12/29/14
to ns-3-...@googlegroups.com
I've the same problem. Do you solve it?

Rajed Buli於 2014年10月5日星期日UTC-4上午2時51分25秒寫道:

Sebastien Deronne

unread,
Dec 29, 2014, 11:54:42 AM12/29/14
to ns-3-...@googlegroups.com
Hi,

As suggested by Tommaso, it is indeed much easier to change timers instead of modifying the code itself.
I think setting the slot time duration to 0 should do the trick.

Note that the current code does not allow to change the slot value (even though there are attributes for that purpose, they are overwritten!).
So you will need anyway to make minor changes in the code to set slot values to 0, but it is not so much effort.

Regards,
Sébastien.

Steve Chiou

unread,
Dec 29, 2014, 3:47:25 PM12/29/14
to ns-3-...@googlegroups.com
Thanks Sebastien.

If I want to simulate two wifi interface. One is with carrier sense, while the others not (set slot to 0). 
How can I make both of them run together?

Sebastien Deronne於 2014年12月29日星期一UTC-5上午11時54分42秒寫道:

Sebastien Deronne

unread,
Dec 29, 2014, 6:06:19 PM12/29/14
to ns-3-...@googlegroups.com
Once you can access the slot value attribute, it can be quite obvious to set differently for two interfaces. 
For example, you set it as follows:

  mac1.SetType ("ns3::StaWifiMac",

               "Ssid", SsidValue (ssid),

               "ActiveProbing", BooleanValue (false),

               "Slot", TimeValue (MicroSeconds (20)));


  mac2.SetType ("ns3::StaWifiMac",

               "Ssid", SsidValue (ssid),

               "ActiveProbing", BooleanValue (false),

               "Slot", TimeValue (MicroSeconds (0)));


and you install mac1 on one interface and mac2 on another interface. 

I never tried such things but I guess it can work.


But be aware that accessing the slot value attribute is allowed but not possible, since it is overwritten!

I had opened a bug for this (check https://www.nsnam.org/bugzilla/show_bug.cgi?id=1801) and I have a solution (maybe not the best one) to avoid to overwrite values by the default ones during configuration.

But I was told that it was not advised to change those values (for normal simulations) so I did not submit my patch.



Tommaso Pecorella

unread,
Dec 30, 2014, 2:55:41 AM12/30/14
to ns-3-...@googlegroups.com
Hi both,

Sebastien's code should work, but he's right about the existing "bug".

@Sebastien: please submit your patch. The bug exist and it should be fixed.
Moreover, it is true that the user shouldn't change these values for a normal simulation, but that's what Attributes are for: have a default value and allow the user to change it. If we have an Attribute and it doesn't have any effect, it should be removed.

Cheers,

T.

Sebastien Deronne

unread,
Dec 30, 2014, 3:52:20 AM12/30/14
to ns-3-...@googlegroups.com

Indeed Tommaso, I totally agree with you.
I will submit the patch in the coming days.

Regards,
Sébastien.
Reply all
Reply to author
Forward
0 new messages